/* Mino — Warm Light Glass
   A tactile cream glass theme inspired by sunlit stone, not generic blue glassmorphism. */

.lg-preview.glass {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.78);
  background:
    radial-gradient(ellipse at 88% 20%,rgba(240,242,255,.82) 0 9%,rgba(207,213,243,.44) 30%,transparent 64%),
    radial-gradient(ellipse at 30% 84%,rgba(225,228,250,.62) 0 8%,rgba(186,194,228,.32) 34%,transparent 68%),
    linear-gradient(154deg,#929cbf 0%,#b8bfd9 43%,#9da7ca 100%);
}
.lg-preview.glass::before,
.lg-preview.glass::after {
  content:""; position:absolute;
  border:1px solid rgba(255,255,255,.25);
  background:linear-gradient(145deg,rgba(243,245,255,.38),rgba(170,179,213,.2));
  box-shadow:inset 0 1px rgba(255,255,255,.46),0 8px 22px rgba(39,45,78,.08);
  backdrop-filter:blur(8px) saturate(1.08);
  -webkit-backdrop-filter:blur(8px) saturate(1.08);
}
.lg-preview.glass::before { inset:7px 35% 7px 7px; border-radius:9px; }
.lg-preview.glass::after { inset:12px 7px 12px 57%; border-radius:8px; }

html.glass,
body.glass {
  --bg:#d8c3ad;
  --bg-side:rgba(240,230,217,.58);
  --bg-pill:rgba(255,248,239,.52);
  --text:#29231e;
  --text-mute:#74685e;
  --border:rgba(255,255,255,.42);
  --accent:#b9652e;
  background:#d8c3ad;
}

body.glass {
  --glass-fill-1:rgba(255,252,246,.42);
  --glass-fill-2:rgba(232,211,192,.24);
  --glass-edge:rgba(255,255,255,.25);
  --glass-hi:rgba(255,255,255,.56);
  --glass-low:rgba(112,76,49,.075);
  --glass-shadow:rgba(72,45,25,.115);
  background:
    radial-gradient(ellipse at 83% 24%,rgba(255,244,220,.9) 0 8%,rgba(255,212,159,.45) 18%,transparent 38%),
    radial-gradient(ellipse at 8% 88%,rgba(126,89,59,.28),transparent 34%),
    linear-gradient(135deg,#b99b80 0%,#e7d8c8 45%,#c2a184 100%);
}
body.glass::after { display:none!important; }

body.glass .main,
body.glass .ch-list,
body.glass .ch-detail,
body.glass .ch-msgs-wrap,
body.glass .ch-msgs,
body.glass section[data-view="settings"],
body.glass .st-list,
body.glass .st-appearance,
body.glass .st-mcp,
body.glass .companion-view,
body.glass .comp-screen {
  background:transparent;
}
body.glass #chatsView[data-agent-kind="codex"] .ch-detail {
  background:
    radial-gradient(ellipse at 88% 24%,rgba(241,169,99,.12),transparent 46%),
    linear-gradient(145deg,rgba(247,242,235,.86),rgba(238,228,218,.78))!important;
}
body.glass #chatsView[data-agent-kind="codex"] .ch-msgs-wrap,
body.glass #chatsView[data-agent-kind="codex"] .ch-msgs {
  background:transparent!important;
}

/* On mobile the closed navigation drawer still exists behind .main. The main
   pane needs its own full-width material backdrop or that drawer silhouette
   shows through the glass as a vertical block. */
body.glass .main {
  background:
    radial-gradient(ellipse at 88% 24%,rgba(247,174,97,.42) 0 7%,rgba(244,184,119,.2) 22%,transparent 45%),
    radial-gradient(ellipse at 4% 87%,rgba(117,88,65,.22),transparent 42%),
    linear-gradient(145deg,#b99d85 0%,#eadccd 50%,#c4a58a 100%);
}

body.glass .main::before {
  content:"";
  position:absolute;
  width:390px;height:390px;
  right:-175px;top:7%;
  border-radius:50%;
  pointer-events:none;
  background:radial-gradient(circle,rgba(246,159,72,.58) 0,rgba(238,145,61,.31) 28%,rgba(227,128,51,.12) 52%,transparent 72%);
  filter:blur(28px);
  opacity:.72;
}

body.glass .sidebar,
body.glass .m-topbar,
body.glass .cd-head,
body.glass .cl-head,
body.glass .gp-detail-head,
body.glass .comp-head {
  background:linear-gradient(135deg,rgba(255,250,242,.46),rgba(224,204,184,.24));
  border-color:rgba(255,255,255,.2);
  box-shadow:inset 0 1px rgba(255,255,255,.34),inset 0 -1px rgba(112,76,49,.05),0 10px 28px rgba(72,47,28,.07);
  backdrop-filter:blur(24px) saturate(1.16);
  -webkit-backdrop-filter:blur(24px) saturate(1.16);
}

body.glass .st-card,
body.glass .gp-panel,
body.glass .cl-card,
body.glass .comp-card,
body.glass .comp-intro,
body.glass .ch-archive-card,
body.glass .ch-file-card.inline,
body.glass .ch-tool-group,
body.glass .ch-process-group,
body.glass .ch-thinking-strip {
  background:linear-gradient(145deg,rgba(255,252,247,.48),rgba(229,211,192,.28));
  border:1px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    inset 1px 0 0 rgba(255,255,255,.24),
    inset 0 -1px 0 var(--glass-low),
    0 2px 5px rgba(72,45,25,.045),
    0 12px 30px var(--glass-shadow);
  backdrop-filter:blur(20px) saturate(1.1);
  -webkit-backdrop-filter:blur(20px) saturate(1.1);
}

/* Sketch supplies the proven mobile geometry while Glass replaces its
   hand-drawn decoration. Remove the extra wobble outline, not the layout. */
body.glass .cl-search::after,
body.glass .cl-chip::after,
body.glass .cl-card::after,
body.glass .ch-input-bar::after,
body.glass .ch-archive-card::after,
body.glass .st-card::after,
body.glass .ch-code::after,
body.glass .ch-file-card.inline::after,
body.glass .ch-tool-group::after,
body.glass .ch-thinking-strip::after {
  display:none;
}

body.glass .st-card,
body.glass .gp-panel { border-radius:22px; }
body.glass .cl-card,
body.glass .comp-card,
body.glass .comp-intro { border-radius:20px; }

body.glass .cl-search-input,
body.glass .ch-detail-search-row input,
body.glass .ch-unified-input,
body.glass .cl-archive-search,
body.glass #chatsView[data-sub="detail"] .cd-actions-pill,
body.glass #chatsView[data-sub="detail"] .ch-input-bar,
body.glass .comp-search {
  background:linear-gradient(145deg,rgba(255,253,248,.62),rgba(225,205,186,.3));
  border:1px solid rgba(255,255,255,.7);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.82),
    0 10px 28px rgba(66,40,22,.11);
  backdrop-filter:blur(26px) saturate(1.18);
  -webkit-backdrop-filter:blur(26px) saturate(1.18);
}

body.glass #chatsView[data-sub="detail"] .ch-input-bar {
  margin:7px 12px max(2px,calc(env(safe-area-inset-bottom,0px) - 22px));
  padding:9px 11px 8px;
  border-radius:24px;
  background:linear-gradient(145deg,rgba(255,251,244,.34),rgba(213,184,159,.18))!important;
  border:1px solid rgba(255,255,255,.22)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.48),inset 0 -1px rgba(102,68,43,.07),0 8px 24px rgba(70,43,24,.1)!important;
  backdrop-filter:blur(20px) saturate(1.1)!important;
  -webkit-backdrop-filter:blur(20px) saturate(1.1)!important;
}
body.glass #chatsView[data-sub="detail"] .ch-input { font-size:1rem; padding:5px 6px; }
body.glass #chatsView[data-sub="detail"] .ch-input-btn {
  border:1px solid rgba(255,255,255,.2);
  background:rgba(255,250,242,.18);
  color:#68452f;
  box-shadow:inset 0 1px rgba(255,255,255,.34);
}
body.glass #chatsView[data-sub="detail"] .ch-send {
  border:1px solid rgba(255,225,193,.66);
  color:#fffaf3;
  background:linear-gradient(145deg,#ce7c3d,#a95328);
  box-shadow:inset 0 1px rgba(255,255,255,.35),0 5px 14px rgba(151,76,31,.2);
}
body.glass #chatsView[data-sub="detail"] .ch-send:disabled {
  background:rgba(108,83,64,.16);color:rgba(67,51,39,.42);box-shadow:none;
}

body.glass .ch-bubble { line-height:1.55; }
body.glass .ch-bubble.assistant {
  background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
}
body.glass .ch-bubble.assistant.ch-assistant-text-part {
  align-self:flex-start;
  width:fit-content;
  max-width:min(92%,720px);
  padding:10px 13px;
  line-height:1.55;
  border:1px solid rgba(255,255,255,.24);
  border-radius:22px 22px 22px 9px;
  background:linear-gradient(145deg,rgba(255,252,246,.4),rgba(232,211,192,.22));
  box-shadow:inset 0 1px rgba(255,255,255,.5),inset 1px 0 rgba(255,255,255,.2),inset 0 -1px rgba(112,76,49,.07),0 8px 22px rgba(72,45,25,.085);
  backdrop-filter:blur(16px) saturate(1.1);
  -webkit-backdrop-filter:blur(16px) saturate(1.1);
}
body.glass .ch-bubble.user {
  color:#2c241e;
  border:1px solid rgba(255,255,255,.27);
  border-radius:22px 22px 9px 22px;
  background:
    radial-gradient(circle at 100% 100%,rgba(235,144,66,.22),transparent 48%),
    linear-gradient(145deg,rgba(255,250,243,.5),rgba(221,195,169,.25));
  box-shadow:inset 0 1px rgba(255,255,255,.5),inset 1px 0 rgba(255,255,255,.2),inset 0 -1px rgba(112,76,49,.07),0 8px 22px rgba(72,45,25,.085);
  backdrop-filter:blur(16px) saturate(1.1);
  -webkit-backdrop-filter:blur(16px) saturate(1.1);
}

body.glass .sb-item:hover,
body.glass .sb-item.active,
body.glass .st-choice:hover,
body.glass .st-choice.active,
body.glass .ch-row .ch-item:hover {
  background:rgba(255,247,238,.35);
}
body.glass .sb-item.active {
  border:1px solid rgba(255,255,255,.48);
  box-shadow:inset 0 1px rgba(255,255,255,.62);
}
body.glass .ch-avatar,
body.glass .cl-card .av,
body.glass .st-row-icon {
  background:linear-gradient(145deg,rgba(255,246,235,.7),rgba(209,176,144,.38));
  border:1px solid rgba(255,255,255,.64);
  color:#825337;
  box-shadow:inset 0 1px rgba(255,255,255,.72);
}

body.glass .st-mcp-stat,
body.glass .ch-terminal-prompt,
body.glass .ch-code {
  background:rgba(255,249,241,.32);
  border-color:rgba(255,255,255,.42);
}

/* Core diffusion — blue-violet light suspended in a fine silver grain.
   Keep the v15 glass geometry; only replace its warm paper-like colour field. */
html.glass,
body.glass {
  --bg:#aeb6d2;
  --bg-side:rgba(191,198,222,.48);
  --bg-pill:rgba(235,238,251,.5);
  --text:#24283a;
  --text-mute:#666c87;
  --border:rgba(255,255,255,.34);
  --accent:#6e70ad;
  background:#aeb6d2;
}
body.glass {
  --glass-fill-1:rgba(241,243,255,.4);
  --glass-fill-2:rgba(170,178,211,.22);
  --glass-edge:rgba(255,255,255,.23);
  --glass-hi:rgba(255,255,255,.5);
  --glass-low:rgba(54,61,98,.07);
  --glass-shadow:rgba(41,46,77,.11);
  background:
    radial-gradient(ellipse 72% 45% at 86% 22%,rgba(240,242,255,.82) 0 9%,rgba(207,213,243,.44) 29%,transparent 64%),
    radial-gradient(ellipse 65% 48% at 37% 79%,rgba(225,228,250,.62) 0 8%,rgba(186,194,228,.32) 34%,transparent 68%),
    radial-gradient(ellipse 68% 48% at 5% 4%,rgba(131,142,180,.3),transparent 66%),
    linear-gradient(154deg,#929cbf 0%,#b8bfd9 43%,#9da7ca 100%);
}
body.glass::after {
  display:block!important;
  content:"";
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
  opacity:.12;
  mix-blend-mode:soft-light;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.72'/%3E%3C/svg%3E");
}
body.glass .main {
  background:
    radial-gradient(ellipse 72% 45% at 88% 22%,rgba(240,242,255,.78) 0 8%,rgba(205,211,241,.4) 29%,transparent 64%),
    radial-gradient(ellipse 70% 48% at 36% 80%,rgba(226,229,250,.58) 0 8%,rgba(183,192,227,.29) 35%,transparent 69%),
    linear-gradient(154deg,#929cbe 0%,#b9c0da 44%,#9ca6c8 100%);
}
body.glass .main::before {
  width:520px;height:520px;
  right:-245px;top:5%;
  background:radial-gradient(circle,rgba(240,243,255,.72) 0,rgba(209,216,247,.36) 31%,rgba(177,187,227,.13) 56%,transparent 73%);
  filter:blur(38px);
  opacity:.8;
}
body.glass #chatsView[data-agent-kind="codex"] .ch-detail {
  background:linear-gradient(145deg,rgba(221,225,243,.48),rgba(180,188,217,.34))!important;
}
body.glass .sidebar,
body.glass .m-topbar,
body.glass .cd-head,
body.glass .cl-head,
body.glass .gp-detail-head,
body.glass .comp-head {
  background:linear-gradient(135deg,rgba(239,241,253,.42),rgba(165,174,207,.2));
  box-shadow:inset 0 1px rgba(255,255,255,.3),inset 0 -1px rgba(55,62,98,.05),0 10px 28px rgba(40,46,78,.07);
}
body.glass .st-card,
body.glass .gp-panel,
body.glass .cl-card,
body.glass .comp-card,
body.glass .comp-intro,
body.glass .ch-archive-card,
body.glass .ch-file-card.inline,
body.glass .ch-tool-group,
body.glass .ch-process-group,
body.glass .ch-thinking-strip {
  background:linear-gradient(145deg,rgba(243,244,255,.42),rgba(166,175,210,.23));
}
body.glass #chatsView[data-sub="detail"] .ch-input-bar {
  background:linear-gradient(145deg,rgba(243,245,255,.31),rgba(158,168,207,.17))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.44),inset 0 -1px rgba(48,55,94,.07),0 8px 24px rgba(39,44,76,.1)!important;
}
body.glass #chatsView[data-sub="detail"] .ch-input-btn { color:#535a82; }
body.glass #chatsView[data-sub="detail"] .ch-send {
  border-color:rgba(226,229,255,.66);
  background:linear-gradient(145deg,#8588bd,#62689d);
  box-shadow:inset 0 1px rgba(255,255,255,.34),0 5px 14px rgba(62,68,113,.2);
}
body.glass .ch-bubble.assistant.ch-assistant-text-part {
  background:linear-gradient(145deg,rgba(243,245,255,.38),rgba(170,179,213,.2));
  box-shadow:inset 0 1px rgba(255,255,255,.46),inset 1px 0 rgba(255,255,255,.18),inset 0 -1px rgba(53,60,99,.06),0 8px 22px rgba(39,45,78,.08);
}
body.glass .ch-bubble.user {
  color:#272b41;
  background:
    radial-gradient(circle at 100% 100%,rgba(132,139,194,.2),transparent 48%),
    linear-gradient(145deg,rgba(242,244,255,.46),rgba(161,171,210,.24));
  box-shadow:inset 0 1px rgba(255,255,255,.46),inset 1px 0 rgba(255,255,255,.18),inset 0 -1px rgba(53,60,99,.06),0 8px 22px rgba(39,45,78,.08);
}
body.glass .ch-avatar,
body.glass .cl-card .av,
body.glass .st-row-icon {
  background:linear-gradient(145deg,rgba(240,242,255,.66),rgba(157,168,207,.34));
  color:#5d638f;
}

/* One chrome language for the header. Glass inherits Sketch's mobile
   geometry, so explicitly remove its cream puck and hand-drawn double edge. */
body.glass .ic-btn,
body.glass .ic-btn.primary {
  background:linear-gradient(145deg,rgba(244,246,255,.27),rgba(151,162,204,.16));
  border:1px solid rgba(255,255,255,.25);
  border-radius:50%;
  color:#292d43;
  box-shadow:
    inset 0 1px rgba(255,255,255,.34),
    inset 0 -1px rgba(49,56,94,.06),
    0 7px 20px rgba(39,45,78,.08);
  backdrop-filter:blur(20px) saturate(1.08);
  -webkit-backdrop-filter:blur(20px) saturate(1.08);
}
body.glass .ic-btn::after { display:none!important; }
body.glass .ic-btn:hover,
body.glass .ic-btn.primary:hover {
  background:linear-gradient(145deg,rgba(244,246,255,.34),rgba(151,162,204,.2));
}
body.glass #chatsView[data-sub="detail"] .cd-actions-pill {
  background:linear-gradient(145deg,rgba(244,246,255,.2),rgba(151,162,204,.12))!important;
  border:1px solid rgba(255,255,255,.22)!important;
  border-radius:999px;
  box-shadow:
    inset 0 1px rgba(255,255,255,.3),
    inset 0 -1px rgba(49,56,94,.055),
    0 7px 20px rgba(39,45,78,.075)!important;
  backdrop-filter:blur(20px) saturate(1.08)!important;
  -webkit-backdrop-filter:blur(20px) saturate(1.08)!important;
}
body.glass #chatsView[data-sub="detail"] .cd-actions-pill::after { display:none!important; }
body.glass #chatsView[data-sub="detail"] .cd-actions-pill .cd-pill-btn:hover {
  background:rgba(235,238,255,.14);
}
body.glass .ch-migration-orb {
  background:rgba(232,235,251,.18);
  border-color:rgba(69,76,119,.22);
  box-shadow:inset 0 1px rgba(255,255,255,.25);
}
body.glass .ch-migration-orb::after { border-color:rgba(255,255,255,.18); }

/* Functional strips should read as translucent layers, not white fluorescent
   cards. The surrounding diffusion field must remain visible through them. */
body.glass .ch-tool-group,
body.glass .ch-process-group,
body.glass .ch-file-card.inline,
body.glass .ch-latest-compact,
body.glass .ch-terminal-prompt {
  background:linear-gradient(145deg,rgba(240,242,255,.24),rgba(151,162,202,.13));
  border-color:rgba(255,255,255,.18);
  box-shadow:
    inset 0 1px rgba(255,255,255,.24),
    inset 0 -1px rgba(48,55,92,.055),
    0 7px 20px rgba(39,45,78,.065);
}
/* Heart-note strip sits directly over bright diffusion highlights. Heavy blur
   turns those highlights into a white bar, so use a nearly clear tinted veil
   with a dark refractive edge instead of another glass card. */
body.glass .ch-thinking-strip {
  background:rgba(116,126,174,.075)!important;
  border:1px solid rgba(64,71,111,.1)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.08)!important;
  backdrop-filter:blur(7px) saturate(1.02)!important;
  -webkit-backdrop-filter:blur(7px) saturate(1.02)!important;
}
body.glass .ch-thinking-strip::after { display:none!important; }
body.glass .ch-thinking-strip:active { background:rgba(105,115,164,.11)!important; }
body.glass #chatsView[data-sub="detail"] .ch-input-bar {
  background:linear-gradient(145deg,rgba(241,243,255,.23),rgba(146,158,202,.13))!important;
  border-color:rgba(255,255,255,.18)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.25),
    inset 0 -1px rgba(48,55,92,.06),
    0 7px 20px rgba(39,45,78,.075)!important;
}
body.glass #chatsView[data-sub="detail"] .ch-input-btn {
  background:rgba(232,235,252,.11);
  border-color:rgba(255,255,255,.16);
  box-shadow:inset 0 1px rgba(255,255,255,.2);
}

@media (max-width:720px) {
  body.glass .m-topbar { background:rgba(204,210,233,.48); }
  body.glass .sidebar { background:rgba(176,185,216,.58); }
  body.glass #chatsView[data-sub="detail"] .cd-head {
    padding-top:max(0px,calc(env(safe-area-inset-top,0px) - 8px))!important;
    padding-bottom:12px;
    min-height:64px;
    background:rgba(227,230,247,.3)!important;
    border-bottom:0!important;
    box-shadow:none!important;
    backdrop-filter:blur(26px) saturate(1.1)!important;
    -webkit-backdrop-filter:blur(26px) saturate(1.1)!important;
    overflow:hidden;
    isolation:isolate;
  }
  body.glass #chatsView[data-sub="detail"] .cd-head::before,
  body.glass #chatsView[data-sub="detail"] .cd-head::after {
    display:none!important;
    content:none!important;
  }
  body.glass #chatsView[data-sub="detail"] .cd-title-wrap {
    top:max(0px,calc(env(safe-area-inset-top,0px) - 8px));
    bottom:4px;
    padding-top:0;
  }
}

html[data-appearance="dark"].glass,
html[data-appearance="dark"] body.glass {
  --bg:#201b18;--bg-side:rgba(45,37,32,.72);--bg-pill:rgba(70,57,48,.55);
  --text:#f1e8de;--text-mute:#b6a99e;--border:rgba(255,255,255,.13);--accent:#e99a5c;
  background:#201b18;
}
html[data-appearance="dark"] body.glass .main {
  background:
    radial-gradient(ellipse at 84% 20%,rgba(191,98,43,.34),transparent 38%),
    radial-gradient(ellipse at 8% 90%,rgba(92,66,50,.34),transparent 42%),
    linear-gradient(145deg,#171311,#332821);
}
html[data-appearance="dark"] body.glass {
  background:
    radial-gradient(ellipse at 84% 20%,rgba(191,98,43,.46),transparent 34%),
    radial-gradient(ellipse at 8% 90%,rgba(92,66,50,.4),transparent 40%),
    linear-gradient(145deg,#171311,#332821);
}
html[data-appearance="dark"] body.glass .sidebar,
html[data-appearance="dark"] body.glass .m-topbar,
html[data-appearance="dark"] body.glass .cd-head,
html[data-appearance="dark"] body.glass .cl-head,
html[data-appearance="dark"] body.glass .gp-detail-head,
html[data-appearance="dark"] body.glass .st-card,
html[data-appearance="dark"] body.glass .gp-panel,
html[data-appearance="dark"] body.glass .cl-card,
html[data-appearance="dark"] body.glass .comp-card,
html[data-appearance="dark"] body.glass .comp-intro {
  background:linear-gradient(145deg,rgba(79,65,56,.58),rgba(38,31,27,.38));
  border-color:rgba(255,255,255,.14);
  box-shadow:inset 0 1px rgba(255,255,255,.16),0 14px 34px rgba(0,0,0,.22);
}
html[data-appearance="dark"] body.glass .ch-bubble.user {
  color:#f4e9de;
  background:linear-gradient(145deg,rgba(108,82,64,.72),rgba(67,51,42,.56));
  border-color:rgba(255,255,255,.17);
}
html[data-appearance="dark"] body.glass .ch-bubble.assistant.ch-assistant-text-part {
  color:#f1e8de;
  background:linear-gradient(145deg,rgba(84,69,59,.62),rgba(43,35,30,.44));
  border-color:rgba(255,255,255,.15);
}

@media (prefers-reduced-motion:reduce) {
  body.glass *,body.glass *::before,body.glass *::after { transition-duration:.01ms!important;animation-duration:.01ms!important; }
}
