:root {
  color-scheme: dark;
  --accent: #ffd3b0;
  --caramel: #d09464;
  --brand-soft: #f3e1d1;
  --charcoal: #231f20;
  --ink: var(--charcoal);
  --paper: #f2ece4;
  --surface: #fffaf3;
  --muted: #6e5d50;
  --search-fill: #eaddd1;
  --search-text: #59473d;
  --search-border: #d5c4b7;
  --search-focus: #89654f;
  --line: rgba(0, 0, 0, .09);
  --safe-top: max(28px, calc(env(safe-area-inset-top) + 12px));
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
  font-family: Inter, ui-rounded, "SF Pro Rounded", "SF Pro Display", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior-x: none; background: var(--charcoal); }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.app-shell { position: relative; width: 100%; height: 100%; overflow: hidden; overflow: clip; background: var(--charcoal); }
.phone-stage { position: relative; display: flex; width: 300%; height: 100%; touch-action: pan-y; overscroll-behavior-x: none; transform: translateX(-33.3333%); transition: transform .46s cubic-bezier(.22,.8,.23,1); }
.phone-stage.no-transition { transition: none; }
.panel { position: relative; width: 33.3333%; min-width: 33.3333%; height: 100%; overflow: hidden; }
.panel.wrap-clone { position: absolute; top: 0; bottom: 0; z-index: 5; pointer-events: none; }

.context-bar { position: absolute; z-index: 10; top: var(--safe-top); left: 14px; right: 14px; display: grid; grid-template-columns: 42px 1fr 42px; gap: 9px; align-items: center; }
.avatar-button, .icon-button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 850; font-size: 12px; }
.avatar-button { background: var(--accent); color: #050505; box-shadow: 0 5px 18px rgba(0,0,0,.13); }
.icon-button { font-size: 24px; color: var(--surface); background: var(--charcoal); }
.icon-button.pale { background: var(--search-fill); color: var(--ink); }
.context-input, .palette-search { color: var(--search-text); background: var(--search-fill); border: 1px solid var(--search-border); }
.context-input { min-width: 0; height: 44px; padding: 0 15px; border-radius: 22px; display: flex; align-items: center; gap: 8px; text-align: left; font-weight: 650; font-size: 14px; }
.context-input:focus-visible, .calendar-search-field:focus-within, .palette-search:focus-within { outline: 2px solid var(--search-focus); outline-offset: 2px; }
.context-input span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-icon { font-size: 23px; line-height: 1; transform: rotate(-15deg); }
.glass, .glass-input { color: #fff; background: rgba(13,13,13,.46); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.glass-input { color: var(--surface); background: #231f20e8; border-color: #f2ece44d; }

.panel-capture { background: var(--charcoal); }
#camera, #captureBackdrop, .camera-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
#camera { z-index: 1; object-fit: contain; object-position: center; background: var(--charcoal); }
#camera.is-mirrored { transform: scaleX(-1); }
#captureBackdrop { z-index: 1; background: #000; pointer-events: none; }
#captureBackdropImage { width: 100%; height: 100%; object-fit: contain; }
.camera-fallback { object-fit: cover; }
.camera-fallback { overflow: hidden; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 28% 20%, #7d5343, transparent 58%), #231f20; }
.orb { position: absolute; width: 290px; height: 290px; border-radius: 50%; filter: blur(55px); opacity: .55; }
.orb-one { left: -120px; bottom: 12%; background: #9d684f; }
.orb-two { right: -150px; top: 18%; background: #775366; }
.fallback-copy { position: relative; z-index: 1; max-width: 280px; padding: 25px; text-align: center; color: white; display: grid; gap: 8px; }
.fallback-copy strong { font-size: 25px; }
.fallback-copy span { color: rgba(255,255,255,.7); line-height: 1.45; }
.camera-shade { position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 22%, transparent 65%, rgba(0,0,0,.68)); }
.camera-bar { z-index: 4; }
.camera-tools { position: absolute; z-index: 4; top: calc(var(--safe-top) + 63px); right: 15px; display: grid; gap: 10px; }
.camera-tools button { width: 42px; height: 42px; border-radius: 50%; color: #fff; font-size: 22px; background: rgba(8,8,8,.43); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(12px); }
.capture-copy { position: absolute; z-index: 4; left: 18px; bottom: calc(var(--safe-bottom) + 116px); display: flex; gap: 8px; align-items: center; color: rgba(255,255,255,.8); font-size: 13px; font-weight: 700; text-shadow: 0 2px 8px #000; }
.camera-recovery { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.camera-recovery button, .camera-recovery a { padding: 8px 11px; border-radius: 10px; color: white; background: #292929; text-decoration: none; font-size: 12px; }
.camera-recovery #cameraPermissionLink { color: #111; background: var(--accent); font-weight: 750; }
#cameraPermissionHint { max-width: 27ch; margin: 6px 0 0; color: #e5e5df; font-size: 11px; line-height: 1.35; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--caramel); box-shadow: 0 0 0 5px #ffd3b02e; }
.capture-controls { position: absolute; z-index: 4; left: 26px; right: 26px; bottom: calc(var(--safe-bottom) + 27px); display: grid; grid-template-columns: 1fr 92px 1fr; align-items: end; }
.shutter { justify-self: center; width: 78px; height: 78px; border-radius: 50%; padding: 5px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: transparent; border: 4px solid #fff; box-shadow: 0 4px 20px rgba(0,0,0,.35); }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .12s, background .12s; }
.shutter:active span { transform: scale(.87); background: var(--accent); }
.shutter.recording { border-color: #ff4545; animation: recording-pulse 1s ease-in-out infinite; }
.shutter.recording span { border-radius: 18px; transform: scale(.58); background: #ff4545; }
@keyframes recording-pulse { 50% { box-shadow: 0 0 0 13px rgba(255,69,69,.18); } }
.mini-nav { display: grid; place-items: center; gap: 4px; background: transparent; color: #fff; font-weight: 800; text-shadow: 0 2px 8px #000; }
.mini-nav span { font-size: 24px; min-width: 32px; height: 32px; display: grid; place-items: center; }
.mini-nav small { font-size: 11px; }
.dump-count { border-radius: 10px; background: var(--accent); color: #111; text-shadow: none; font-size: 14px !important; }
.swipe-tease { position: absolute; z-index: 4; bottom: calc(var(--safe-bottom) + 4px); left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 750; color: rgba(255,255,255,.53); white-space: nowrap; }

.panel-chats { color: #111; background: var(--paper); overflow-y: auto; scrollbar-width: none; }
.panel-chats::-webkit-scrollbar { display: none; }
.panel-dump { color: var(--surface); background: var(--charcoal); overflow: hidden; }
.screen-heading { padding: calc(var(--safe-top) + 84px) 20px 16px; }
.eyebrow { margin: 0 0 5px; color: #777; font-size: 11px; line-height: 1; letter-spacing: .12em; text-transform: uppercase; font-weight: 850; }
.screen-heading h1, .dump-header h1 { margin: 0; font-size: clamp(31px, 9vw, 43px); line-height: 1; letter-spacing: -.045em; }
.screen-heading > p:last-child { margin: 11px 0 0; color: #75756f; line-height: 1.45; }
.chat-list { padding: 10px 14px calc(var(--safe-bottom) + 30px); }
.chat-row { width: 100%; min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 7px; border-radius: 20px; text-align: left; background: #fff; color: #111; box-shadow: 0 5px 20px rgba(0,0,0,.04); }
.chat-pin { display: grid; place-items: center; width: 25px; height: 25px; flex: none; border-radius: 8px; background: #edf2e9; color: #365743; }
.chat-pin::before { content: ""; width: 11px; height: 14px; background: currentColor; transform: rotate(32deg); clip-path: polygon(22% 0,78% 0,70% 16%,70% 43%,94% 65%,94% 71%,57% 71%,50% 100%,43% 71%,6% 71%,6% 65%,30% 43%,30% 16%); }
.chat-row.featured { background: var(--brand-soft); box-shadow: 0 4px 16px #4d392215; }
.chat-avatar { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: #111; font-weight: 900; font-size: 13px; }
.chat-avatar.me { color: #111; background: #fff; border: 2px solid #111; }
.chat-avatar.coral { background: #934e3e; }
.chat-avatar.violet { background: #71525e; }
.chat-avatar.calendar { color: #e33434; background: white; border: 1px solid #ddd; }
.chat-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.chat-copy strong { font-size: 16px; }
.chat-copy small { overflow: hidden; color: #777; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.featured .chat-copy small { color: rgba(0,0,0,.58); }
.row-chevron { font-size: 30px; font-weight: 300; }
.list-label { margin: 19px 7px 8px; color: #888; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.status-pill { padding: 6px 8px; border-radius: 9px; color: #777; background: #eee; font-size: 10px; font-weight: 800; }
.edge-hint { display: none; }

.dump-header { position: absolute; z-index: 7; top: calc(var(--safe-top) + 75px); left: 18px; right: 18px; padding: 0; display: flex; justify-content: space-between; align-items: end; color: #fff; pointer-events: none; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.dump-header .eyebrow { color: rgba(255,255,255,.68); }
.dump-header h1 { font-size: 30px; }
.big-count { display: none; }
.dump-instruction { position: absolute; z-index: 7; top: calc(var(--safe-top) + 118px); left: 18px; max-width: min(68%, 290px); margin: 0; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.4; text-shadow: 0 2px 10px #000; pointer-events: none; }
.dump-stack { height: 100%; padding: 0; display: block; overflow-y: auto; touch-action: pan-y; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
@media (pointer: fine) { .dump-card img { cursor: grab; user-select: none; -webkit-user-drag: none; } }
.dump-stack.is-deleting { overflow-y: hidden; }
.dump-stack.is-deleting button:disabled { opacity: .6; }
.dump-stack.mouse-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.dump-stack.mouse-dragging img { cursor: grabbing; }
.dump-stack::-webkit-scrollbar { display: none; }
.dump-card { position: relative; height: 100%; min-height: 100%; border-radius: 0; overflow: hidden; touch-action: pan-y; background: #171717; box-shadow: none; isolation: isolate; scroll-snap-align: start; scroll-snap-stop: always; }
.dump-card.is-leaving { z-index: 1; pointer-events: none; }
.dump-card img, .dump-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #080808; }
.dump-card.has-video video { bottom: auto; height: calc(100% - var(--safe-bottom) - 76px); object-fit: contain; }
.dump-card.has-video .dump-card-copy { bottom: calc(var(--safe-bottom) + 140px); }
.dump-card::after { pointer-events: none; content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.78),transparent 55%); }
.dump-card-copy { pointer-events: none; position: absolute; z-index: 2; left: 18px; right: 82px; bottom: calc(var(--safe-bottom) + 88px); color: #fff; }
.dump-card-copy .type-tag { display: inline-flex; padding: 5px 8px; border-radius: 8px; color: #111; background: var(--accent); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.dump-card-copy p { margin: 0; color: rgba(255,255,255,.72); font-size: 12px; }
.dump-actions { position: absolute; z-index: 3; left: 14px; right: 14px; bottom: calc(var(--safe-bottom) + 12px); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dump-actions button { height: 52px; border-radius: 18px; font-weight: 850; }
.delete-button { color: #fff; background: rgba(20,20,20,.72); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(12px); }
.keep-button { color: var(--surface); background: var(--charcoal); border: 1px solid #f2ece459; }
.card-metrics { position: absolute; z-index: 8; right: 18px; bottom: calc(var(--safe-bottom) + 152px); pointer-events: none; }
.dump-fraction { display: grid; justify-items: end; gap: 1px; color: #fff; text-align: right; text-shadow: 0 2px 12px #000; }
.dump-fraction strong { color: #fff; font-size: 22px; line-height: 1; font-weight: 950; letter-spacing: -.05em; }
.dump-fraction small { color: rgba(255,255,255,.7); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.dump-metric { width: 58px; display: grid; justify-items: center; gap: 2px; color: #fff; text-align: center; text-shadow: 0 2px 9px #000; }
.dump-metric > span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #111; background: var(--accent); border: 2px solid rgba(255,255,255,.8); font-size: 20px; font-weight: 900; box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.dump-metric strong { font-size: 18px; line-height: 1; }
.dump-metric small { color: rgba(255,255,255,.72); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.empty-state { height: 100%; min-height: 100%; padding: 130px 30px calc(var(--safe-bottom) + 25px); display: grid; align-content: center; justify-items: center; color: var(--ink); background: var(--paper); text-align: center; }
.empty-state[hidden] { display: none; }
.panel-dump:has(#emptyDump:not([hidden])) .dump-header { color: var(--ink); text-shadow: none; }
.panel-dump:has(#emptyDump:not([hidden])) .dump-header .eyebrow { color: var(--muted); }
.panel-dump:has(#emptyDump:not([hidden])) .dump-instruction { display: none; }
.empty-mascot { width: clamp(112px, 25svh, 192px); height: auto; }
.empty-state h2 { margin: 15px 0 7px; font-size: 28px; letter-spacing: -.03em; }
.empty-state p { margin: 0 0 22px; max-width: 280px; color: var(--muted); line-height: 1.5; }
.primary-button { padding: 15px 20px; border-radius: 16px; color: var(--surface); background: var(--charcoal); font-weight: 850; }
.primary-button:disabled { opacity: .48; }

.editor-overlay, .chat-view { position: absolute; z-index: 30; inset: 0; overflow: hidden; visibility: hidden; pointer-events: none; background: var(--charcoal); transform: translateY(105%); transition: transform .4s cubic-bezier(.22,.8,.23,1), visibility 0s linear .4s; }
.editor-overlay { touch-action: pan-y; }
.editor-overlay.open, .chat-view.open { visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; }
.editor-overlay img, .editor-overlay video { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; background: #000; transition: filter .25s; }
.editor-tint { position: absolute; inset: 0; background: linear-gradient(to bottom,rgba(0,0,0,.35),transparent 30%,transparent 60%,rgba(0,0,0,.6)); pointer-events: none; }
.editor-close { position: absolute; top: var(--safe-top); right: 15px; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: rgba(10,10,10,.48); backdrop-filter: blur(14px); font-size: 30px; font-weight: 300; }
.editor-tools { position: absolute; z-index: 4; top: calc(var(--safe-top) + 58px); right: 14px; display: grid; gap: 10px; }
.editor-tools button { width: 49px; min-height: 55px; padding: 7px 2px; border-radius: 18px; display: grid; place-items: center; gap: 1px; color: #fff; background: rgba(10,10,10,.46); backdrop-filter: blur(14px); }
.editor-tools strong { font-size: 20px; }
.editor-tools small { font-size: 9px; font-weight: 750; }
.caption-input, .caption-display { position: absolute; left: 50%; top: 38%; z-index: 3; width: 100%; min-height: 52px; padding: 12px 18px; border: 0; border-radius: 0; outline: 0; color: #fff; background: rgba(0,0,0,.52); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); text-align: center; font-size: 24px; font-weight: 800; transform: translate(-50%, -50%); }
.caption-input::placeholder { color: rgba(255,255,255,.62); }
.caption-input { resize: none; overflow-y: auto; max-height: 38vh; white-space: pre-wrap; overflow-wrap: anywhere; }
.caption-display { cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; box-shadow: 0 8px 25px rgba(0,0,0,.14); }
.caption-display.dragging { cursor: grabbing; background: rgba(0,0,0,.65); transform: translate(-50%, -50%) scale(1.025); }
.editor-actions { position: absolute; left: 15px; right: 15px; bottom: calc(var(--safe-bottom) + 15px); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.editor-actions button { height: 56px; border-radius: 20px; font-weight: 900; }
.save-dump { color: var(--surface); background: #231f20a6; border: 1px solid #f2ece459; backdrop-filter: blur(15px); }
.save-dump span { font-size: 19px; }
.send-chat { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 0 19px; color: var(--surface); background: var(--charcoal); border: 1px solid #f2ece459; }
.send-chat b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--accent); }

.bottom-sheet, .command-palette { position: absolute; z-index: 60; inset: 0; pointer-events: none; visibility: hidden; }
.bottom-sheet.open, .command-palette.open { pointer-events: auto; visibility: visible; }
.sheet-backdrop, .palette-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(0,0,0,.42); opacity: 0; transition: opacity .25s; }
.bottom-sheet.open .sheet-backdrop, .command-palette.open .palette-backdrop { opacity: 1; }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 14px calc(var(--safe-bottom) + 12px); border-radius: 30px 30px 0 0; color: #111; background: var(--paper); transform: translateY(105%); transition: transform .36s cubic-bezier(.22,.8,.23,1); }
.bottom-sheet.open .sheet-card { transform: translateY(0); }
.sheet-handle { width: 38px; height: 5px; margin: 1px auto 16px; border-radius: 4px; background: #c9c9c4; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 15px; }
.sheet-title h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.sheet-title button { width: 37px; height: 37px; border-radius: 50%; background: #e5e5df; font-size: 24px; }
.destination, .type-choice { width: 100%; min-height: 67px; display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 8px; border-radius: 20px; text-align: left; color: #111; background: #fff; }
.destination > span:nth-child(2), .type-choice > span:nth-child(2) { display: grid; flex: 1; gap: 3px; }
.destination small, .type-choice small { color: #777; }
.destination b, .type-choice b { font-size: 25px; }
.type-choice > span:first-child { width: 47px; height: 47px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); font-size: 20px; }
.sheet-note { margin: -5px 6px 14px; color: #777; font-size: 13px; line-height: 1.4; }

.chat-view { z-index: 35; color: #111; background: var(--paper); overflow-y: auto; touch-action: pan-y; }
.chat-view.open { transform: translate3d(var(--chat-drag-x, 0px), 0, 0); }
.chat-view.open.is-dragging { transition: none; border-radius: 24px 0 0 24px; box-shadow: -12px 0 32px #0002; }
.chat-view.is-closing {
  transform: translate3d(103%, 0, 0);
  border-radius: 24px 0 0 24px;
  box-shadow: -12px 0 32px #0002;
  transition: transform .28s cubic-bezier(.28,.72,.34,1), visibility 0s linear .28s;
}

.chat-compose-top { position: sticky; margin: 0; padding: var(--safe-top) 18px 10px; top: 0; left: 0; right: 0; min-height: calc(var(--safe-top) + 66px); height: auto; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 13px; align-items: start; background: #f2ece4dc; backdrop-filter: blur(20px); }
.chat-header-avatar { width: 42px; height: 42px; border-radius: 50%; font-size: 11px; }
.chat-compose-top textarea { width: 100%; min-width: 0; min-height: 44px; max-height: 112px; padding: 11px 16px; border: 0; outline: 0; border-radius: 22px; resize: none; overflow-y: auto; color: #111; background: #e6e6e1; font-size: 16px; line-height: 1.35; }
.send-mini { width: 42px; height: 42px; border-radius: 50%; color: var(--surface); background: var(--charcoal); font-size: 17px; }
.chat-profile { padding: 28px 20px 18px; text-align: center; }
.chat-profile .chat-avatar { margin: auto; width: 67px; height: 67px; border-radius: 24px; font-size: 18px; }
.chat-profile h1 { margin: 12px 0 3px; font-size: 29px; }
.chat-profile p { margin: 0; color: #777; }
.chat-profile-share { margin-top: 12px; padding: 8px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--ink); font-weight: 750; }
.message-list { padding: 8px 15px calc(var(--safe-bottom) + 30px); display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.message { max-width: 78%; padding: 11px 14px; border-radius: 18px 18px 18px 5px; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.04); line-height: 1.4; }
.message.mine { align-self: flex-end; border-radius: 18px 18px 5px 18px; background: var(--brand-soft); }
.message > span { display: block; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.message img { display: block; width: 100%; max-height: 250px; margin-bottom: 7px; border-radius: 12px; object-fit: cover; }
.message video { display: block; width: 100%; max-height: 300px; margin-bottom: 7px; border-radius: 12px; background: #000; object-fit: contain; }
.message small { display: block; margin-top: 4px; color: #777; font-size: 10px; }

.palette-card { position: absolute; top: calc(var(--safe-top) + 5px); left: 12px; right: 12px; padding: 9px 10px 15px; border-radius: 27px; color: var(--ink); background: var(--paper); color-scheme: light; box-shadow: 0 18px 60px rgba(0,0,0,.27); transform: translateY(-25px) scale(.97); opacity: 0; transition: .25s; }
.command-palette.open .palette-card { transform: translateY(0) scale(1); opacity: 1; }
.palette-search { display: grid; grid-template-columns: 25px 1fr 34px; align-items: center; gap: 5px; height: 47px; padding-inline: 12px 5px; border-radius: 23px; }
.palette-search > span { font-size: 24px; }
.palette-search input { min-width: 0; height: 42px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; font-weight: 650; }
.palette-search input::placeholder, .calendar-search-field input::placeholder { color: var(--search-text); opacity: 1; }
.palette-search button { width: 32px; height: 32px; border-radius: 50%; color: var(--search-text); background: var(--paper); font-size: 20px; }
.palette-card > button:not(.palette-backdrop) { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: 15px; color: #111; background: transparent; text-align: left; }
.palette-card > button:hover { background: var(--brand-soft); }
.palette-card kbd { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); font-family: inherit; font-weight: 900; }
.palette-card button span { display: grid; gap: 2px; }
.palette-card button small { color: #777; }

.toast { position: absolute; z-index: 100; left: 50%; bottom: calc(var(--safe-bottom) + 23px); max-width: calc(100% - 36px); padding: 11px 16px; border-radius: 15px; color: #fff; background: rgba(16,16,16,.88); backdrop-filter: blur(15px); font-size: 13px; font-weight: 750; white-space: nowrap; transform: translate(-50%,25px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: translate(-50%,0); opacity: 1; }

.auth-gate { position: absolute; z-index: 300; inset: 0; padding: var(--safe-top) 24px calc(var(--safe-bottom) + 24px); display: flex; flex-direction: column; color: var(--ink); background: var(--paper); overflow-y: auto; }
.auth-gate[hidden] { display: none; }
.auth-privacy { align-self: center; margin-top: 14px; color: var(--muted); font-size: 13px; text-underline-offset: 3px; }
.auth-mark { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 850; letter-spacing: -.06em; }
.auth-mark img { width: 46px; height: 46px; border-radius: 13px; }
.auth-mascot { display: block; width: clamp(105px, 31svh, 218px); margin: auto auto 8px; aspect-ratio: 1; object-fit: contain; }
.auth-copy { margin-top: auto; }
.auth-copy h1 { margin: 12px 0 16px; max-width: 520px; font-size: clamp(39px, 11vw, 64px); line-height: .94; letter-spacing: -.055em; }
.auth-copy > p:last-child { max-width: 480px; margin: 0 0 28px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.google-login { flex: none; min-height: 54px; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; background: var(--ink); text-decoration: none; font-weight: 850; }
.google-g { width: 26px; height: 26px; display: grid; place-items: center; color: var(--accent); font-size: 21px; font-weight: 950; }

.full-overlay { position: absolute; z-index: 80; inset: 0; padding: var(--safe-top) 18px calc(var(--safe-bottom) + 20px); overflow-y: auto; visibility: hidden; pointer-events: none; transform: translateY(104%); transition: transform .38s cubic-bezier(.22,.8,.23,1), visibility 0s linear .38s; }
.full-overlay.open { visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; }
.light-overlay, .onboarding { color: #111; background: var(--paper); }
.onboarding { z-index: 250; display: flex; flex-direction: column; justify-content: center; }
.onboarding-mark { width: 70px; height: 70px; margin-bottom: 28px; border-radius: 24px; display: grid; place-items: center; color: #111; background: var(--accent); font-size: 31px; font-weight: 950; transform: rotate(-4deg); }
.onboarding h1 { margin: 8px 0 12px; max-width: 340px; font-size: 42px; line-height: .98; letter-spacing: -.05em; }
.onboarding > p:not(.eyebrow):not(.form-error) { margin: 0 0 24px; color: #6f6f69; line-height: 1.5; }
.username-field { height: 58px; padding: 0 18px; border-radius: 20px; display: flex; align-items: center; gap: 5px; background: #e7e7e1; font-size: 18px; font-weight: 800; }
.username-field input { min-width: 0; flex: 1; border: 0; outline: 0; color: #111; background: transparent; font-size: 18px; font-weight: 800; }
.form-error { min-height: 20px; margin: 9px 5px; color: #d23d3d; font-size: 13px; }
.wide { width: 100%; }

.overlay-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.overlay-title h1 { margin: 3px 0 0; font-size: 38px; letter-spacing: -.045em; }
.overlay-title > button { width: 42px; height: 42px; border-radius: 50%; color: #111; background: #e5e5df; font-size: 26px; }
.invitation-list { display: grid; gap: 10px; }
.invitation-card { padding: 15px; border-radius: 22px; background: #fff; box-shadow: 0 6px 25px rgba(0,0,0,.05); }
.invitation-card h3 { margin: 0 0 5px; font-size: 19px; }
.invitation-card p { margin: 0; color: #777; line-height: 1.4; }
.invitation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.invitation-actions button { height: 45px; border-radius: 15px; font-weight: 850; }
.invitation-actions .accept { color: #111; background: var(--accent); }
.invitation-actions .refuse { color: #111; background: #ecece7; }
.empty-invitations { padding: 70px 24px; color: #777; text-align: center; line-height: 1.5; }

.create-card { max-height: min(82vh, 700px); overflow-y: auto; }
.create-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.create-choices > button { min-height: 116px; padding: 14px; border-radius: 20px; display: flex; flex-direction: column; align-items: flex-start; color: #111; background: #fff; text-align: left; }
.create-choices > button > span { width: 40px; height: 40px; margin-bottom: 12px; border-radius: 13px; display: grid; place-items: center; background: var(--accent); font-size: 19px; }
.create-choices > button strong { font-size: 16px; }
.create-choices > button small { margin-top: 3px; color: #777; line-height: 1.3; }
.create-choices > button:disabled { opacity: .55; }
.create-form { display: grid; gap: 10px; }
.create-form input, .create-form textarea { width: 100%; border: 0; outline: 0; border-radius: 17px; padding: 15px 16px; resize: none; color: #111; background: #fff; font-size: 16px; }
.calendar-glyph { color: #e13e35; background: #fff !important; border: 1px solid #ddd; font-weight: 900; }

.action-card h2 { margin: 0 6px 15px; }
.action-card > button:not(.sheet-handle) { width: 100%; height: 54px; margin-top: 8px; border-radius: 17px; color: #111; background: #fff; font-weight: 850; }
.action-card > button.danger { color: #d13b3b; }
.secondary-button { min-height: 52px; padding: 0 18px; border-radius: 17px; color: var(--search-text); background: var(--search-fill); font-weight: 850; }
.secondary-button.danger { color: #d13b3b; background: #fff; }

.profile-view { text-align: center; }
.profile-avatar-picker { display: grid; justify-items: center; gap: 11px; margin-top: 45px; cursor: pointer; }
.profile-avatar-picker > span { width: 104px; height: 104px; border-radius: 36px; display: grid; place-items: center; overflow: hidden; color: #111; background: var(--accent); background-size: cover; background-position: center; font-size: 31px; font-weight: 950; }
.profile-avatar-picker b { color: #555; font-size: 14px; }
.profile-view h2 { margin: 22px 0 5px; font-size: 30px; }
.profile-view > p { margin: 0 0 32px; color: #777; }
.capture-preferences { max-width: 440px; margin: 0 auto 24px; padding: 16px; border-radius: 22px; text-align: left; background: #fff; }
.capture-preferences h3 { margin: 0 0 12px; font-size: 18px; }
.capture-preference-toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.capture-preference-toggle small { display: block; margin-top: 4px; color: #666; line-height: 1.4; }
.capture-preference-toggle input { width: 22px; height: 22px; flex: none; accent-color: #1b1b1b; }
.sound-level { display: grid; gap: 4px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #ecece7; }
.sound-level > div { display: flex; justify-content: space-between; align-items: center; font-size: .875rem; font-weight: 650; }
.sound-level output { color: #5b625b; font-variant-numeric: tabular-nums; }
.sound-level input { width: 100%; height: 32px; margin: 0; accent-color: #356949; cursor: pointer; }
.sound-level:has(input:disabled) { opacity: .55; }
.sound-level input:disabled { cursor: default; }

#captureBackgroundSettings { margin-top: 14px; border-top: 1px solid var(--line); }
#captureBackgroundStatus { color: #555; font-size: 13px; }
.capture-image-picker { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.capture-image-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.capture-image-picker:focus-within { outline: 2px solid #141414; outline-offset: 2px; }
.inline-invite { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.inline-invite label { min-width: 0; height: 52px; padding: 0 15px; border-radius: 17px; display: flex; align-items: center; gap: 3px; background: #fff; }
.inline-invite input { min-width: 0; flex: 1; border: 0; outline: 0; color: #111; background: transparent; }
.inline-invite > button { padding: 0 18px; border-radius: 17px; color: #111; background: var(--accent); font-weight: 850; }
#detailsConversationName { overflow-wrap: anywhere; }
#detailsConversationName[role="button"] { cursor: pointer; text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 5px; }
#detailsConversationName[contenteditable] { cursor: text; }
.details-view .overlay-title > button { flex: none; margin-left: 12px; }
.details-avatar-button { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 6px 13px 6px 6px; border-radius: 18px; background: #fff; color: var(--ink); font-weight: 750; text-align: left; }
.details-avatar-button:disabled { opacity: .6; cursor: wait; }
.details-view .sheet-note { margin: 10px 5px 22px; }
.member-list { display: grid; gap: 8px; }
.member-row { min-height: 66px; padding: 10px; border-radius: 20px; display: flex; align-items: center; gap: 11px; background: #fff; }
.member-row-copy { min-width: 0; flex: 1; display: grid; gap: 2px; text-align: left; }
.member-row-copy small { color: #777; }
.admin-label { padding: 5px 8px; border-radius: 9px; color: var(--search-text); background: var(--brand-soft); font-size: 10px; font-weight: 850; }
.remove-member { width: 35px; height: 35px; border-radius: 50%; color: #c33; background: #f5eeee; font-size: 20px; }

.calendar-view { color: #111; background: #fff; }
.calendar-timeline { position: relative; display: grid; gap: 8px; }
.calendar-hour { min-height: 62px; padding: 8px 0 0 52px; border-top: 1px solid #e8e8e8; color: #999; font-size: 11px; }
.calendar-event { min-height: 58px; padding: 11px 13px; border-radius: 15px; color: #202124; background: #e8f0fe; border-left: 4px solid #4285f4; }
.calendar-event strong { display: block; margin-bottom: 3px; }
.calendar-event small { color: #5f6368; }

.invitation-row { margin-top: 24px; background: #111; color: #fff; }
.invitation-row .chat-copy small { color: rgba(255,255,255,.63); }
.invitation-badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; display: grid; place-items: center; color: #111; background: var(--accent); font-size: 11px; font-weight: 900; }
.list-skeleton { height: 68px; margin-bottom: 8px; border-radius: 20px; background: linear-gradient(90deg,#e6e6e1,#f4f4f0,#e6e6e1); background-size: 200% 100%; animation: skeleton 1.4s infinite; }
.list-skeleton.short { width: 72%; }
@keyframes skeleton { to { background-position: -200% 0; } }
.message.system { align-self: center; max-width: 90%; padding: 7px 12px; color: #777; background: transparent; box-shadow: none; font-size: 12px; text-align: center; }
.message.other { align-self: flex-start; background: #fff; }
.message.deleted { color: #999; font-style: italic; }
.message-sender { margin-bottom: 3px; color: #777; font-size: 10px; font-weight: 800; }
.chat-row.archived { opacity: .62; }
.integration.integration-unavailable { opacity: .7; }

@media (min-width: 640px) {
  body { display: grid; place-items: center; background: radial-gradient(circle at 50% 20%,#443632,var(--charcoal) 58%); }
  .app-shell { width: 390px; height: min(844px, calc(100vh - 32px)); border: 8px solid var(--charcoal); border-radius: 48px; box-shadow: 0 35px 100px rgba(0,0,0,.55); }
  .app-shell::before { content: ""; position: absolute; z-index: 120; top: 9px; left: 50%; width: 100px; height: 27px; border-radius: 16px; transform: translateX(-50%); background: var(--charcoal); pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: .01ms !important; } }

.caption-display.dump-caption { pointer-events: none; z-index: 2; }
.dump-card-copy p { margin-top: 8px; }
.profile-notifications { margin-bottom: 14px; }
.message.system img, .message.system video { display: block; max-width: min(100%, 240px); margin: 6px auto 0; border-radius: 12px; }

.timer-panel { max-width: 540px; margin: 0 auto 18px; padding: 16px; border-radius: 20px; background: white; border: 1px solid var(--line); }
.timer-heading, .timer-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.timer-heading h2 { margin: 0; font-size: 20px; }
.timer-panel button:not(.primary-button) { border-radius: 10px; background: #eee; color: #111; padding: 8px 10px; font-size: 13px; }
.timer-panel form { margin-top: 12px; }
.timer-panel label { display: grid; gap: 5px; font-size: 13px; }
.timer-panel input, .timer-panel select { padding: 9px; min-width: 0; width: 100%; border: 1px solid #ddd; border-radius: 9px; color: #111; background: #fafafa; }
.timer-duration { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin: 10px 0; }
.timer-panel .primary-button { width: 100%; }
.timer-actions { flex-wrap: wrap; margin-top: 10px; }
#timerStatus:empty { display: none; }
#timerRunning { text-align: center; padding: 10px 0; }
#runningTimerTitle { margin: 0; overflow-wrap: anywhere; }
#timerCountdown { display: block; margin: 6px 0 10px; font-size: clamp(36px, 14vw, 62px); font-weight: 850; font-variant-numeric: tabular-nums; }
.timer-alert { width: min(90%, 440px); padding: 25px; border: 0; border-radius: 24px; background: var(--accent); color: #111; text-align: center; }
.timer-alert::backdrop { background: rgba(0,0,0,.78); }
.timer-alert-icon { margin-bottom: 5px; font-size: 40px; }
.timer-alert h2 { margin: 0 0 8px; font-size: 25px; }
.timer-alert p { margin: 0 0 6px; font-size: 18px; overflow-wrap: anywhere; }
.timer-alert small { display: block; }
.timer-alert button { display: block; margin: 12px auto 0; }
.timer-alert .primary-button { background: #111; color: #fff; }

.dump-card.has-text { background: linear-gradient(145deg, #254a35, #111c15); }
.calendar-view { background: white; }
.calendar-integration {
  background: linear-gradient(to right, #b7dbc9 var(--day-progress, 0%), #f2f6f3 var(--day-progress, 0%));
  border: 1px solid #dfebe2;
}
.calendar-view .overlay-title { padding-bottom: 10px; }
.calendar-search { position: sticky; top: 0; z-index: 3; display: flex; gap: 5px; margin-bottom: 12px; padding-block: 5px; background: white; color-scheme: light; }
.calendar-search-field { flex: 1; min-width: 0; }
.calendar-search-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: inherit; background: transparent; }
.calendar-search button,
.calendar-schedule-form input, .calendar-schedule-form select { padding: 9px 10px; border: 1px solid #d8dfd9; border-radius: 9px; color: #171b17; background: white; font: inherit; }
.calendar-search button { font-size: 12px; border-radius: 999px; color: var(--search-text); background: var(--paper); border-color: var(--search-border); }
.calendar-event { width: 100%; min-width: 0; text-align: left; }
.calendar-event.is-complete { background: #dceee0; border-left-color: #2c7a43; }
.calendar-event.is-new { box-shadow: inset 0 0 0 2px #276038; }
.calendar-event:not(.calendar-event-untimed) + .calendar-event-untimed { margin-top: 4px; }
.calendar-status { margin: 8px 0; padding: 9px; border-radius: 9px; color: #27372c; background: #eff7f0; font-size: 13px; }
.calendar-settings { margin-top: 20px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.9); }
.calendar-settings summary { cursor: pointer; font-weight: 800; }
.calendar-settings fieldset { margin: 12px 0; border: 1px solid #dce5dc; border-radius: 10px; }
#calendarList label, .calendar-toggle { display: flex; gap: 7px; align-items: start; padding: 5px 0; }
.calendar-settings .primary-button { margin-top: 8px; }
.calendar-reconnect { color: #153d25; display: inline-block; margin-top: 12px; font-size: 13px; }
.calendar-schedule-form { display: grid; gap: 12px; max-width: 760px; margin-inline: auto; }
.schedule-details, .schedule-placement { display: grid; gap: 14px; }
.calendar-schedule-form label { display: grid; min-width: 0; gap: 6px; font-size: 13px; font-weight: 750; }
.calendar-schedule-form input, .calendar-schedule-form select { width: 100%; min-width: 0; min-height: 43px; }
.calendar-schedule-fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.schedule-details { max-width: 490px; width: 100%; padding: 16px; margin-inline: auto; border: 1px solid #e0ebe2; border-radius: 18px; background: white; }
.schedule-forward { display: flex; justify-content: space-between; align-items: center; }
.schedule-quick { display: grid; gap: 4px; text-align: left; color: #174a2b; background: #e7f3e9; border: 1px solid #cbdfce; }
.schedule-quick span { min-width: 0; text-align: right; font-size: 12px; font-weight: normal; }
.schedule-quick strong { flex-shrink: 0; }
.schedule-placement-header { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.schedule-placement-header strong { display: block; line-height: 1.25; }
.schedule-placement-header input { padding-inline: 6px; }
.calendar-schedule-actions { display: flex; align-items: stretch; gap: 8px; }
.calendar-schedule-actions .primary-button { flex: 1; }
.calendar-day-scroll { max-height: min(54vh, 560px); overflow: auto; overscroll-behavior: contain; border: 1px solid #d5e1d8; border-radius: 13px; background: #fdfefd; }
.calendar-day-grid { position: relative; padding-bottom: 28px; }
.schedule-slot {
  position: absolute;
  left: 58px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 7px;
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  z-index: 1;
}
.schedule-slot strong { flex: none; }
#cloudChatList :is([data-cloud-conversation], [data-integration-id]), #menuConversationName {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
#menuConversationName {
  display: inline-block;
  min-width: 1ch;
  max-width: 100%;
  overflow-wrap: anywhere;
}
#menuConversationName[role="button"] { cursor: pointer; }
#menuConversationName[role="button"]:focus-visible { outline: 2px solid #356949; outline-offset: 3px; border-radius: 4px; }
#menuConversationName[contenteditable] {
  outline: none;
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  cursor: text;
  caret-color: #356949;
}

@font-face {
  font-family: "Jipoc Celebration";
  src: url("/noto-sans-jp-celebration.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
button.calendar-event {
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  transition: background-color .10s ease-out, border-color .10s ease-out;
}
button.calendar-event:active { filter: brightness(.97); }
button.calendar-event:focus-visible { outline: 2px solid #356949; outline-offset: 2px; }
.calendar-event.is-marking::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: #74aa8c;
  pointer-events: none;
  transform-origin: left;
  animation: calendar-marking var(--marking-delay) linear both;
}
@keyframes calendar-marking { from { transform: scaleX(.08); } to { transform: scaleX(1); } }

.completion-celebration {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 110;
  pointer-events: none;
}
.completion-celebration-burst {
  position: relative;
  isolation: isolate;
  max-width: 82%;
  animation: completion-cheer var(--celebration-duration) both;
}
.completion-celebration-burst::before {
  content: "";
  position: absolute;
  inset: -30px -40px;
  z-index: -1;
  background: radial-gradient(ellipse, #fafff8d9 16%, #fafff800 74%);
}
.completion-celebration-label {
  position: relative;
  z-index: 1;
  display: block;
  padding: 10px 18px 12px;
  border: 1px solid #dce7d8;
  border-radius: 16px;
  background: #fbfff8;
  color: #234431;
  box-shadow: 0 7px 24px #24452c22;
  font: 700 clamp(20px, 6vw, 29px)/1.35 "Jipoc Celebration", "Hiragino Sans", "Yu Gothic", sans-serif;
  text-align: center;
  white-space: nowrap;
}
.completion-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--spark-size);
  height: var(--spark-size);
  background: #77ad92;
  clip-path: polygon(50% 0%, 60% 37%, 100% 50%, 60% 63%, 50% 100%, 40% 63%, 0% 50%, 40% 37%);
  animation: completion-sparkle var(--celebration-duration) cubic-bezier(.16,.7,.35,1) var(--spark-delay) both;
}
.completion-spark:nth-of-type(2n) { background: #d6ac55; }
.completion-spark:nth-of-type(3n) { background: #bbd5a7; }
@keyframes completion-cheer {
  0% { opacity: 0; transform: translateY(5px) scale(.96); }
  20%, 68% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(1.01); }
}
@keyframes completion-sparkle {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.2); }
  23%, 56% { opacity: 1; }
  42% { transform: translate(calc(-50% + var(--spark-x)),calc(-50% + var(--spark-y))) rotate(18deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--spark-x)),calc(-50% + var(--spark-y))) rotate(36deg) scale(.55); }
}
@media (prefers-reduced-motion: reduce) {
  button.calendar-event { transition: none; }
  .completion-celebration-burst, .completion-spark, .calendar-event.is-marking::after { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-view.is-closing { transition: none; }
}

.chat-view.has-task-list > :is(.chat-compose-top, .chat-profile, .message-list) { display: none; }
.task-list-panel { color-scheme: light; max-width: 540px; margin: 0 auto; padding: var(--safe-top) 16px calc(var(--safe-bottom) + 20px); }
.task-list-header { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.task-list-header h1 { margin: 0; font-size: clamp(22px, 6vw, 28px); letter-spacing: -.04em; overflow-wrap: anywhere; }
.task-list-header p { margin: 4px 0 0; color: #60645d; font-size: 13px; }
.task-list-header button { min-height: 36px; border-radius: 12px; padding: 0 10px; background: #e6e9e2; color: #27352a; font-size: 13px; font-weight: 750; }
.task-list-header .task-list-back { padding: 0; font-size: 28px; line-height: 1; }
.task-list-form { display: flex; gap: 8px; margin-top: 23px; }
.task-list-form input { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 14px; border: 1px solid #e0e6df; background: #fff; color: #111; font-size: 16px; }
.task-list-form button { width: 45px; border-radius: 14px; background: var(--accent); color: #151515; font-size: 24px; font-weight: 800; }
.task-list-form button:disabled { opacity: .6; }
.task-rows { display: grid; gap: 7px; margin: 11px 0 0; padding: 0; list-style: none; }
.task-rows li { border: 1px solid #e5e7df; border-radius: 14px; background: #fff; }
.task-rows .task-content { display: flex; align-items: flex-start; gap: 11px; min-height: 44px; padding: 11px 12px; cursor: pointer; }
.task-rows input[type="checkbox"] { flex: none; width: 19px; height: 19px; margin: 0; accent-color: #355f45; cursor: pointer; }

.task-list-status, .task-list-empty { padding: 10px 3px 0; color: #62655f; font-size: 13px; }
.task-archive { margin-top: 20px; border-top: 1px solid #dfe4db; padding-top: 7px; }
.task-archive summary { padding: 8px 3px; color: #303a31; font-size: 14px; font-weight: 750; cursor: pointer; }
.task-archive summary span { margin-left: 5px; color: #576558; font-size: 12px; }
.task-archive .task-title { color: #5f6a61; text-decoration: line-through; }

.conversation-section { margin: 13px 0 0; }
.conversation-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 10px;
  color: #535c53;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.conversation-section summary::-webkit-details-marker { display: none; }
.conversation-section summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  margin-right: 3px;
  transform: rotate(-45deg);
}
.conversation-section[open] summary::after { transform: translateY(-2px) rotate(45deg); }
.conversation-section summary:hover { background: #e9ece4; }
.conversation-section summary:focus-visible { outline: 2px solid #356949; outline-offset: 1px; }
.conversation-section-empty { margin: 1px 8px 7px; color: #63695f; font-size: 13px; }
.task-rows li.is-completing { animation: task-completing 150ms ease-out both; }
@keyframes task-completing {
  from { background: #fff; transform: scale(1); }
  to { background: #e4f0e5; transform: scale(.985); }
}

.schedule-date-bar { display: flex; align-items: stretch; gap: 6px; }
.schedule-date-bar button { padding: 8px 9px; border: 1px solid #dce4dc; border-radius: 12px; color: #2c3d31; background: #f5f7f2; font-size: 13px; font-weight: 750; }
.schedule-date-bar [aria-pressed="true"] { background: #deebdf; border-color: #aac4b0; }
.schedule-date-bar input { flex: 1; min-width: 0; width: 0; min-height: 40px; color-scheme: light; padding-inline: 6px; font-size: 13px; }
#calendarScheduleScroll { overflow-anchor: none; background: #f9faf7; }
.schedule-event { border-bottom: 1px solid #e7ece5; }
.schedule-event-content { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; min-height: 28px; padding: 2px 10px; }
.schedule-event time { color: #5e685f; font-size: 11px; font-variant-numeric: tabular-nums; }
.schedule-event strong { overflow: hidden; padding: 3px 7px; border-left: 2px solid #94aed0; border-radius: 5px; background: #e8eef6; color: #273e54; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.schedule-gap-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 24px; padding: 2px 12px 2px 58px; border-bottom: 1px dashed #dce3d9; background: transparent; color: #566c59; text-align: left; font-size: 11px; }
.schedule-gap-button:hover, .schedule-gap-button[aria-expanded="true"] { background: #eef3ec; }
.schedule-gap-button[aria-expanded="true"] { border-bottom-style: solid; }
.schedule-gap-grid { position: relative; border-bottom: 1px solid #e7ece5; background: #fff; }
.schedule-tick { position: absolute; inset-inline: 54px 0; height: 1px; background: #edf1ea; pointer-events: none; }
.schedule-tick-hour { inset-inline: 0 0; padding-left: 10px; background: #e4ebe2; color: #627166; font-size: 10px; font-variant-numeric: tabular-nums; }
.schedule-slot {
  min-height: 26px;
  padding-right: 10px;
  background: var(--accent);
  color: #292315;
  border: 1px solid #c08761;
  border-radius: 8px;
  box-shadow: 0 3px 8px #482c141c;
}
.schedule-slot.is-overlapping { background: #ffe6c5; border-color: #d8945b; }
.schedule-slot.is-dragging { z-index: 2; box-shadow: 0 5px 20px #482c1440; cursor: grabbing; }
.schedule-slot-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.schedule-resize { position: absolute; bottom: 0; left: 25%; right: 25%; height: 11px; display: grid; place-items: center; cursor: ns-resize; }
.schedule-resize::after { content: ""; width: 22px; height: 2px; border-radius: 99px; background: #7f6e3570; }
.calendar-schedule-actions { position: sticky; bottom: 0; padding: 7px 0 2px; background: #fff; z-index: 3; }
#calendarScheduleTime { color-scheme: light; }
#dumpTaskDestinations .type-choice { min-height: 49px; padding-inline: 14px; font-weight: 750; }
#dumpTaskDestinations .type-choice:disabled { opacity: .55; }
.task-attachment { padding: 0 12px 10px 42px; color: #536454; font-size: 13px; }
.task-attachment summary { cursor: pointer; font-weight: 750; }
.task-attachment img, .task-attachment video { display: block; width: 100%; max-height: 280px; margin-top: 8px; object-fit: contain; border-radius: 10px; }
.task-attachment p { overflow-wrap: anywhere; }
.search-results { display: grid; gap: 3px; max-height: min(58vh, 500px); overflow-y: auto; padding: 4px 2px; }
.search-results button { display: grid; gap: 3px; min-height: 50px; padding: 8px 11px; text-align: left; color: #161d18; background: transparent; border-radius: 12px; }
.search-results button.is-selected, .search-results button:hover { background: var(--brand-soft); }
.search-results button > strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; line-height: 1.2; }
.search-results button > small { color: var(--muted); overflow-wrap: anywhere; }
.search-status { margin: 8px 8px 0; color: var(--muted); font-size: 13px; }
.search-match { outline: 2px solid var(--search-focus); outline-offset: -2px; }

#calendarSchedule.is-placing {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--safe-top) 0 var(--safe-bottom);
}
#calendarSchedule.is-placing > :is(.overlay-title, .calendar-reconnect),
#calendarSchedule.is-placing .schedule-date-bar { display: none; }
#calendarSchedule.is-placing .calendar-schedule-form,
#calendarSchedule.is-placing .schedule-placement {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
}
#calendarSchedule.is-placing .calendar-schedule-form { width: 100%; max-width: none; }
.schedule-placement-header { align-items: center; padding: 0 12px 8px; font-size: .92rem; }
.schedule-placement-header strong { min-width: 0; text-transform: capitalize; }
#calendarScheduleTime { width: 100px; min-height: 33px; flex: none; padding-block: 4px; font-size: 13px; }
#calendarSchedule.is-placing .calendar-day-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  border-inline: 0;
  border-radius: 0;
}
#calendarSchedule.is-placing .calendar-schedule-actions { position: static; padding: 7px 10px 0; }
#calendarSchedule.is-placing .calendar-schedule-actions button { min-height: 46px; }
#calendarSchedule.is-placing .calendar-status { margin: 5px 10px; }
#calendarSchedule.is-placing #calendarScheduleRetry { margin: 0 10px; }
#calendarSchedule.is-placing .schedule-placement { position: relative; }
.schedule-overlap {
  position: absolute;
  left: 10px;
  bottom: 61px;
  right: 10px;
  z-index: 3;
  width: fit-content;
  margin: 0;
  padding: 5px 8px;
  border-radius: 7px;
  background: #fff1df;
  color: #77431a;
  font-size: 11px;
  pointer-events: none;
}

.calendar-all-day {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 3px 0 5px;
}
#calendarScheduleAllDay { padding-inline: 10px; }
.calendar-all-day-label { flex: none; color: #5a685d; font-size: 11px; font-weight: 700; }
.calendar-all-day-items { display: flex; gap: 5px; min-width: 0; overflow: auto hidden; scrollbar-width: none; }
.calendar-all-day-chip {
  display: block;
  max-width: min(50vw, 210px);
  width: auto;
  min-height: 27px;
  flex: none;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid #c8daf7;
  border-radius: 7px;
  background: #e8f0fe;
  color: #202124;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-all-day-chip.is-complete { border-color: #a6cdb2; background: #dceee0; color: #304c38; }

#calendarSchedule:not(.is-placing) { background: var(--paper); }
#calendarSchedule:not(.is-placing) .overlay-title { margin-bottom: 12px; padding-bottom: 4px; }
#calendarSchedule:not(.is-placing) .overlay-title h1 { font-size: clamp(28px, 7.5vw, 38px); }
#calendarSchedule:not(.is-placing) .calendar-schedule-form { max-width: 510px; }
#calendarSchedule:not(.is-placing) .schedule-details { padding: 0; border: 0; background: transparent; }
#calendarSchedule:not(.is-placing) :is(.schedule-date-bar input, .schedule-details input, .schedule-details select) {
  border-color: #e0e5dc;
  border-radius: 13px;
  background: #fff;
  color-scheme: light;
}
#calendarSchedule:not(.is-placing) .schedule-date-bar [aria-pressed="true"] { border-color: #c8d4bf; background: #e8efdf; }
#calendarSchedule:not(.is-placing) .schedule-quick { background: #eaece4; border-color: #e0e4d9; color: #28342c; }

.task-title, .task-title-input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: #26322a; text-align: left; line-height: 1.3; }
.task-title { overflow-wrap: anywhere; }
.task-title-input { width: 100%; outline: none; box-shadow: 0 1px #95ad99; }
.task-remove { flex: none; align-self: center; width: 29px; height: 27px; margin: -4px 0; border-radius: 8px; color: #a12632; background: #fce5e7; font-size: 21px; line-height: 1; }
.task-repeat-badge, .task-repeat-link { color: #3c6047; background: #e7efe5; border-radius: 8px; padding: 3px 7px; font-size: 12px; font-weight: 700; flex: none; }
.task-repeat-link { margin: 7px 0 0 2px; }
.task-title, #taskListForm > button { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.task-repeat-dialog { width: min(330px, calc(100% - 36px)); padding: 18px; color: #172319; background: #f7f8f3; border: 1px solid #dfe7dc; border-radius: 19px; color-scheme: light; }
.task-repeat-dialog::backdrop { background: #12171060; }
.task-repeat-dialog form { display: grid; gap: 10px; }
.task-repeat-dialog h2, .task-repeat-dialog p { margin: 0; }
.task-repeat-dialog p { color: #526155; font-size: 13px; overflow-wrap: anywhere; }
.task-repeat-dialog label { display: grid; gap: 4px; color: #263b2a; font-size: 13px; font-weight: 700; }
.task-repeat-dialog select, .task-repeat-dialog input { width: 100%; min-height: 39px; padding: 7px; border: 1px solid #dbe5d9; border-radius: 10px; background: white; color: #172319; }
.task-repeat-actions { display: flex; gap: 6px; }
.task-repeat-actions button { flex: 1; min-height: 41px; border-radius: 12px; }
#taskRepeatCancel { color: #28372b; background: #e8ece4; }
:is(.schedule-gap, .schedule-event).has-draft:not(.is-expanded) { padding-bottom: 30px; }
.schedule-gap-button::after { content: "›"; color: #4c6954; margin-right: 2px; font-size: 17px; line-height: 1; }
.schedule-gap-button[aria-expanded="true"]::after { transform: rotate(90deg); }
#calendarSchedule:not(.is-placing) .schedule-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 19px;
  background: #e3eee3;
  border-color: #d1e1d2;
  color: #24432e;
}

.task-grip { flex: none; width: 22px; margin: -3px -3px -3px 0; padding: 0; color: #65786a; background: transparent; border-radius: 5px; cursor: grab; touch-action: none; user-select: none; font-weight: 850; }
.task-grip:active { cursor: grabbing; }
.task-rows li.is-task-dragging { opacity: .7; border-color: #82a48b; }
.task-rows li.task-drop-before { box-shadow: 0 -3px #669377; }
.task-rows li.task-drop-after { box-shadow: 0 3px #669377; }

.command-calculation { display: grid; gap: 5px; padding: 5px 2px 2px; }
.command-calculation button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
#commandCopyCalculation { background: var(--brand-soft); }
#commandCopyCalculation strong { min-width: 0; overflow-wrap: anywhere; font-size: 27px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
#commandCopyCalculation small { flex-shrink: 0; max-width: 65%; color: var(--search-text); font-size: 12px; }
#commandCopyCalculation:disabled { cursor: default; }
#commandOpenCalculator { min-height: 40px; font-size: 13px; font-weight: 760; }
#commandOpenCalculator span { color: var(--search-text); }

.calculator-avatar { background: #eef1dc; color: #394c30; font-size: 22px; }

.calculator-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  border: 0;
  color: #20251c;
  background: var(--paper);
  color-scheme: light;
  overscroll-behavior: contain;
  --calculator-width: 540px;
}
.calculator-screen[open] { display: flex; flex-direction: column; }
.calculator-screen::backdrop { background: var(--paper); }
.calculator-screen > * { width: min(100%, var(--calculator-width)); margin-inline: auto; }
.calculator-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; outline: 0; }
.calculator-header h1 { margin: 0; font-size: clamp(26px, 7vw, 38px); line-height: 1; letter-spacing: -.055em; }
.calculator-close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #272e20; background: #e9eade; font-size: 24px; line-height: 1; }
.calculator-toolbar { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.calculator-modes { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: #e7eadc; }
.calculator-modes button, #calculatorAngle { padding: 7px 11px; border-radius: 8px; color: #35402c; font-size: 13px; font-weight: 730; }
.calculator-modes button { background: transparent; }
.calculator-modes [aria-pressed="true"] { color: #1d2818; background: #fff; box-shadow: 0 1px 3px #252b1420; }
#calculatorAngle { min-width: 48px; background: #e7eadc; font-variant-numeric: tabular-nums; }
.calculator-display {
  display: grid;
  align-content: center;
  min-height: clamp(112px, 22dvh, 212px);
  border: 1px solid #dce2c8;
  border-radius: 21px;
  background: #ebefda;
  margin-bottom: 10px;
  padding: 8px 12px;
}
.calculator-screen[data-mode="scientific"] .calculator-display { min-height: clamp(100px, 16dvh, 172px); }
.calculator-display input {
  width: 100%;
  padding: 5px 4px;
  border: 0;
  background: transparent;
  color: #415036;
  text-align: center;
  font-size: 16px;
}
.calculator-display input::placeholder { color: #5c674f; }
.calculator-display button {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 4px 1px;
  color: #1e2d17;
  background: transparent;
  border-radius: 8px;
  text-align: center;
}
.calculator-display button:disabled { cursor: default; }
.calculator-display strong { overflow-wrap: anywhere; font-size: clamp(36px, 11vw, 70px); line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.055em; }
.calculator-display small { color: #4f5a43; font-size: 11px; }
.calculator-keypad { display: grid; gap: 8px; }
.calculator-keys, .calculator-science { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.calculator-keys button, .calculator-science button {
  min-width: 0;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e4d9;
  color: #21271b;
  font-weight: 740;
  touch-action: manipulation;
}
.calculator-keys button { min-height: clamp(40px, 8dvh, 68px); font-size: 20px; }
.calculator-screen[data-mode="scientific"] .calculator-keys button { min-height: clamp(36px, 5.7dvh, 58px); }
.calculator-science button { min-height: clamp(32px, 5dvh, 54px); background: #e8eadf; font-size: 13px; }
.calculator-keys button:is(:nth-child(-n+3), :nth-child(4n), [data-key="sign"]) { background: #e6ead7; border-color: #dce1ce; }
.calculator-keys button[data-key="equals"] { background: var(--accent); border-color: #d19b75; }
.calculator-keys button:active, .calculator-science button:active { background: #d5dec2; }
.calculator-screen :is(button, input):focus-visible, .command-calculation button:focus-visible { outline: 2px solid #637b4e; outline-offset: 1px; }
.calculator-history { margin-top: 10px; color: #405037; font-size: 12px; }
.calculator-history summary { cursor: pointer; padding: 4px 0; }
.calculator-clipboard { position: fixed; inset: 0 auto auto 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#calculatorHistoryItems { display: grid; gap: 3px; margin-top: 4px; }
#calculatorHistoryItems button { padding: 7px 8px; color: #293520; background: #e8eadf; text-align: left; border-radius: 6px; overflow-wrap: anywhere; }

@media (max-width: 359px) {
  .calculator-screen { padding-inline: 9px; }
  .calculator-modes button, #calculatorAngle { font-size: 12px; }
}
@media (max-height: 760px) and (max-width: 699px) {
  .calculator-screen[data-mode="scientific"] .calculator-keys button { min-height: clamp(35px, 5.2dvh, 47px); }
  .calculator-science button { min-height: clamp(30px, 4.6dvh, 43px); }
}
@media (min-width: 700px) {
  .calculator-screen { padding-top: max(24px, env(safe-area-inset-top)); }
  .calculator-screen[data-mode="scientific"] { --calculator-width: 820px; }
  .calculator-screen[data-mode="scientific"] .calculator-keypad { grid-template-columns: 1.1fr 1fr; gap: 12px; }
}

.avatar-button, .chat-avatar, #profileAvatar { position: relative; overflow: hidden; }
.avatar-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; background: var(--paper); opacity: 0; }
.avatar-photo.is-loaded { opacity: 1; }
