:root {
  color-scheme: light;
  --ink: #253247;
  --muted: #758298;
  --accent: #4c83c9;
  --accent-ink: #ffffff;
}

.app .viewport {
  top: var(--native-top, env(safe-area-inset-top, 0px));
  bottom: calc(92px + var(--native-bottom, env(safe-area-inset-bottom, 0px)));
}

.app .bottom-nav {
  z-index: 20;
  bottom: calc(12px + var(--native-bottom, env(safe-area-inset-bottom, 0px)));
  height: 72px;
}

.app .chat-screen:not(.mori-design-ready) .chat-messages {
  position: relative;
  inset: auto;
  opacity: 1;
  pointer-events: auto;
}

.app .chat-screen:not(.mori-design-ready) .chat-composer {
  position: relative;
  inset: auto;
  margin: 4px 16px 8px;
  transform: none;
  opacity: 1;
}

.app .today-challenge {
  background: #e8f1fc;
  border: 1px solid #ffffff;
}

.app .today-challenge p,
.app .today-challenge small,
.app .today-challenge .challenge-card-head small,
.app .challenge-topic small {
  color: #6481a5;
}

.app .challenge-go,
.app .sheet-primary,
.shared-tools-mode .overlay .sheet-primary {
  background: #d5e6fb;
  color: #365d89;
  border: 1px solid #ffffff;
}

.app .text-button,
.shared-tools-mode .text-button {
  color: #557fad;
}

.challenge-topic .card,
.share-preview-card,
.challenge-note,
.app .route-option {
  background: #ffffffc9;
  border-color: #dce7f4;
}

.challenge-detail p,
.share-preview-card p,
.challenge-note p,
.sheet-body,
.sheet-body p {
  color: #536c8a;
}

.challenge-detail small,
.my-challenges-group h3,
.share-preview-card small {
  color: #7e93ae;
}

.shared-tools-mode .overlay {
  z-index: 170;
  background: #849cb733;
  backdrop-filter: blur(8px);
}

.shared-tools-mode .overlay .sheet {
  background: #f7fafff5;
  color: #354f70;
  border: 1px solid #ffffff;
}

.shared-tools-mode .overlay .close {
  background: #edf3fc;
  color: #7292b9;
}

.app-tool-field input,
.app-tool-field select,
.app-tool-form textarea,
#appRecoveryOutput,
.language-menu select,
.challenge-feedback select {
  background: #ffffffd9;
  color: #395574;
  border-color: #d9e5f3;
}

.app-tool-check input,
.challenge-choices input {
  accent-color: #729ad0;
}

.app-tool-action img,
.sharing-icon,
.sharing-topic-row img {
  filter: none;
  opacity: .7;
}

.app-reply-details summary,
.app-reply-details a {
  color: #537fad;
}

.app-reply-rating [aria-pressed="true"] {
  background: #dceafb;
}

.app [data-screen="together"] { display: flex; flex-direction: column; }
.app [data-screen="together"] .screen-head { flex: none; }
.together-compose { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #dce6f3; border-radius: 50%; background: #ffffffd9; cursor: pointer; }
.together-compose img { width: 18px; height: 18px; opacity: .7; }
.together-compose[hidden], .together-tabs[hidden], .app .profile-row[hidden] { display: none; }
.together-tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px; border-radius: 8px; background: #e7eef8; }
.together-tabs button { min-width: 0; min-height: 40px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: #6783a5; font: inherit; font-size: 14px; cursor: pointer; }
.together-tabs button[aria-selected="true"] { background: #ffffff; color: #2f4d70; font-weight: 600; box-shadow: 0 1px 4px #587aaa24; }
.together-tabs button:focus-visible, .together-compose:focus-visible, .together-post-body:focus-visible, .together-done-open:focus-visible { outline: 2px solid #82b1e9; outline-offset: 2px; }
.app [data-screen="together"] .together-layout { flex: 1; min-height: 0; height: auto; padding: 0 0 24px; gap: 12px; }
.together-note { color: #7e93ae; font-size: 12px; line-height: 1.5; }
.app .together-post { display: grid; gap: 8px; padding: 14px 16px; }
.together-post-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.together-post-head strong { min-width: 0; color: #34537a; font-size: 15px; overflow-wrap: anywhere; }
.together-post-head time, .together-post-detail time, .together-own-post time { flex: none; color: #7e93ae; font-size: 12px; }
.together-post-body { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: #405c7e; font: inherit; text-align: left; cursor: pointer; }
.together-post-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.app .challenge-topic .together-post-mori { color: #7e93ae; }
.together-empty, .together-error { display: grid; gap: 8px; justify-items: start; padding: 16px; border: 1px solid #dce7f4; border-radius: 8px; background: #ffffffb3; }
.together-empty p, .together-error p { margin: 0; color: #405c7e; }
.together-error { border-color: #ecd6c9; background: #fff8f3; }
.together-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app .challenge-topic .together-section-head h2, .app .challenge-topic .together-section>h2 { margin: 0; font-size: 17px; }
.app .together-action p, .app .together-suggestion p { margin: 0; color: #536c8a; font-size: 14px; line-height: 1.55; }
.app .together-daily .today-challenge { margin: 0; padding: 14px 16px; max-height: none; border-radius: 8px; }
.app .together-daily .today-challenge[hidden] { display: none; }
.app .together-daily .challenge-card-head { min-height: 24px; }
.app .together-daily .today-challenge .row { gap: 8px 16px; }
.app .together-suggestion { display: grid; gap: 6px; padding: 14px 16px; }
.together-suggestion .row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 4px; }
.together-done-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #dce7f4; }
.together-done-open { flex: 1; min-width: 0; display: grid; gap: 3px; min-height: 52px; padding: 6px 0; border: 0; background: transparent; color: #34537a; font: inherit; text-align: left; cursor: pointer; }
.together-done-open strong { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.app .challenge-topic .together-done-open small, .together-done-row>small { flex: none; color: #7e93ae; font-size: 12px; }
.together-post-detail { display: grid; gap: 8px; }
.together-post-full { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.together-comments { display: grid; gap: 4px; margin: 14px 0 10px; padding-top: 12px; border-top: 1px solid #dce7f4; }
.together-comments h3 { margin: 0 0 4px; color: #34537a; font-size: 14px; }
.together-comment { display: grid; gap: 4px; padding: 8px 0; }
.together-comment p, .together-own-post p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.together-own-post { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid #dce7f4; }

.app-chat-options {
  position: relative;
  flex: none;
  border-color: #dce6f3;
  color: #6584aa;
}

.chat-image-preview {
  background: #edf4fd;
}

.chat-image-preview span {
  color: #7290b3;
}

.chat-suggest-button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 0; border: 0; background: transparent; color: #537faa; font: inherit; font-size: 13px;
}
.chat-suggest-button img { width: 15px; height: 15px; transform: rotate(90deg); opacity: .7; }
.app .chat-suggest { position: absolute; z-index: 6; left: 30px; right: 30px; bottom: var(--chat-action-bottom, 96px); display: flex; justify-content: center; padding: 0; }
.app .chat-suggest[hidden],.app.keyboard-open .chat-suggest,.app .chat-screen:not(.chat-open) .chat-suggest { display: none; }

.app .camino-map .maplibregl-ctrl-attrib,
.app #caminoMap .maplibregl-ctrl-attrib a {
  background: #ffffffd9;
  color: #58779b;
}

.app #caminoMap .maplibregl-ctrl-attrib-button {
  filter: none;
}

.native-mode .auth-shell {
  padding-top: calc(30px + var(--native-top));
}

.native-mode .toast,
.shared-tools-mode .toast {
  background: #fffffff0;
  color: #52769f;
  border-color: #ffffff;
}

button,
h1,
h2,
h3,
.brand,
.app .screen-head h1,
.app .chat-person h1,
.auth-copy h1 {
  letter-spacing: 0;
}

.chat-rest { padding: 8px; width: 40px; height: 40px; flex: none; }
.chat-rest img { width: 18px; height: 18px; opacity: .55; }
.app .mori-design-ready .today-challenge { position: relative; z-index: 8; max-height: min(26vh, 230px); }
.app .mori-design-ready .chat-welcome { top: 26%; z-index: 1; }
.app .mori-design-ready .chat-welcome h2 { font-size: 44px; max-width: 280px; letter-spacing: 0; }
.app .mori-design-ready .chat-welcome h2>span { display: block; overflow-wrap: anywhere; }
.app .chat-actions { position: relative; z-index: 8; display: flex; align-items: start; justify-content: space-between; gap: 8px; flex: none; padding: 0 18px; }
.chat-action-disclosure { min-width: 0; flex: 1; }
.chat-action-disclosure>summary { display: flex; align-items: center; gap: 8px; min-height: 40px; color: #537fad; font-size: 13px; cursor: pointer; list-style: none; }
.chat-action-disclosure>summary::after { content: "+"; font-size: 18px; }
.chat-action-disclosure[open]>summary::after { content: "-"; }
.chat-action-disclosure>summary::-webkit-details-marker { display: none; }
.app .chat-actions .text-button { font-size: 12px; white-space: nowrap; min-height: 40px; }
.app .chat-actions .today-challenge { margin: 0 0 6px; }
.app .app-chat-storage { color: #7c8b9f; font-size: 10px; font-weight: 400; white-space: nowrap; }
html[lang="en"] .app .mori-design-ready .chat-welcome h2 { font-size: 28px; line-height: 1.35; max-width: none; }
.app .mori-design-ready .chat-mori-anchor { width: min(128vw, 560px); height: min(128vw, 560px); }
.app .mori-design-ready .app-chat-options { position: absolute; z-index: 7; bottom: 84px; left: 18px; right: 18px; background: #f8faffee; border: 1px solid #ffffff; border-radius: 8px; opacity: var(--chat-reveal); transform: translateY(calc((1 - var(--chat-reveal)) * 160px)); }
.app .mori-design-ready .chat-composer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.app .mori-design-ready .chat-composer:has(.chat-image-button[hidden]) { grid-template-columns: minmax(0, 1fr) auto; }
.app .chat-composer .chat-image-button[hidden] { display: none; }
.app .chat-composer .chat-image-button img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.app .chat-composer textarea { font-size: 16px; }
.app.keyboard-open .bottom-nav { visibility: hidden; pointer-events: none; }
.app.keyboard-open .viewport { bottom: 0; }
.app.keyboard-open .chat-screen .chat-header { min-height: 56px; padding: 8px 20px; }
.app.keyboard-open .chat-screen .chat-composer { bottom: 8px; }
.app .mori-design-ready .chat-messages[aria-hidden="true"] { pointer-events: none; }
.app .mori-design-ready .chat-welcome { opacity: calc(1 - var(--chat-reveal)); }
.app .mori-design-ready.chat-has-history:not(.chat-open) .chat-welcome { opacity: 1; }
.app .chat-immersive.chat-open .chat-welcome { opacity: 0; }
.app .app-thinking { color: #6584aa; border-color: #91b3de; }
.app .nav-selection { pointer-events: none; }
.app .bottom-nav.video-nav { background: linear-gradient(120deg,#ffffff2e,#b6d5ef0c 62%,#ffffff1a); border: 1px solid #ffffff9e; box-shadow: inset 0 1px #ffffffe0,inset 0 -1px #8caac12b,0 5px 18px #3156741c; backdrop-filter: saturate(125%) contrast(1.025); -webkit-backdrop-filter: saturate(125%) contrast(1.025); overflow: visible; }
.app .video-nav:before,.app .video-nav:after { display: none; }
.app .video-nav .tab { color: #607e9d; text-shadow: none; font-size: 12px; gap: 3px; }
.app .video-nav .tab[aria-selected="true"] { color: #326aa7; }
.app .video-nav .tab-icon,.app .video-nav .tab[aria-selected="true"] .tab-icon { transform: none!important; transition: none; filter: none; }
.app .video-nav .tab-icon svg { filter: none; stroke-width: 1.8; }
.app .video-nav .tab:focus-visible { outline-color: #b7d8ff; }
.app .video-nav .nav-selection { z-index: 2; pointer-events: none; overflow: hidden; background: linear-gradient(135deg,#ffffff38,#c8e0f51a); border: 1px solid #ffffff73; box-shadow: inset 0 1px #ffffffab,inset 0 -1px #8bb1d333,0 2px 5px #53789917; border-radius: 999px; --lens: 0; }
.app .video-nav .nav-selection:before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: var(--lens); padding: 1.1px; background: conic-gradient(from 16deg,#ffffff13,#def8ff9c 15%,#607a91 24%,#f5f2d2d9 29%,#b5d8ff95 33%,#ffffff0d 42%,#b6e9da99 53%,#c0d4f096 64%,#ffffff87 76%,#ffffff16 88%,#ffffff13); mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite: exclude; -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); -webkit-mask-composite: xor; }
.app .video-nav .nav-selection:after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; opacity: var(--lens); background: radial-gradient(ellipse 19% 46% at 95% 67%,#f5fbffcf,transparent 70%),radial-gradient(ellipse 12% 41% at 88% 75%,#a4e5ff8c,transparent 75%),radial-gradient(ellipse 21% 9% at 48% 2%,#f0f7ffbd,transparent 80%),radial-gradient(ellipse 25% 11% at 43% 98%,#91e8db52,transparent 80%); box-shadow: inset 0 3px 2px #42678226,inset 0 -3px 2px #49728829; }
.nav-lens-strip { position: absolute; top: 0; height: 58px; display: grid; pointer-events: none; }
.nav-lens-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: #607e9d; line-height: normal; }
.nav-lens-item.is-selected { color: #326aa7; }
.nav-lens-item .tab-icon { display: grid; place-items: center; width: 27px; height: 27px; }
.nav-lens-item svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app .chat-screen .official-link { font-size: 12px; flex: none; }
.mori-filter-definitions { position: absolute; pointer-events: none; }
.intro-skip { position: absolute; z-index: 9; top: calc(18px + env(safe-area-inset-top)); right: 18px; width: 40px; height: 40px; padding: 10px; border: 1px solid #dce6f3; border-radius: 50%; background: #ffffffe6; cursor: pointer; }
.intro-skip img { display: block; width: 18px; height: 18px; opacity: .7; }
.app .mori-design-ready .app-chat-options { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; column-gap: 8px; padding: 4px 8px; }
.app .mori-design-ready .app-chat-options .app-tool-field { gap: 5px; min-width: 0; }
.app .mori-design-ready .app-chat-options .app-tool-field>span { font-size: 11px; }
.app .mori-design-ready .app-chat-options .app-tool-field select { min-width: 0; padding: 4px; width: auto; }
.app .mori-design-ready .app-chat-options .app-tool-check { font-size: 11px; gap: 6px; }
.app .mori-design-ready .app-chat-options .app-icon-action { min-width: 32px; width: 32px; }
.app .mori-design-ready .app-chat-options .app-tool-field[hidden] { display: none; }
.app .mori-design-ready .app-chat-options:has(.app-tool-field[hidden]) { grid-template-columns: 1fr 32px; }

.app .chat-header { gap: 6px; }
.app .chat-person { min-width: 0; }
.app .chat-person span { overflow-wrap: anywhere; letter-spacing: 0; }
.chat-header-tool { flex: none; width: 36px; height: 40px; padding: 9px; border: 0; background: transparent; cursor: pointer; }
.chat-header-tool img { display: block; width: 18px; height: 18px; opacity: .55; }
.app .chat-drag-hint { position: absolute; z-index: 5; bottom: 30px; left: 0; right: 0; margin: 0; text-align: center; color: #7899c2; font-size: 12px; opacity: calc(1 - var(--chat-reveal)); pointer-events: none; }
.app .chat-drag-hint>span:first-child { margin-right: 6px; }
.app .mori-reply-stack { position: absolute; z-index: 5; left: 30px; right: 30px; top: var(--mori-reply-top, 410px); height: var(--mori-reply-height, 160px); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 0 6px; opacity: 0; pointer-events: none; transition: opacity .24s; overscroll-behavior: contain; touch-action: pan-y; mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent); }
.mori-reply-stack::-webkit-scrollbar { display: none; }
.mori-reply-stack:focus-visible { outline: 2px solid #82b1e980; outline-offset: 4px; }
.mori-reply-track { padding-block: 80px; }
.mori-reply-item { position: relative; display: flex; justify-content: center; margin-bottom: 14px; transform-origin: center; contain: layout style; }
.app .chat-open .mori-reply-stack.visible { opacity: 1; pointer-events: auto; }
.mori-body-reply,.mori-reply-typing { position: relative; isolation: isolate; width: fit-content; max-width: 100%; margin: 0; border: 1px solid #ffffffd9; background: linear-gradient(135deg, #ffffff6b, #edf5ff30 48%, #cce2ff40); backdrop-filter: blur(16px) saturate(135%); -webkit-backdrop-filter: blur(16px) saturate(135%); border-radius: 24px; padding: 14px 20px; color: #436386; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: inset 0 1px 1px #ffffffef, inset 0 -1px 2px #b6d4f542, 0 7px 22px #628abd12; animation: moriReplyAppear .4s cubic-bezier(.2,.8,.24,1) both; }
.mori-reply-text { margin: 0; }
.mori-body-reply:before,.mori-reply-typing:before { content: ""; position: absolute; inset: 1px; border-radius: inherit; background: linear-gradient(155deg, #ffffff73, transparent 42%, #ffffff0d 70%); pointer-events: none; z-index: -1; }
.mori-reply-typing { display: flex; align-items: center; gap: 4px; color: #88a0bb; font-size: 13px; }
.mori-reply-typing i { width: 4px; height: 4px; border-radius: 50%; background: #86a9d3; animation: typingDot 1.2s infinite; }
.mori-reply-typing i:nth-of-type(2) { animation-delay: .16s; }
.mori-reply-typing i:nth-of-type(3) { animation-delay: .32s; }
.shared-tools-mode .overlay .app-chat-options { position: static; display: flex; flex-wrap: wrap; padding: 0; border: 0; background: transparent; opacity: 1; transform: none; }
.shared-tools-mode .overlay .chat-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 0 0; }
.shared-tools-mode .overlay .today-challenge { max-height: none; }
.app-history-reply { padding-top: 8px; }
.my-mori-entry .mori-profile-preview { flex: none; width: 60px; height: 60px; }
.profile-row-icon img { width: 20px; height: 20px; opacity: .7; }
.mori-studio { bottom: calc(92px + var(--native-bottom, env(safe-area-inset-bottom, 0px))); padding-bottom: 0; background: #f5f8fc; color: #385271; }
.mori-studio-head h2 { color: #385271; font-size: 23px; }
.mori-studio-head button,.mori-tools button[aria-selected="true"],.mori-option,.mori-microbutton,.mori-worn-item button,.mori-brush-control { background: #ffffffb8; color: #6e89ab; border-color: #fff; box-shadow: 0 4px 14px #7293b009; }
.mori-studio-head .mori-save { background: var(--theme-soft, #d5e6fd); color: var(--theme-ink, #527db3); }
.mori-stage { background: radial-gradient(ellipse at 48% 42%, #fff, #edf4fd 75%); }
.mori-stage::before { content: none; }
.mori-stage::after { background: #9cb1c51a; }
.mori-panel h3,.mori-brush-header label { color: #48698e; }
.mori-panel p,.mori-brush-labels,.mori-stage-hint,.mori-stage-name { color: #94a6be; }
.mori-tools button { color: #9aacbf; }
html[lang="en"] .mori-tools { display: grid; grid-template-columns: .9fr .85fr .8fr 1.5fr 1.35fr; padding-inline: 8px; gap: 2px; }
html[lang="en"] .mori-tools button { font-size: 13px; line-height: 1.3; padding-inline: 1px; letter-spacing: 0; }
.mori-option[aria-pressed="true"],.mori-worn-item [aria-pressed="true"] { background: #e2edfb; border-color: #adcaf0; color: #4f7cb6; }
.mori-row label,.mori-task strong { color: #6c85a4; }
.mori-row input,.mori-brush-slider input { accent-color: var(--theme-color, #8ab0df); }
.mori-task small,.mori-task span,.mori-brush-header output { color: #91a8c4; }
.mori-task button,.mori-brush-slider button { background: #dceafc; color: #5b83b5; }
.mori-discard-card { background: #fff; border-color: #e4edf9; }
.mori-discard-card p { color: #587294; }
.mori-discard-card button { background: #eef3fb; color: #6e8caf; }
.mori-discard-card button:last-child { background: #d5e7ff; color: #527bb4; }
.mori-companion-bubble { background: #ffffffed; color: #6f8bae; border-color: #fff; }
.mori-companion-switch { background: #d8e3f1; }
.mori-companion-setting[aria-checked="true"] .mori-companion-switch { background: #93b5e3; }
.personalization-page { top: var(--native-top, env(safe-area-inset-top, 0px)); bottom: calc(92px + var(--native-bottom, env(safe-area-inset-bottom, 0px))); }
.personalization-card { border-radius: 8px; }
.mori-discard-card { border-radius: 8px; }
@keyframes moriReplyAppear { from { opacity: 0; transform: translateY(-9px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mori-body-reply,.mori-reply-typing,.mori-reply-typing i { animation: none; } .app .mori-reply-stack { transition: none; } }

@media (max-height: 670px) {
  .app .mori-design-ready .chat-welcome { top: 23%; }
  .app .mori-design-ready .chat-welcome h2 { font-size: 26px; line-height: 1.3; margin: 8px 0; }
  html[lang="en"] .app .mori-design-ready .chat-welcome h2 { font-size: 24px; }
  .app .mori-design-ready .chat-welcome p { font-size: 12px; }
  .app .mori-design-ready.chat-has-history.chat-open .today-challenge { padding: 4px 12px 6px; gap: 2px; max-height: 122px; }
  .app .mori-design-ready.chat-has-history.chat-open .today-challenge>p,
  .app .mori-design-ready.chat-has-history.chat-open .today-challenge>small { display: none; }
  .app .mori-design-ready.chat-has-history.chat-open .today-challenge strong { font-size: 14px; }
  .app .mori-design-ready.chat-has-history.chat-open .today-challenge .challenge-card-head { min-height: 28px; }
}