.file-assistant-avatar{background:linear-gradient(145deg,#e0f1d6,#c5e3bb);color:#287453;font-weight:750}
.selection-toolbar{display:flex;align-items:center;gap:12px;padding:10px 20px;background:#fff;border-bottom:1px solid var(--line)}
.selection-toolbar span{flex:1;text-align:center;color:#6f8173;font-size:12px}
.selection-toolbar .primary{padding:9px 14px;font-size:12px}
.selection-toggle{align-self:center;flex:none;width:30px;height:30px;border:1px solid #cbd8cb;border-radius:50%;background:#fff;color:#fff;font-size:16px;line-height:1}
.selection-toggle.selected{border-color:#218263;background:#218263}
.selection-toggle:disabled{visibility:hidden}
.selection-disabled{opacity:.72}
.user-presence{margin-top:6px;font-size:10px;line-height:1.5;color:#74877a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upload-progress-wrap{display:grid;gap:8px;padding:12px;background:#f2f8ef;border-radius:10px}
.upload-progress-wrap label,.upload-progress-wrap span{font-size:12px;color:#47745d}
.upload-progress-wrap progress{display:block;width:100%;height:10px;accent-color:var(--green);border:0;border-radius:6px;overflow:hidden;background:#dce9dc}
.upload-progress-wrap progress::-webkit-progress-bar{background:#dce9dc;border-radius:6px}
.upload-progress-wrap progress::-webkit-progress-value{background:var(--green);border-radius:6px}
.upload-progress-wrap progress::-moz-progress-bar{background:var(--green);border-radius:6px}
@media(max-width:700px){.selection-toolbar{padding:9px 13px}.selection-toggle{width:28px;height:28px}}
.bubble.recallable,.bubble.recallable *{-webkit-user-select:text;user-select:text}
@media(hover:none) and (pointer:coarse){
  .bubble.recallable,.bubble.recallable *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
  .bubble.recallable{touch-action:pan-y pinch-zoom}
}
.avatar-photo { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.group-icon { width: 26px; height: 26px; }
.user-item { min-height: 88px; }
.avatar-crop-dialog { width: min(440px, calc(100vw - 32px)); }
.avatar-crop-frame { position: relative; width: min(280px, 100%); aspect-ratio: 1; margin: 18px auto; border-radius: 12px; overflow: hidden; background: #e9f0e7; }
#avatar-crop-preview { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#avatar-crop-preview:active { cursor: grabbing; }
#avatar-crop-preview:focus-visible { outline: 3px solid #218263; outline-offset: -3px; }
.avatar-crop-mask { position: absolute; inset: 1px; border: 2px solid #fff; border-radius: 30%; box-shadow: 0 0 0 80px #173b355c; pointer-events: none; }
.avatar-zoom-label { display: flex; justify-content: space-between; color: #52785d; font-size: 13px; }
#avatar-crop-zoom { width: 100%; accent-color: #218263; padding: 10px 0; }
.application-controls { display: grid; gap: 12px; margin: 16px 0 24px; }
.application-controls label { display: flex; align-items: center; gap: 10px; }
.application-controls input { width: auto; }
/* Keep everyday navigation compact; management lives in the tools dialog. */
.sidebar > :not(.user-list) { flex-shrink: 0; }
.sidebar-brand { padding: 18px 22px; }
.sidebar-heading { padding: 12px 22px 0; }
.search-box { margin: 12px 16px 16px; }
.user-list { min-height: 0; flex: 1 1 0; }
.user-item { padding: 12px 11px; }
.my-profile { padding: 13px 18px; }
.sidebar-utilities { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; padding: 10px 16px; border-top: 1px solid #edf2ec; }
.drive-entry { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 8px 12px; border: 1px solid #d9e5d6; border-radius: 9px; background: #eef6e9; color: #326947; font-size: 13px; font-weight: 600; text-decoration: none; }
.drive-entry span { margin-left: auto; }
.drive-entry:hover:where(html:not([data-input="touch"]) *) { background: #e2f0df; }
.sidebar-utilities .announcement-entry, .tools-entry {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-width: 0; min-height: 40px; margin: 0;
  padding: 9px 10px; border: 1px solid #dce9de; border-radius: 10px; background: #f7faf6; color: #39775c; font-size: 12px; font-weight: 650;
}
.sidebar-utilities .announcement-entry:hover:where(html:not([data-input="touch"]) *), .tools-entry:hover:where(html:not([data-input="touch"]) *) { background: #eaf5e9; border-color: #b7d4bc; }
.sidebar-utilities svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tools-entry > span { margin-left: auto; color: #8ba08e; }
.sidebar-utilities #announcement-unread { padding: 2px 5px; font-size: 10px; }

/* The rounded shell stays fixed. Only the inset content area scrolls. */
.manage-dialog { padding: 0; max-height: calc(var(--mobile-app-height, 100dvh) - 32px); overflow: hidden; }
.manage-dialog[open] { display: flex; flex-direction: column; }
.manage-dialog > .dialog-heading { flex: none; margin: 0; padding: 16px 22px 12px; border-bottom: 1px solid #edf2ec; }
.manage-dialog > .dialog-body {
  min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  margin: 8px 8px 10px 0; padding: 4px 16px 16px 22px; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #b8cbbd transparent;
}
.dialog-body::-webkit-scrollbar { width: 6px; }
.dialog-body::-webkit-scrollbar-track { background: transparent; }
.dialog-body::-webkit-scrollbar-thumb { background: #b8cbbd; border-radius: 10px; }
.dialog-body::-webkit-scrollbar-thumb:hover:where(html:not([data-input="touch"]) *) { background: #88af96; }
.manage-dialog .dialog-symbol { width: 32px; height: 32px; border-radius: 10px; font-size: 21px; }
.dialog-header-label { color: #779081; font-size: 12px; letter-spacing: 1px; }
.manage-dialog h2 { margin: 8px 0; }
.manage-dialog form label { margin-top: 14px; margin-bottom: 14px; }
.manage-dialog input, .manage-dialog select, .manage-dialog textarea { max-width: 100%; }
.notice-dialog > .dialog-body { padding-top: 20px; }
.tools-dialog { width: min(560px, calc(100vw - 32px)); }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool-card {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 86px; padding: 14px 12px;
  border: 1px solid #e0ebdf; border-radius: 13px; background: #f8fbf6; text-align: left; transition: background .18s, border-color .18s;
}
.tool-card:hover:where(html:not([data-input="touch"]) *) { background: #edf6e9; border-color: #b5d1ba; }
.tool-symbol { display: grid; place-items: center; flex: 0 0 30px; height: 32px; border-radius: 10px; color: #397e5b; background: #e6f1e2; font-size: 22px; }
.tool-symbol svg, .dialog-symbol svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-copy { display: grid; gap: 5px; min-width: 0; flex: 1; }
.tool-copy strong { font-size: 13px; color: #305b43; line-height: 1.4; }
.tool-copy small { font-size: 11px; color: #7b8f7d; line-height: 1.5; overflow-wrap: anywhere; }
.tool-arrow { flex: none; color: #92a694; font-size: 12px; }
.tools-dialog .admin-shortcuts { display: block; margin-top: 22px; }
.tools-dialog h3 { font-size: 13px; color: #7c917e; margin: 0 0 10px; }
.personal-tools { margin-top: 18px; }
.personal-tools > #self-profile-open[hidden] + #admin-open { grid-column: 1 / -1; }
.user-list { scrollbar-width: thin; scrollbar-color: #b8cbbd transparent; }
.user-list::-webkit-scrollbar { width: 6px; }
.user-list::-webkit-scrollbar-thumb { background: #b8cbbd; border-radius: 10px; }
.owner-settings-dialog { width: min(720px, calc(100vw - 32px)); }
.owner-settings-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; margin-top: 22px; }
.owner-panel { min-width: 0; padding: 18px; border: 1px solid #e2ebe0; background: #fbfdf9; border-radius: 14px; }
.owner-panel h3 { margin: 0 0 12px; font-size: 15px; color: #355f46; }
.owner-panel > .muted { margin: 0; font-size: 12px; }
.application-controls { gap: 10px; margin: 18px 0 14px; }
.application-controls .channel-row { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 13px 11px; background: #f0f6ec; border-radius: 10px; }
.channel-row > span { display: grid; gap: 6px; min-width: 0; }
.channel-row strong { font-size: 13px; color: #3f664c; }
.channel-row small { font-size: 11px; color: #81917c; line-height: 1.5; }
.channel-row input {
  appearance: none; flex: none; width: 36px; height: 22px; margin: 0; border: 1px solid #c9d8c7; border-radius: 20px; background: #dfe8dc; position: relative; cursor: pointer;
}
.channel-row input::before { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #294c3620; transition: transform .18s; }
.channel-row input:checked { background: #277e5e; border-color: #277e5e; }
.channel-row input:checked::before { transform: translateX(14px); }
.channel-row input:focus-visible { outline: 3px solid #88bea9; outline-offset: 3px; }
.channel-row input:disabled { opacity: .45; cursor: not-allowed; }
.settings-tip { margin: 0; font-size: 11px; line-height: 1.7; color: #8b9984; }
.owner-panel form input, .owner-panel form select { padding: 10px 11px; margin-top: 7px; }
.password-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.password-pair label { min-width: 0; }

@media (max-width: 700px) {
  .sidebar-brand { padding: 12px 16px; }
  .sidebar-heading { padding: 10px 16px 0; }
  .search-box { margin: 10px 12px 12px; }
  .sidebar-utilities { padding: 7px 12px; }
  .my-profile { padding: 10px 16px max(10px, env(safe-area-inset-bottom)); }
  .manage-dialog { max-height: calc(var(--mobile-app-height, 100dvh) - 20px); border-radius: 18px; }
  .manage-dialog > .dialog-heading { padding: 12px 16px 10px; }
  .manage-dialog > .dialog-body { padding: 4px 10px 12px 16px; margin-right: 6px; }
  .owner-settings-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
  .owner-panel { padding: 14px; }
  .tool-card { padding: 12px 10px; gap: 8px; min-height: 82px; }
  .tool-symbol { flex-basis: 25px; height: 28px; font-size: 19px; }
}
@media (max-width: 430px) {
  .tools-grid { grid-template-columns: 1fr; gap: 8px; }
  .tool-card { min-height: 66px; }
  .password-pair { grid-template-columns: 1fr; gap: 0; }
}
@media (max-height: 560px) {
  .sidebar-brand { padding-block: 10px; }
  .sidebar-heading { padding-top: 6px; }
  .search-box { margin-block: 8px; }
  .sidebar-utilities { padding-block: 6px; }
  .my-profile { padding-block: 8px; }
}
.upgrade-options{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
#reaction-target{width:100%;min-height:150px;border:0;border-radius:16px;background:#ae4141;color:white;font-size:20px;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.reaction-scores{white-space:pre-line;font-variant-numeric:tabular-nums;margin-top:12px;font-size:14px;line-height:1.8;color:#145e3c}
#reaction-target.ready{background:#16834d}
.memory-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;width:min(100%,250px);margin:12px auto}
#upgrade-dialog{width:min(560px,calc(100vw - 24px))}
#upgrade-dialog .dialog-body{padding:18px 20px}
#upgrade-dialog .muted{font-size:13px;line-height:1.6;margin:8px 0}
#upgrade-dialog .attempts-note{line-height:1.5;margin:8px 0}
#upgrade-dialog .upgrade-options{margin:12px 0}
.memory-cell{aspect-ratio:1;min-width:0;border:1px solid #b8ccbc;border-radius:8px;background:#e9f0e8;touch-action:manipulation;color:#145e3c;font-weight:700}
.memory-cell.lit{background:#18905b;border-color:#18905b;box-shadow:0 0 0 2px #b5ead0}
.memory-cell.chosen{background:#bee2cf}
.memory-cell:disabled{opacity:1}
.upgrade-settings-panel{grid-column:1/-1}
.slither-scroll{overflow:auto;padding:8px 0;max-width:100%}
.slither-grid{display:grid;margin:auto;width:100%;min-width:260px;user-select:none}
.slither-dot{width:6px;height:6px;border-radius:50%;background:#52785d;align-self:center;justify-self:center}
.slither-clue{display:grid;place-items:center;min-width:0;font-size:18px;font-weight:700;color:#234d35}
.slither-edge{position:relative;min-width:0;min-height:0;padding:0;border:0;border-radius:3px;background:transparent;touch-action:manipulation}
.slither-edge::after{content:'';position:absolute;background:#d6e2d8;border-radius:3px}
.slither-edge.horizontal::after{height:4px;left:-8px;right:-8px;top:calc(50% - 2px)}
.slither-edge.vertical::after{width:4px;top:-8px;bottom:-8px;left:calc(50% - 2px)}
.slither-edge.selected::after{background:#16834d}
.slither-edge.excluded::after{background:transparent}
.slither-edge.excluded{color:#9b584b;font-size:17px}
.slither-edge:focus-visible{outline:2px solid #16834d;outline-offset:1px;background:#e3f5e8;z-index:1}
.slither-time{font-weight:700;font-variant-numeric:tabular-nums;color:#145e3c}
.upgrade-settings-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:0 14px}
.upgrade-settings-fields label{min-width:0}
.reset-selection-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0}
#advanced-selected-count{font-size:12px;color:#52785d}
.advanced-reset-users{max-height:220px;overflow:auto;border:1px solid #d5e5d7;border-radius:10px;padding:8px 12px}
.advanced-reset-users .check-label{margin:0;padding:8px 0;overflow-wrap:anywhere;align-items:flex-start}
.advanced-reset-users input{flex:0 0 auto}
.advanced-reset-users p{font-size:13px;color:#52785d}
#reaction-continue{width:100%;padding:16px;margin:10px 0}
@media(max-width:600px){.upgrade-settings-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
