/* theme_35.css — version 35 "elegant purple" (chosen 26 Nov 2026: the style
   of Nogizaka46 — the feel only: no name, logo, members or artwork).
   One deep purple accent, lavender fills, airy cards, a Mincho-style serif
   for headings, light tabular numbers. Green = up and red = down, always.
   Loaded last. Active with body.theme-purple (Settings → Appearance; the
   v35 default follows the phone / PC light-dark setting). */

body.theme-purple {
  --serif35: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif TC", "Songti TC", Georgia, serif;
  --sans35: "Hiragino Sans", "Noto Sans JP", "Noto Sans TC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r35: 18px;
  font-family: var(--sans35);
  letter-spacing: .01em;
}
/* dark plum */
body.theme-purple:not(.theme-light) {
  --bg: #140d1a; --bg-elev: #1e1527; --bg-card: #1e1527; --border: #33263f;
  --text: #f3ecf8; --text-dim: #b4a6c2; --accent: #b07ccb;
  --green: #3dbe84; --red: #e0566e; --amber: #d9a04a;
  --lav35: #2a1d36; --plum35: #b07ccb; --btn35: #7e3f9c; --glow35: rgba(176, 124, 203, .16);
  color-scheme: dark;
}
/* light lavender */
body.theme-purple.theme-light {
  --bg: #f8f5fb; --bg-elev: #ffffff; --bg-card: #ffffff; --border: #e6ddee;
  --text: #2a2133; --text-dim: #7a6f86; --accent: #6e2a85;
  --green: #2e9e6b; --red: #c9445a; --amber: #b9802a;
  --lav35: #efe7f6; --plum35: #6e2a85; --btn35: #6e2a85; --glow35: rgba(110, 42, 133, .10);
  color-scheme: light;
}

/* ── type ───────────────────────────────────────────────────────────── */
body.theme-purple #screen-title,
body.theme-purple .card-title,
body.theme-purple .h30,
body.theme-purple h1, body.theme-purple h2, body.theme-purple h3,
body.theme-purple .brand30 {
  font-family: var(--serif35); font-weight: 500; letter-spacing: .07em;
}
body.theme-purple .brand30 { color: var(--plum35); }
body.theme-purple .brand30 small { font-family: var(--sans35); letter-spacing: .12em; color: var(--text-dim); }
body.theme-purple #screen-title { font-size: 22px; }
body.theme-purple .card-value, body.theme-purple .yf-big, body.theme-purple .lv35 b,
body.theme-purple .holding-row .val, body.theme-purple .mono {
  font-family: "SF Pro Display", "Segoe UI", system-ui, sans-serif; font-variant-numeric: tabular-nums;
  font-weight: 400; letter-spacing: .01em;
}
body.theme-purple .lv35 small, body.theme-purple .muted, body.theme-purple .dim30 { letter-spacing: .04em; }

/* ── cards ──────────────────────────────────────────────────────────── */
body.theme-purple .card {
  border-radius: var(--r35); border: 1px solid var(--border); background: var(--bg-card);
  box-shadow: 0 1px 0 var(--glow35);
}
body.theme-purple .card > .h30:first-child,
body.theme-purple .card > .card-title:first-child,
body.theme-purple details.card > summary.h30 {
  padding-bottom: 10px; margin-bottom: 10px;
  background: linear-gradient(var(--plum35), var(--plum35)) left bottom / 28px 2px no-repeat;
}
body.theme-purple .lv35 > div { border-radius: 14px; background: var(--lav35); border: 1px solid transparent; }
body.theme-purple .lv35 > div.on35 { border-color: var(--plum35); }
body.theme-purple #content > .card:first-child,
body.theme-purple .yf-hero {
  background: radial-gradient(120% 140% at 100% 0%, var(--lav35) 0%, var(--bg-card) 60%);
}

/* ── navigation ─────────────────────────────────────────────────────── */
body.theme-purple .topbar { background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent); border-color: var(--border); }
body.theme-purple .tabbar { background: var(--bg-elev); border-color: var(--border); }
body.theme-purple:not(.theme-light) .tabbar { background: linear-gradient(180deg, #1e1527 0%, #170f1e 100%); }
body.theme-purple.theme-light .tabbar { background: linear-gradient(180deg, #ffffff 0%, #f3edf8 100%); }
body.theme-purple .tabbar .tab { border-radius: 12px; letter-spacing: .04em; }
body.theme-purple .tabbar .tab.active {
  background: var(--btn35) !important; color: #fff !important; box-shadow: 0 6px 18px var(--glow35);
}
body.theme-purple .tab-sec { letter-spacing: .14em; color: var(--text-dim); }
body.theme-purple .segmented, body.theme-purple .seg35 { border-radius: 14px; background: var(--lav35); border-color: transparent; }
body.theme-purple .segmented button { border-radius: 10px; letter-spacing: .03em; }
body.theme-purple .segmented button.on, body.theme-purple .segmented button.active {
  background: var(--btn35) !important; color: #fff !important;
}

/* ── controls ───────────────────────────────────────────────────────── */
body.theme-purple .btn30, body.theme-purple button.primary, body.theme-purple .primary {
  border-radius: 999px; letter-spacing: .04em;
}
body.theme-purple .btn30.pri, body.theme-purple button.primary, body.theme-purple .primary {
  background: var(--btn35); border-color: var(--btn35); color: #fff;
}
body.theme-purple .pill30 { border-radius: 999px; letter-spacing: .03em; }
body.theme-purple .pill30.ok { color: var(--green); }
body.theme-purple input, body.theme-purple select, body.theme-purple textarea {
  border-radius: 12px; border-color: var(--border);
}
body.theme-purple input:focus, body.theme-purple select:focus, body.theme-purple textarea:focus {
  outline: 2px solid var(--glow35); border-color: var(--plum35);
}
body.theme-purple a { color: var(--plum35); }
body.theme-purple .tbl30 th { letter-spacing: .08em; font-weight: 500; color: var(--text-dim); }
body.theme-purple .tbl30 td, body.theme-purple .tbl30 th { border-color: var(--border); }

/* ── older screens with fixed colours written into the page ─────────── */
body.theme-purple [style*="background:#181a20"], body.theme-purple [style*="background: #181a20"],
body.theme-purple [style*="background:#22262e"], body.theme-purple [style*="background: #22262e"],
body.theme-purple [style*="background:#1a1d24"], body.theme-purple [style*="background:#262a33"] {
  background: var(--lav35) !important; color: var(--text) !important;
}
body.theme-purple [style*="background:#375a7f"], body.theme-purple [style*="background: #375a7f"] {
  background: var(--btn35) !important; color: #fff !important;
}
body.theme-purple [style*="color:#9aa0a8"], body.theme-purple [style*="color: #9aa0a8"],
body.theme-purple [style*="color:#8b929f"], body.theme-purple [style*="color:#8e9ab1"] {
  color: var(--text-dim) !important;
}

/* ── motion: calm ───────────────────────────────────────────────────── */
body.theme-purple #content .card { animation-duration: .22s; }
@media (prefers-reduced-motion: reduce) { body.theme-purple * { animation: none !important; transition: none !important; } }

/* ── v35 Today screen (works in every theme) ────────────────────────── */
.t35-hello { font-family: var(--serif35, Georgia, serif); font-size: 28px; letter-spacing: .06em; margin: 4px 4px 14px; }
.t35-hello small { display: block; font-family: var(--sans35, system-ui); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
.t35-hero .t35-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.t35-big { font-family: "SF Pro Display", "Segoe UI", system-ui, sans-serif; font-size: 42px; font-weight: 300;
  font-variant-numeric: tabular-nums; margin: 4px 0 0; }
.t35-chg { font-size: 15px; font-variant-numeric: tabular-nums; }
.t35-mini { margin-top: 12px; }
.t35-kv td:last-child { text-align: right; }
.t35-act { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 0;
  border-top: 1px solid var(--border); }
.t35-act:first-of-type { border-top: 0; }
.t35-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--lav35, var(--bg-elev)); color: var(--plum35, var(--accent)); }
.t35-at { font-weight: 500; } .t35-aw { font-size: 12px; }
.b35 { font-size: 11px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .03em; }
.b35-ok { background: rgba(46, 158, 107, .12); background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.b35-test { background: rgba(185, 128, 42, .12); background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.b35-info { background: var(--lav35, var(--bg-elev)); color: var(--text-dim); }
.t35-sess { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.t35-slot { flex: 1; min-width: 130px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); }
.t35-slot.on { box-shadow: inset 0 0 0 1px var(--plum35, var(--accent)); border-color: var(--plum35, var(--accent)); }
.t35-slot small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.t35-slot b { font-variant-numeric: tabular-nums; font-weight: 500; }

.b35-none { background: rgba(122, 111, 134, .14); background: color-mix(in srgb, var(--text-dim) 14%, transparent); color: var(--text-dim); text-decoration: none; }
.ev35-note { border-left: 3px solid var(--plum35, var(--accent)); padding: 8px 12px; border-radius: 0 10px 10px 0;
  background: var(--lav35, var(--bg-elev)); font-size: 13px; margin: 8px 0; }

/* v35: the stock page's top bar was hard-coded dark — in the light purple
   look the symbol was dark-on-dark (screenshot 28 Nov 2026). */
body.theme-purple .sp-bar { background: rgba(20, 13, 26, 0.94); color: var(--text); }
body.theme-purple.theme-light .sp-bar { background: rgba(248, 245, 251, 0.94); }
body.theme-purple .sp-sym { color: var(--text); }
body.theme-purple .sp-name { color: var(--text-dim); }

/* v35: volume & buy / sell reads on the stock page */
.sp-vsig { margin-top: 12px; padding: 12px 14px; }
.sp-vsig .vs-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.sp-vsig .vs-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 14px; margin-bottom: 10px; }
.sp-vsig .vs-nums small { display: block; color: var(--text-dim); font-size: 11px; }
.sp-vsig .vs-nums b { font-size: 16px; }
.sp-vsig .vs-nums i { display: block; color: var(--text-dim); font-size: 11px; font-style: normal; }
.sp-vsig .vs-sub { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin: 6px 0 4px; }
.sp-vsig .vs-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--border); }
.sp-vsig .vs-side { flex: 0 0 82px; font-size: 12px; font-weight: 700; }
.sp-vsig .vs-txt { flex: 1; min-width: 0; }
.sp-vsig .vs-ev { font-size: 12px; margin-top: 2px; }
.sp-vsig .vs-rec summary { cursor: pointer; color: var(--text-dim); margin: 8px 0 2px; }
.sp-vsig .vs-note { font-size: 11px; margin-top: 8px; }


/* ── v35.1: the light purple look, everywhere ──────────────────────────
   Older screens (v26–v33) wrote dark colours straight into their CSS and
   HTML. In the light look each of them is mapped to the lavender palette;
   the dark look is untouched. Found by scanning every stylesheet and every
   page script for dark backgrounds / strokes (28 Nov 2026). */
body.theme-purple.theme-light,
body.theme-purple.theme-light #content { background: var(--bg); color: var(--text); }
body.theme-purple.theme-light .topbar { background: rgba(248, 245, 251, .94); }
body.theme-purple.theme-light code,
body.theme-purple.theme-light pre,
body.theme-purple.theme-light .calcstep pre { background: var(--lav35); color: var(--text); }
body.theme-purple.theme-light .proposal-card,
body.theme-purple.theme-light .setup-card,
body.theme-purple.theme-light .detail-sheet,
body.theme-purple.theme-light .more-sheet,
body.theme-purple.theme-light .sheet,
body.theme-purple.theme-light .modal,
body.theme-purple.theme-light .cmdk30 .box,
body.theme-purple.theme-light .chatlist33 { background: var(--bg-card); color: var(--text); border-color: var(--border);
  box-shadow: 0 12px 40px rgba(110, 42, 133, .12); }
body.theme-purple.theme-light .proposal-rationale,
body.theme-purple.theme-light .htable tr.sub td,
body.theme-purple.theme-light .bar30,
body.theme-purple.theme-light .detail-close,
body.theme-purple.theme-light .holding-row.tappable:active { background: var(--lav35); color: var(--text); }
body.theme-purple.theme-light .vote-row { border-bottom-color: var(--border); }
body.theme-purple.theme-light .skel,
body.theme-purple.theme-light .skel-card {
  background: linear-gradient(100deg, #efe7f6 30%, #f8f3fc 50%, #efe7f6 70%); background-size: 200% 100%; }
body.theme-purple.theme-light .summary-card {
  background: radial-gradient(120% 140% at 100% 0%, var(--lav35) 0%, var(--bg-card) 60%); }
body.theme-purple.theme-light .detail-overlay,
body.theme-purple.theme-light .more-overlay,
body.theme-purple.theme-light .cmdk30 { background: rgba(42, 33, 51, .28); }
body.theme-purple.theme-light .toast { box-shadow: 0 6px 18px rgba(110, 42, 133, .18); }
body.theme-purple.theme-light #ticker34 { background: rgba(248, 245, 251, .96); color: var(--text); border-color: var(--border); }
body.theme-purple.theme-light .msg30.me { background: var(--lav35); color: var(--text); }

/* colours written into page HTML (style="…") */
body.theme-purple.theme-light [style*="background:#181a20"], body.theme-purple.theme-light [style*="background: #181a20"],
body.theme-purple.theme-light [style*="background:#22262e"], body.theme-purple.theme-light [style*="background: #22262e"],
body.theme-purple.theme-light [style*="background:#1d1f24"], body.theme-purple.theme-light [style*="background:#1a1d24"],
body.theme-purple.theme-light [style*="background:#262a33"], body.theme-purple.theme-light [style*="background:#2a2a2a"],
body.theme-purple.theme-light [style*="background: #2a2a2a"], body.theme-purple.theme-light [style*="background:#2a2e38"],
body.theme-purple.theme-light [style*="background:#2a2e36"], body.theme-purple.theme-light [style*="background:#14161b"],
body.theme-purple.theme-light [style*="background:#1a1a1a"], body.theme-purple.theme-light [style*="background:#222"] {
  background: var(--lav35) !important; color: var(--text) !important; border-color: var(--border) !important; }
body.theme-purple.theme-light [style*="background:#0e0f13"],
body.theme-purple.theme-light [style*="background:rgba(10,12,18"] {
  background: rgba(248, 245, 251, .98) !important; color: var(--text) !important; }
body.theme-purple.theme-light [style*="background:#3a1416"] { background: #fbe9ec !important; color: var(--red) !important; }
body.theme-purple.theme-light [style*="color:#e8eef6"], body.theme-purple.theme-light [style*="color:#fff;"],
body.theme-purple.theme-light [style*="color:#ddd"], body.theme-purple.theme-light [style*="color: #ddd"] { color: var(--text) !important; }
body.theme-purple.theme-light [style*="color:#8b929c"], body.theme-purple.theme-light [style*="color:#8b929f"] { color: var(--text-dim) !important; }
body.theme-purple.theme-light [style*="border:1px solid #2a2f3a"] { border-color: var(--border) !important; }

/* SVG charts drawn with fixed dark lines */
body.theme-purple.theme-light [stroke="#262a33"], body.theme-purple.theme-light [stroke="#3a3f4b"],
body.theme-purple.theme-light [stroke="#3a4766"], body.theme-purple.theme-light [stroke="#1f2940"],
body.theme-purple.theme-light [stroke="#2a2f3a"] { stroke: #ddd2e7; }
body.theme-purple.theme-light [stroke="#14161b"], body.theme-purple.theme-light [stroke="#0b0f17"] { stroke: #ffffff; }

/* ── v35.2 / 35.8: five main tabs + More where the bar is at the bottom ──
   Phones and the iPad held upright: Today · Portfolio · Auto · Markets ·
   Ideas · More (More opens the rest grouped by section). iPad landscape and
   the PC have the sidebar, with room for every screen — all of them show
   there, under their section headings, and there is no More (asked 28 Nov). */
@media not all and (orientation: landscape) and (min-width: 700px) and (min-height: 500px) {
  .tabbar .tab[data-group="more"] { display: none !important; }
  .tabbar .tab-sec { display: none !important; }
  .tabbar .tabbtn-more { display: block !important; }
  .tabbar { overflow-x: hidden; justify-content: space-around; }
  .tabbar .tab { flex: 1 1 0; min-width: 0; max-width: 160px; }
}
@media (orientation: landscape) and (min-width: 700px) and (min-height: 500px) {
  .tabbar .tab, .tabbar .tab[data-group="more"] { display: flex !important; flex: 0 0 auto; padding: 9px 14px; }
  .tabbar .tabbtn-more { display: none !important; }
  .tabbar .tab-sec { display: block !important; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--text-dim); padding: 12px 14px 2px; }
  .tabbar .tab.sub { padding-left: 22px; font-size: 13.5px; }
}
.more-sec { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); padding: 10px 12px 2px; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4px; }
.more-grid .more-item { padding: 12px 10px; font-size: 15px; gap: 10px; }
@media (min-width: 700px) {
  .more-overlay { align-items: center; }
  .more-sheet { max-width: 760px; border-radius: 18px; max-height: 86vh; }
  .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 6px; }
  .more-item { padding: 11px 12px; font-size: 15px; }
}
body.theme-purple .more-item.active { background: var(--lav35); color: var(--plum35); }

/* ── v35.2: nothing may be wider than the screen ─────────────────────────
   One long unbreakable line (the news "why" on Today, the PC address in
   Settings) made the whole page wider than the phone / iPad, so it slid
   sideways and cards were cut off. Long text now wraps; wide tables scroll
   inside their own card; the page itself never scrolls sideways. */
html, body { max-width: 100%; overflow-x: hidden; }
#content { min-width: 0; overflow-x: hidden; overflow-x: clip; }
#content > *, .card { min-width: 0; max-width: 100%; box-sizing: border-box; }
.card-row { gap: 12px; }
.card-row .lbl { flex: 0 0 auto; }
.card-row .val { min-width: 0; text-align: right; overflow-wrap: anywhere; word-break: break-word; }
.tbl30 th:first-child, .tbl30 td:first-child { white-space: normal; }
.t35-kv td { white-space: normal; }
.t35-kv td:first-child { white-space: nowrap; padding-right: 14px; }
.card:has(> .tbl30), .card:has(> table), .card:has(.htable), .card:has(.mdt30) { overflow-x: auto; }
.note30, .muted, .dim30, p { overflow-wrap: anywhere; }

/* v35.4: drag-to-read on every curve (Chart36) */
.c36-wrap { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.c36-read { font-size: 12px; min-height: 18px; margin: 4px 2px 0; font-variant-numeric: tabular-nums; }
.hc-svg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* v35.6: trend & news — market · sector · stock */
.sp-olk { margin-top: 12px; padding: 12px 14px; }
.sp-olk .vs-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.sp-olk .vs-sub { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin: 10px 0 4px; display: flex; gap: 8px; align-items: center; }
.sp-olk .vs-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sp-olk .vs-nums small { display: block; color: var(--text-dim); font-size: 11px; }
.sp-olk .vs-nums i { display: block; color: var(--text-dim); font-size: 11px; font-style: normal; }
.sp-olk .vs-ev { font-size: 12px; margin-top: 4px; }
.ol-bar { display: grid; grid-template-columns: 64px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; margin: 3px 0; }
.ol-track { height: 8px; border-radius: 99px; background: var(--lav35, rgba(128,128,128,.15)); overflow: hidden; }
.ol-track > div { height: 100%; border-radius: 99px; }
.ol-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.ol-news { border-top: 1px solid var(--border); padding: 8px 0; }
.ol-nh { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ol-sc { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 22px; }
.ol-heads { margin: 4px 0 0 16px; padding: 0; font-size: 12px; color: var(--text-dim); }
.ol-tilt { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: var(--lav35, rgba(128,128,128,.1)); font-size: 13px; }

/* v35.7: the stock analysis card */
.sp-plan36 { padding: 14px 16px; margin-bottom: 12px; }
.p36-verdict { padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; margin: 4px 0 10px; border-left: 4px solid var(--text-dim); background: var(--lav35, rgba(128,128,128,.1)); }
.p36-verdict.p36-go { border-left-color: var(--green); }
.p36-verdict.p36-wait { border-left-color: var(--amber, #d9a04a); }
.p36-verdict.p36-watch { border-left-color: var(--plum35, var(--accent)); }
.p36-blocks { font-size: 13px; color: var(--amber, #d9a04a); margin: 6px 0; }
.p36-c { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; font-size: 13px; padding: 3px 0; color: var(--text-dim); }
.p36-c.ok { color: var(--text); }
.p36-c.ok span { color: var(--green); }
.p36-c i { font-style: normal; font-variant-numeric: tabular-nums; }
.p36-odds { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.p36-fifths { display: flex; gap: 3px; flex: 0 0 auto; }
.p36-fifths span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; background: var(--lav35, rgba(128,128,128,.15)); color: var(--text-dim); }
.p36-fifths span.on { background: var(--btn35, var(--accent)); color: #fff; }
.p36-rules { margin-top: 8px; font-size: 12px; }
.sp-plan36 .vs-sub { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin: 12px 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp-plan36 .vs-ev { font-size: 12px; margin-top: 4px; }
.p36-sl { font-size: 13px; padding: 4px 0; }
.p36-sl.up b { color: var(--green); } .p36-sl.down b { color: var(--red); }
.p36-sl .muted { font-size: 12px; margin-left: 18px; }
.p36-choice { margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); font-size: 13px; display: grid; gap: 4px; }
.p36-choice.fund { border-color: var(--plum35, var(--accent)); background: var(--lav35, rgba(128,128,128,.08)); }
.p36-choice .muted { font-size: 12px; }

/* v35.8: a one-tap way back to the Dashboard from Today */

/* ── v35.9: the bottom of the phone is used ──────────────────────────────
   The tab bar kept the whole home-indicator strip (34pt) empty under it.
   The buttons now sit lower and larger; only a thin strip is left for the
   home indicator. */
@media not all and (orientation: landscape) and (min-width: 700px) and (min-height: 500px) {
  .tabbar { padding-top: 6px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 2px); }   /* v35.13: never under the home-indicator strip */
  .tabbar .tab, .tabbar .tabbtn-more { padding: 7px 0 5px; }
  .tabbar .tab .ico { font-size: 22px; line-height: 1.15; }
  .tabbar .tab span:not(.ico):not(.nb30) { font-size: 11.5px; letter-spacing: .03em; }
}

/* ── v35.9: more of the elegant purple look ──────────────────────────────
   (The style of Nogizaka46 as asked — the feel only: no name, logo or
   artwork.) A deeper signature purple with a soft violet gradient, lavender
   mist in the background, white cards edged by a fine purple hairline, a
   double rule under the title bar, Mincho headings with a small diamond. */
body.theme-purple {
  --sig35: #7b2a8f; --sig35b: #a65fbf; --mist35: rgba(123, 42, 143, .09);
  --grad35: linear-gradient(135deg, var(--sig35) 0%, var(--sig35b) 100%);
}
body.theme-purple.theme-light {
  background:
    radial-gradient(900px 520px at 105% -8%, rgba(166, 95, 191, .16), transparent 62%),
    radial-gradient(760px 460px at -12% 108%, rgba(123, 42, 143, .10), transparent 60%),
    #faf7fc;
  background-attachment: fixed;
}
body.theme-purple:not(.theme-light) {
  background:
    radial-gradient(900px 520px at 105% -8%, rgba(166, 95, 191, .20), transparent 62%),
    radial-gradient(760px 460px at -12% 108%, rgba(123, 42, 143, .16), transparent 60%),
    #130b19;
  background-attachment: fixed;
}
body.theme-purple #content, body.theme-purple.theme-light #content { background: transparent; }
body.theme-purple .topbar { box-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 var(--mist35); }
body.theme-purple .card { position: relative; }
body.theme-purple .card::before {
  content: ''; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--sig35), var(--sig35b) 35%, rgba(166, 95, 191, 0) 75%); opacity: .55;
}
body.theme-purple.theme-light .card { box-shadow: 0 8px 26px rgba(123, 42, 143, .07); border-color: #ece2f3; }
body.theme-purple .card > .h30:first-child,
body.theme-purple .card > .card-title:first-child,
body.theme-purple details.card > summary.h30 {
  background: linear-gradient(90deg, var(--sig35), var(--sig35b)) left bottom / 34px 2px no-repeat;
}
body.theme-purple .h30::before, body.theme-purple .card-title::before {
  content: '◇'; font-family: var(--sans35); font-size: .72em; color: var(--sig35b); margin-right: 8px; position: relative; top: -1px;
}
body.theme-purple .tabbar .tab.active,
body.theme-purple .segmented button.on, body.theme-purple .segmented button.active,
body.theme-purple .btn30.pri, body.theme-purple button.primary, body.theme-purple .primary,
body.theme-purple .p36-fifths span.on {
  background: var(--grad35) !important; border-color: transparent !important; color: #fff !important;
  box-shadow: 0 6px 16px rgba(123, 42, 143, .22);
}
body.theme-purple .t35-hello { font-family: var(--serif35); color: var(--sig35); }
body.theme-purple.theme-light .t35-big, body.theme-purple.theme-light .hc-big { color: #33173f; }
body.theme-purple .brand30 { letter-spacing: .16em; }
body.theme-purple .pill30.ok { border-color: rgba(46, 158, 107, .35); }
body.theme-purple .chip30.on, body.theme-purple #subnav30 .chip30.on {
  background: rgba(166, 95, 191, .14); border-color: var(--sig35b); color: var(--sig35);
}
body.theme-purple.theme-light .tabbar { background: rgba(255, 255, 255, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -1px 0 #efe6f5, 0 -6px 20px rgba(123, 42, 143, .05); }
body.theme-purple:not(.theme-light) .t35-hello { color: #d9b8ea; }
body.theme-purple:not(.theme-light) .chip30.on, body.theme-purple:not(.theme-light) #subnav30 .chip30.on { color: #ecd6f6; }
@media not all and (orientation: landscape) and (min-width: 700px) and (min-height: 500px) {
  .tabbar .tabbtn-more { font-size: 20px; line-height: 1.15; }
}

/* v35.10: pull the bottom bar into the strip the iPhone home-screen app
   leaves below its viewport (phone_36.js measures it as --vgap) */
/* v35.12: the strip is outside the page — iOS does not let a home-screen
   web app draw there (35.11 pulled the bar into it and it was cut off).
   So the bar stays above it, without its own home-indicator padding, and
   the strip is painted the bar's colour: one continuous bar to the edge. */
/* v35.14: when the page itself stops short of the glass (the iPhone home-
   screen app: screen 852 vs page ~792), the home-indicator strip is already
   outside the page — the bar's own safe-area padding was a second, wasted
   strip. The bar now ends right at the last drawable line. The iPad's page
   reaches the glass (no gap), so it keeps its padding and nothing is hidden. */
/* v35.16: when the page stops short of the glass (screen − page = --vgap),
   the home-indicator strip is already below the page, so the bar drops its
   own safe-area padding and sits on the last drawable line (screenshot
   28 Nov 23:11: ~90pt empty under the buttons). The top is not touched. */
html.vgap36 .tabbar { padding-bottom: 8px !important; }
html.vgap36 .tabbar, html.bar36 .tabbar {
  background: var(--bar36, #fbf8fd) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
