/* Small, theme-aware refinements for the signed-in interface. */
.app-shell{--ui-shadow:0 4px 18px color-mix(in srgb,var(--ink) 4%,transparent)}
.app-shell .button,.app-shell .icon-button,.nav-item,.conversation,.modal-sheet button{transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease}
.app-shell .primary,.modal-sheet .primary{color:#fff}.app-shell .button.primary{font-weight:600}
.app-shell .button.secondary,.modal-sheet .button.secondary{border-radius:12px}.app-shell .icon-button{border-radius:12px}
.app-shell input:not([type=checkbox]),.app-shell textarea,.app-shell select,.modal-sheet input:not([type=checkbox]),.modal-sheet textarea,.modal-sheet select{border-radius:12px;transition:border-color .16s ease,box-shadow .16s ease}
.app-shell input:focus,.app-shell textarea:focus,.modal-sheet input:focus,.modal-sheet textarea:focus{border-color:var(--blue)}
.app-shell .section-heading{gap:18px;margin-bottom:24px}.app-shell .section-heading h1,.app-shell .conversation-list h1{font-weight:650;letter-spacing:-.7px;line-height:1.2}.app-shell .section-heading p{line-height:1.65;margin-top:8px}
.app-shell .nav-item{border-radius:12px}.app-shell .nav-item.active{font-weight:650}.app-shell .sidebar nav{gap:6px}.app-shell .topbar{border-bottom-color:var(--line)}
.app-shell .self-card,.app-shell .context-card,.app-shell .ticket-card{border:1px solid var(--line);border-radius:20px;box-shadow:var(--ui-shadow)}
.app-shell .people-grid{gap:20px}.app-shell .small-card{border-radius:18px}.app-shell .small-card h3{line-height:1.35}.app-shell .small-card p{line-height:1.6}
.app-shell .segmented{gap:4px;padding:5px;border-radius:15px}.app-shell .segmented .button{border-radius:11px;min-height:42px}.app-shell .segmented .selected{font-weight:600}
.app-shell .empty-state{padding:64px 24px}.app-shell .empty-state h2{line-height:1.3;letter-spacing:-.5px}.app-shell .empty-state p{max-width:440px;margin-left:auto;margin-right:auto;line-height:1.75}.app-shell .empty-state .button{margin-top:20px}
.app-shell .thought-toolbar{gap:12px}.app-shell .thought-card{padding-top:24px;padding-bottom:24px}.app-shell .thought-card p{line-height:1.7}.app-shell .thought-compose-launch{transition:background-color .16s ease}
.app-shell .event-list{display:grid;gap:18px}.app-shell .event-card{margin:0;border-radius:20px;box-shadow:var(--ui-shadow);overflow:hidden}.app-shell .event-card-main{padding-top:24px;padding-bottom:24px}.app-shell .event-card-main h2{line-height:1.3;letter-spacing:-.3px}.app-shell .event-card-actions{row-gap:8px}.app-shell .events-toolbar{margin-bottom:22px}
.app-shell .conversation{border-radius:13px;margin:4px 0;padding-top:16px;padding-bottom:16px}.app-shell .conversation strong{line-height:1.4}.app-shell .conversation small{line-height:1.5}.app-shell .chat-header{gap:12px}.app-shell .chat-log{scroll-padding-block:20px}.app-shell .message-bubble{line-height:1.6}.app-shell .chat-composer textarea{border-radius:16px}
.app-shell .profile-nudge{border:1px solid var(--line);border-radius:18px;gap:18px}.app-shell .self-card h3{margin-bottom:16px}.app-shell .self-about p{line-height:1.75}.app-shell .photo-upload{border-radius:14px}.app-shell .support-hero{gap:24px}.app-shell .support-hero p{line-height:1.7}
.modal-sheet{border:1px solid var(--line);box-shadow:0 24px 80px #0002}.modal-sheet>header{gap:16px}.modal-sheet>header h2{line-height:1.3;letter-spacing:-.4px}.modal-sheet .settings-section{padding-top:24px;padding-bottom:24px}.modal-sheet .settings-section h3{margin-bottom:18px}.modal-sheet .settings-link{border-radius:12px;min-height:46px}.modal-sheet .switch-row{gap:18px}.modal-sheet .switch-row small{line-height:1.65}.modal-sheet .form-pair{gap:16px}
@media(hover:hover){.app-shell .nav-item:not(.active):hover,.app-shell .conversation:not(.selected):hover,.modal-sheet .settings-link:hover{background:var(--panel-soft)}.app-shell .small-card:hover{box-shadow:0 6px 22px color-mix(in srgb,var(--ink) 7%,transparent)}.app-shell .secondary:hover{border-color:color-mix(in srgb,var(--blue) 28%,var(--line))}}
@media(max-width:700px){.app-shell .section-heading{gap:12px;margin-bottom:20px}.app-shell .section-heading h1,.app-shell .conversation-list h1{font-size:25px}.app-shell .people-grid{gap:12px}.app-shell .empty-state{padding:42px 18px}.app-shell .event-list{gap:14px}.app-shell .event-card-main{padding:20px 16px;column-gap:12px}.app-shell .event-card{border-radius:18px}.app-shell .events-toolbar{margin-bottom:18px}.app-shell .thought-card{padding-top:20px;padding-bottom:20px}.app-shell .segmented{max-width:100%;overflow-x:auto;scrollbar-width:thin}.app-shell .segmented .button{white-space:nowrap;flex-shrink:0;padding-inline:12px}.app-shell .profile-nudge{gap:12px}.app-shell .mobile-nav button{min-height:54px}.app-shell .chat-header{gap:8px}.modal-sheet{border-radius:22px 22px 0 0}.modal-sheet .settings-section{padding-top:20px;padding-bottom:20px}.modal-sheet .settings-jump{gap:8px}.modal-sheet .switch-row{gap:12px}}
@media(prefers-reduced-motion:reduce){.app-shell *,.modal-sheet *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}html.optimized .app-shell *,html.optimized .modal-sheet *{animation:none!important;transition:none!important}

.modal-sheet .settings-jump{position:relative;top:auto;margin:0 0 18px;padding:0 0 12px}.modal-sheet .settings-section{scroll-margin-top:20px}.app-shell .event-card-main strong{line-height:1.35;letter-spacing:-.25px}
@media(max-width:360px){.app-shell .discovery-controls{gap:8px}.app-shell .discovery-modes{flex:1;min-width:0}.app-shell .discovery-modes button{flex:1;min-width:0;font-size:12px;padding:9px 7px;gap:5px}.app-shell .discovery-controls>.button{width:44px;min-width:44px;padding:0;font-size:0;gap:0}.app-shell .discovery-controls>.button svg{width:20px;height:20px}}

.app-shell .thoughts-page .thought-toolbar{background:var(--surface);border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}

.app-shell .segmented[aria-label="Симпатии"]{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px;border:0;background:transparent;padding:0;margin-bottom:24px;overflow:visible;border-radius:0}.app-shell .segmented[aria-label="Симпатии"] .button{border:1px solid transparent;border-bottom:1px solid transparent;border-radius:12px;padding:11px 16px;min-height:44px;background:transparent;color:var(--muted);box-shadow:none;font-weight:500}.app-shell .segmented[aria-label="Симпатии"] .button.selected{background:var(--blue-soft);border-color:color-mix(in srgb,var(--blue) 22%,transparent);color:var(--blue);font-weight:650;box-shadow:0 2px 7px color-mix(in srgb,var(--blue) 6%,transparent)}.app-shell .segmented[aria-label="Симпатии"] .button::after,.app-shell .segmented[aria-label="Симпатии"] .button::before{display:none}@media(hover:hover){.app-shell .segmented[aria-label="Симпатии"] .button:not(.selected):hover{background:var(--panel);color:var(--ink)}}@media(max-width:420px){.app-shell .segmented[aria-label="Симпатии"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.app-shell .segmented[aria-label="Симпатии"] .button{font-size:12px;padding:10px 8px}}

/* Keep the common settings action outside the scrolling sections. */
.modal-sheet.settings-sheet{display:flex;flex-direction:column;overflow:hidden;height:min(860px,calc(100dvh - 32px));max-height:calc(100dvh - 32px)}
.settings-sheet>header{flex:0 0 auto;position:relative}
.settings-sheet #settings-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;margin:0;overflow:hidden}
.settings-sheet #settings-form>.modal-content{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding:20px}
.settings-sheet .settings-save-bar{flex:0 0 auto;padding:16px 24px max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--panel);box-shadow:0 -8px 24px rgba(0,0,0,.035)}
.settings-sheet .settings-save-bar .error:empty{display:none}
.settings-sheet .settings-save-bar .error{margin:0 0 10px}
.settings-sheet .settings-save-bar .button{margin:0;min-height:48px}
@media(max-width:600px){.modal-sheet.settings-sheet{height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}.settings-sheet .settings-save-bar{padding:12px 16px max(12px,env(safe-area-inset-bottom))}}
