/* 2026-10-17 黑夜 (theme key 'fjord', was 深海) and 纯白 ('snow'), after Evie's
   references: almost no colour, a faint grid on the ground, cards and bubbles
   drawn with hairlines instead of filled blocks, no glows. Both themes share
   the rules below; each sets its own line / fill tones. Replaces night.css. */
body[data-theme="fjord"]{
  --mono-line:rgba(255,255,255,.13);
  --mono-line-strong:rgba(255,255,255,.26);
  --mono-fill:rgba(255,255,255,.028);
  --mono-fill-strong:rgba(255,255,255,.07);
  --mono-shadow:0 10px 26px rgba(0,0,0,.32);
  --ian-bubble:rgba(255,255,255,.035);
  --ian-bubble-edge:var(--mono-line);
  --evie-bubble:rgba(255,255,255,.085);
  --composer-surface:rgba(255,255,255,.035);
  color-scheme:dark;
}
body[data-theme="snow"]{
  --mono-line:rgba(30,32,38,.10);
  --mono-line-strong:rgba(30,32,38,.22);
  --mono-fill:rgba(255,255,255,.62);
  --mono-fill-strong:rgba(255,255,255,.86);
  --mono-shadow:0 12px 32px rgba(70,76,100,.08);
  --ian-bubble:#FFFFFF;
  --ian-bubble-edge:transparent;
  --evie-bubble:#E4E5E9;
  --composer-surface:rgba(255,255,255,.72);
}
/* 黑夜 ground: glossy black — a soft sheen falling from the top, like light
   on lacquer (the grid read as squares on the phone; Evie 10-17) */
body[data-theme="fjord"]::after{
  content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(130% 55% at 50% -8%,rgba(255,255,255,.10),transparent 62%),
    linear-gradient(180deg,rgba(255,255,255,.035),transparent 38%);
}
body:is([data-theme="fjord"],[data-theme="snow"]){background:var(--bg)}

/* bubbles and composer: hairline, no glow */
body:is([data-theme="fjord"],[data-theme="snow"]) #chat-list .bubble{box-shadow:none}
/* 纯白 bubbles: solid, no border, only a whisper of shadow (Evie 10-17, after a
   reference with plain white bubbles) */
body[data-theme="snow"] #chat-list .bubble:is(.ian,.evie){border-color:transparent;box-shadow:0 1px 2px rgba(40,44,52,.04),0 3px 10px rgba(40,44,52,.05)}

/* settings cards, Us cards, directory entries: frosted glass, after the
   liquid-glass recipe Evie found (rebuilt, not copied): blur + a little
   saturation, a top highlight, a faint bottom reflection, warm/cool hints on
   the side edges, and a gradient ring drawn with a border-box background (no
   pseudo-element, so nothing the cards already draw is disturbed). Glass is
   never nested: these are top-level surfaces only. */
body:is([data-theme="fjord"],[data-theme="snow"]) :where(.card),
body:is([data-theme="fjord"],[data-theme="snow"]) :is([data-us-group] .us-entry,#us-directory-list .us-entry),
body:is([data-theme="fjord"],[data-theme="snow"]) :is(#p-me .settings-menu-row,#p-me .settings-overview-chip){
  border:1px solid transparent;
  background:
    linear-gradient(var(--glass-fill),var(--glass-fill)) padding-box,
    linear-gradient(140deg,var(--glass-ring-a),var(--glass-ring-b) 45%,var(--glass-ring-c)) border-box;
  -webkit-backdrop-filter:blur(22px) saturate(1.6);backdrop-filter:blur(22px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 var(--glass-top),
    inset 0 -1px 0 var(--glass-bottom),
    inset 1px 0 0 rgba(255,150,185,.07),
    inset -1px 0 0 rgba(140,190,255,.09),
    var(--mono-shadow);
}
body[data-theme="fjord"]{
  --glass-fill:rgba(255,255,255,.022);
  --glass-ring-a:rgba(255,255,255,.30);--glass-ring-b:rgba(255,255,255,.05);--glass-ring-c:rgba(255,255,255,.16);
  --glass-top:rgba(255,255,255,.14);--glass-bottom:rgba(255,255,255,.03);
}
body[data-theme="snow"]{
  --glass-fill:rgba(255,255,255,.46);
  --glass-ring-a:rgba(255,255,255,.95);--glass-ring-b:rgba(255,255,255,.35);--glass-ring-c:rgba(255,255,255,.75);
  --glass-top:rgba(255,255,255,.9);--glass-bottom:rgba(255,255,255,.35);
}
body:is([data-theme="fjord"],[data-theme="snow"]) .us-page .us-entry-icon{color:var(--text);opacity:.55}

/* segmented controls: the chosen one is an outlined pill, not a fill */
body:is([data-theme="fjord"],[data-theme="snow"]) .seg{background:transparent;border-color:var(--mono-line)}
body:is([data-theme="fjord"],[data-theme="snow"]) .seg button.on{background:transparent;box-shadow:inset 0 0 0 1px var(--mono-line-strong);color:var(--text)}

/* call screen: drop the warm washes */
body:is([data-theme="fjord"],[data-theme="snow"]) .ian-call-overlay{
  background:radial-gradient(ellipse 80% 50% at 50% 0%,var(--mono-fill-strong),transparent 70%),var(--bg);
}
body:is([data-theme="fjord"],[data-theme="snow"]) .ian-call-text-entry button,
body:is([data-theme="fjord"],[data-theme="snow"]) .ian-call-control.video.on{
  background:transparent;background-image:none;color:var(--text);
  border:1px solid var(--mono-line-strong);box-shadow:none;
}

/* 黑夜 without white edges (Evie 10-17, after a reference with plain solid
   bubbles): no outlines, sheens or light rims anywhere; surfaces separate by
   tone only. The glass v2 rim in calendar.css is !important, hence the
   matching weight here. */
body[data-theme="fjord"]{
  --ian-bubble:#2A2A2D;
  --evie-bubble:#3C3C40;
  --composer-surface:#222225;
  --glass-ring-a:transparent;--glass-ring-b:transparent;--glass-ring-c:transparent;
  --glass-top:transparent;--glass-bottom:transparent;
  --glass-fill:rgba(255,255,255,.045);
}
body[data-theme="fjord"] #chat-list .bubble:is(.ian,.evie){border-color:transparent;background-image:none}
body[data-theme="fjord"] :is(#p-chat .chat-input-row,#drawer-btn,#p-chat .chat-search-btn,#p-chat .chat-call-btn,#p-chat .chat-header-profile,.ian-card-chip,.bloom-main){
  border-color:transparent!important;
  box-shadow:0 6px 18px rgba(0,0,0,.28)!important;
  background-color:rgba(255,255,255,.06)!important;
}
body[data-theme="fjord"] :where(.card),
body[data-theme="fjord"] :is([data-us-group] .us-entry,#us-directory-list .us-entry,#p-me .settings-menu-row,#p-me .settings-overview-chip){box-shadow:var(--mono-shadow)}
body:is([data-theme="fjord"],[data-theme="snow"]) #p-me .settings-menu-icon{background:var(--mono-fill-strong)}
body[data-theme="fjord"] .seg{border-color:transparent;background:rgba(255,255,255,.04)}
body[data-theme="fjord"] .seg button.on{box-shadow:none;background:rgba(255,255,255,.10)}
body[data-theme="fjord"] :is(.ian-call-top button,#ian-call-timer,.ian-call-control.mute,.ian-call-control.video,.ian-call-text-entry input,.ian-call-text-entry button,.ian-call-selfview){
  border-color:transparent;background-image:none;
  box-shadow:0 8px 20px rgba(0,0,0,.3);
  background-color:rgba(255,255,255,.08);
}
