/* ============================================================
   Duck Family · Chongqing 2027
   Concepte: «terrasses». Capçalera enganxosa, hero nocturn amb
   l'skyline de Chaotianmen, i seccions apilades com els nivells
   de la ciutat vertical. Contingut a 1120 px, targetes en graella.
   ============================================================ */
:root {
  /* color · tema «boira» (dia) */
  --bg: #E6EAEE;        /* boira freda */
  --bg-2: #F6F7F9;      /* superfície */
  --bg-3: #D8DEE4;      /* enfonsat */
  --fg: #19232E;        /* tinta */
  --fg-2: #56626F;      /* tinta suau */
  --line: #C7CED6;
  --red: #C8352B;   --red-soft: #F7DBD7;   --red-ink: #A3281F;     /* hot pot */
  --teal: #1E7A8A;  --teal-soft: #D3E8EB;  --teal-ink: #145D6A;    /* riu Jialing */
  --gold: #CF962A;  --gold-soft: #F6E5C2;  --gold-ink: #86590C;    /* fanalets */
  --violet: #6A58B3; --violet-soft: #E4DEF7; --violet-ink: #4D3F94;
  --green: #2E8B57; --green-soft: #D6EEDF; --green-ink: #1F6B42;
  --hero-top: #0F1B2B; --hero-mid: #1F3650; --hero-bottom: #0F1B2B;
  --hero-fg: #F3F6F9; --hero-fg-2: #B9C6D3;
  --sky-line: #0A121B; --window: #F6C86A;
  --shadow: 0 12px 32px -16px rgba(20, 30, 40, .35);
  --radius: 14px;
  /* tipografia */
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-zh: "Ma Shan Zheng", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B121C; --bg-2: #141D2A; --bg-3: #1C2836; --fg: #E7ECF1; --fg-2: #9AA7B5; --line: #2A3746;
    --red: #FF6155; --red-soft: #3B1F1E; --red-ink: #FF7E74;
    --teal: #45BFD0; --teal-soft: #153039; --teal-ink: #6FD3E1;
    --gold: #F1C25E; --gold-soft: #3A2F15; --gold-ink: #F6D07E;
    --violet: #A294EC; --violet-soft: #2A2545; --violet-ink: #BBB0F5;
    --green: #5DC58A; --green-soft: #17352A; --green-ink: #7FD6A4;
    --hero-top: #04080F; --hero-mid: #0E1B2C; --hero-bottom: #0B121C;
    --sky-line: #030609; --window: #FFD36E;
    --shadow: 0 12px 32px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B121C; --bg-2: #141D2A; --bg-3: #1C2836; --fg: #E7ECF1; --fg-2: #9AA7B5; --line: #2A3746;
  --red: #FF6155; --red-soft: #3B1F1E; --red-ink: #FF7E74;
  --teal: #45BFD0; --teal-soft: #153039; --teal-ink: #6FD3E1;
  --gold: #F1C25E; --gold-soft: #3A2F15; --gold-ink: #F6D07E;
  --violet: #A294EC; --violet-soft: #2A2545; --violet-ink: #BBB0F5;
  --green: #5DC58A; --green-soft: #17352A; --green-ink: #7FD6A4;
  --hero-top: #04080F; --hero-mid: #0E1B2C; --hero-bottom: #0B121C;
  --sky-line: #030609; --window: #FFD36E;
  --shadow: 0 12px 32px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
}
img, svg { max-width: 100%; }
a { color: var(--teal-ink); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
[hidden] { display: none !important; }
.container {
  max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.section { padding-block: 56px; }
.section + .section { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head .zh { font-family: var(--font-zh); font-size: 3.4rem; line-height: 1; color: var(--red); }
.sec-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); letter-spacing: -.01em; }
.sec-head > p { color: var(--fg-2); max-width: 62ch; flex-basis: 100%; }
.eyebrow { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.muted { color: var(--fg-2); }
.small { font-size: .9rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.zhtext { font-family: var(--font-cjk); }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- capçalera ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; padding-block: 6px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; text-decoration: none; color: var(--fg); white-space: nowrap; font-size: 1.05rem; }
.brand:hover { color: var(--fg); }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand small { font-weight: 500; color: var(--fg-2); font-size: .9rem; }
.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; order: 2; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--fg-2); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.nav a:hover, .nav a.active { background: var(--bg-3); color: var(--fg); }
.theme-btn {
  order: 3; margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--fg); display: grid; place-items: center; cursor: pointer; flex: none;
}
.theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .nav { order: 4; flex-basis: 100%; margin-inline: -4px; }
  .theme-btn { order: 3; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--hero-fg);
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-mid) 62%, var(--hero-bottom) 100%);
}
.hero .container { position: relative; z-index: 2; padding-block: 56px clamp(110px, 22vw, 240px); }
.skyline { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto; z-index: 1; display: block; pointer-events: none; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(3.2rem, 9vw, 6.6rem); font-weight: 800; letter-spacing: -.035em; line-height: .95; display: flex; align-items: baseline; gap: .22em; flex-wrap: wrap; margin-top: 10px; }
.hero h1 .zh { font-family: var(--font-zh); font-weight: 400; color: var(--gold); font-size: .78em; letter-spacing: 0; }
.hero .lede { max-width: 56ch; font-size: 1.12rem; color: var(--hero-fg-2); margin-top: 18px; }
.hero .lede b { color: var(--hero-fg); font-weight: 600; }
.countdown { margin-top: 30px; }
.cd-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--hero-fg-2); margin-bottom: 10px; font-family: var(--font-mono); }
.cd-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cd { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 12px 14px; min-width: 84px; text-align: center; }
.cd b { display: block; font-family: var(--font-mono); font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.cd span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--hero-fg-2); margin-top: 6px; }
.cd-msg { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.cd-msg a { color: var(--gold); }
.ducks { display: flex; gap: 22px; margin-top: 38px; flex-wrap: wrap; }
.duck { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 600; font-size: .9rem; color: var(--hero-fg); }
.duck svg { width: 68px; height: 68px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); }
@media (prefers-reduced-motion: no-preference) {
  .duck svg { transition: transform .25s ease; }
  .duck:hover svg { transform: translateY(-6px) rotate(-6deg); }
  .skyline .fog { animation: drift 22s ease-in-out infinite alternate; }
  .skyline .lt { animation: twinkle 2.4s ease-in-out infinite; }
  .skyline .lt:nth-child(2n) { animation-delay: .8s; }
  .skyline .lt:nth-child(3n) { animation-delay: 1.5s; }
}
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- ara mateix ---------- */
.live .grid { align-items: stretch; }
.live .card { display: flex; flex-direction: column; gap: 6px; }
.live .big { font-family: var(--font-mono); font-size: 2.1rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wx { display: flex; align-items: center; gap: 12px; }
.wx svg { width: 44px; height: 44px; flex: none; color: var(--teal); }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.wx-day { background: var(--bg-3); border-radius: 8px; padding: 6px 8px; font-size: .78rem; text-align: center; }
.wx-day b { display: block; font-family: var(--font-mono); font-weight: 600; }
.wx-day svg { width: 18px; height: 18px; display: block; margin: 2px auto; color: var(--teal); }
.fx-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.fx-row input { width: 90px; font: inherit; font-family: var(--font-mono); padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.fx-row output { font-family: var(--font-mono); font-weight: 600; }
.todayplan h3 { font-size: 1.15rem; margin-top: 2px; }

/* ---------- graelles i targetes ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p + p { margin-top: 8px; }
.card .zh { font-family: var(--font-zh); color: var(--red); font-size: 1.6rem; line-height: 1; margin-bottom: 6px; display: block; }
.card .zhtext { font-size: 1.1rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--bg-3); color: var(--fg-2); white-space: nowrap; }
.chip-ciutat { background: var(--teal-soft); color: var(--teal-ink); }
.chip-art { background: var(--violet-soft); color: var(--violet-ink); }
.chip-natura { background: var(--green-soft); color: var(--green-ink); }
.chip-tech { background: var(--gold-soft); color: var(--gold-ink); }
.chip-spa { background: var(--red-soft); color: var(--red-ink); }
.chip-vol { background: var(--bg-3); color: var(--fg-2); }
.chip-ex { background: var(--fg); color: var(--bg); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); font-weight: 600; text-decoration: none; cursor: pointer; font-size: .92rem; }
.btn:hover { border-color: var(--fg); color: var(--fg); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
.copy { border: 1px solid var(--line); background: var(--bg-3); border-radius: 8px; padding: 5px 10px; font-size: .74rem; font-weight: 600; cursor: pointer; color: var(--fg); white-space: nowrap; }
.copy:hover { border-color: var(--fg); }
.copy.ok { background: var(--green-soft); color: var(--green-ink); border-color: var(--green); }

/* ---------- calendari ---------- */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 28px; align-items: start; }
.cal { position: sticky; top: 76px; }
.cal h3 { font-size: 1.05rem; display: flex; justify-content: space-between; align-items: baseline; }
.cal h3 span { font-family: var(--font-mono); font-size: .8rem; color: var(--fg-2); font-weight: 500; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.cal-dow { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-2); text-align: center; padding: 4px 0; font-family: var(--font-mono); }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font-family: var(--font-mono); font-size: .9rem; color: var(--fg-2); background: transparent; border: 0; position: relative; padding: 0; }
.cal-day.trip { color: var(--fg); font-weight: 600; cursor: pointer; }
.cal-day.trip:hover { outline: 2px solid var(--fg); outline-offset: -2px; }
.cal-day.t-vol { background: var(--bg-3); }
.cal-day.t-ciutat { background: var(--teal-soft); }
.cal-day.t-art { background: var(--violet-soft); }
.cal-day.t-natura { background: var(--green-soft); }
.cal-day.t-tech { background: var(--gold-soft); }
.cal-day.t-spa { background: var(--red-soft); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--red); }
.cal-day .ex { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--fg); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.cal-flights { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.flight { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; align-items: start; }
.flight .mono { color: var(--fg-2); font-size: .8rem; padding-top: 2px; }
.flight b { display: block; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.fbtn { border: 1px solid var(--line); background: var(--bg-2); color: var(--fg-2); padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.fbtn:hover { color: var(--fg); border-color: var(--fg); }
.fbtn.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.days { display: flex; flex-direction: column; gap: 14px; }
.day { display: grid; grid-template-columns: 88px minmax(0, 1fr); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.day-rail { background: var(--bg-3); padding: 16px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.day-rail .dow { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-2); font-family: var(--font-mono); }
.day-rail .num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.day-rail .mon { font-size: .74rem; color: var(--fg-2); }
.day-rail .chip { margin-top: 10px; font-size: .62rem; padding: 2px 7px; }
.day.today .day-rail { background: var(--red); }
.day.today .day-rail .dow, .day.today .day-rail .num, .day.today .day-rail .mon { color: #fff; }
.day.today .day-rail .chip { background: rgba(255,255,255,.2); color: #fff; }
.day-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.block { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
.block + .block { border-top: 1px dashed var(--line); padding-top: 14px; }
.block .when { font-family: var(--font-mono); font-size: .78rem; color: var(--fg-2); padding-top: 4px; }
.block h3 { font-size: 1.05rem; margin-bottom: 4px; }
.block p { color: var(--fg-2); font-size: .95rem; }
.block .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.avis { display: inline-flex; gap: 6px; align-items: center; background: var(--red-soft); color: var(--red-ink); padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.maplink { font-size: .76rem; font-weight: 600; text-decoration: none; color: var(--teal-ink); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.maplink:hover { border-color: var(--teal-ink); }
@media (max-width: 860px) { .cal-wrap { grid-template-columns: 1fr; } .cal { position: static; } }
@media (max-width: 520px) { .block { grid-template-columns: 1fr; gap: 4px; } .day { grid-template-columns: 64px minmax(0, 1fr); } .day-body { padding: 14px; } .day-rail .num { font-size: 1.9rem; } }

/* ---------- mapa ---------- */
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.map-tools .muted { margin-left: auto; font-size: .82rem; }
#map.dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.9) saturate(.55); }
#map { height: 480px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-3); z-index: 0; }
.map-fallback { padding: 40px 20px; text-align: center; color: var(--fg-2); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--bg-2); color: var(--fg); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 14px 16px; line-height: 1.45; }
.leaflet-popup-content h4 { font-size: 1rem; margin-bottom: 2px; }
.leaflet-popup-content .zhtext { color: var(--fg-2); font-size: .9rem; }
.leaflet-popup-content p { margin: 6px 0 8px; font-size: .88rem; color: var(--fg-2); }
.leaflet-popup-content .links { display: flex; gap: 6px; flex-wrap: wrap; }
.leaflet-popup-content .links a { font-size: .74rem; font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--teal-ink); }
.leaflet-container a.leaflet-popup-close-button { color: var(--fg-2); }
.leaflet-bar a { background: var(--bg-2); color: var(--fg); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: var(--bg-3); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--bg-2) 85%, transparent) !important; color: var(--fg-2) !important; font-size: .68rem; }
.leaflet-control-attribution a { color: var(--fg-2) !important; }
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; margin-top: 20px; }
.place { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); font-size: .9rem; min-width: 0; text-align: left; color: var(--fg); cursor: pointer; }
.place:hover { border-color: var(--fg); }
.place .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 6px; }
.place b { display: block; }
.place .zhtext { color: var(--fg-2); font-size: .82rem; }
.dot-ciutat { background: var(--teal); } .dot-art { background: var(--violet); } .dot-natura { background: var(--green); }
.dot-tech { background: var(--gold); } .dot-base { background: var(--red); } .dot-transport { background: var(--fg-2); }

/* ---------- reserves ---------- */
.progress { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; margin: 10px 0 18px; }
.progress i { display: block; height: 100%; background: var(--teal); width: 0; transition: width .4s ease; }
.check { display: flex; flex-direction: column; gap: 8px; }
.ck { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); cursor: pointer; }
.ck input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); cursor: pointer; }
.ck .t { font-weight: 600; }
.ck .c { color: var(--fg-2); font-size: .88rem; margin-top: 2px; }
.ck.done .t { text-decoration: line-through; color: var(--fg-2); }
.ck.done { opacity: .72; }
.ck.urgent:not(.done) { border-color: var(--red); background: color-mix(in srgb, var(--red-soft) 40%, var(--bg-2)); }
.due { font-family: var(--font-mono); font-size: .74rem; text-align: right; white-space: nowrap; color: var(--fg-2); line-height: 1.4; }
.due.soon { color: var(--gold-ink); } .due.late { color: var(--red-ink); font-weight: 600; }
.due .q { display: block; font-family: var(--font-body); color: var(--fg-2); font-weight: 400; }
@media (max-width: 560px) { .ck { grid-template-columns: 24px minmax(0, 1fr); } .due { grid-column: 2; text-align: left; } }

/* ---------- pràctic ---------- */
.taxi { background: var(--bg-3); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.taxi .zhtext { font-size: 1.05rem; }
.emerg { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.emerg span { background: var(--bg-3); border-radius: 8px; padding: 6px 10px; font-size: .85rem; }
.emerg b { font-family: var(--font-mono); color: var(--red-ink); }
.phrases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.ph { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.ph .ca { font-size: .82rem; color: var(--fg-2); }
.ph .zh { font-family: var(--font-cjk); font-size: 1.45rem; line-height: 1.25; }
.ph .py { font-family: var(--font-mono); font-size: .78rem; color: var(--teal-ink); }
.sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 14px; flex-wrap: wrap; }
.sub-head h3 { font-size: 1.35rem; }
.sub-head p { color: var(--fg-2); font-size: .92rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { border: 1px solid var(--line); background: var(--bg-2); color: var(--fg-2); padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tab svg { width: 18px; height: 18px; }
.tab.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.bag { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.bag h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-2); margin-bottom: 8px; font-family: var(--font-mono); font-weight: 600; }
.bag label { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; padding: 5px 0; cursor: pointer; }
.bag input { accent-color: var(--teal); margin-top: 3px; flex: none; }
.bag label.done span { text-decoration: line-through; color: var(--fg-2); }
.bag-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: .88rem; color: var(--fg-2); flex-wrap: wrap; }

/* ---------- menjar ---------- */
.food .card { display: flex; flex-direction: column; gap: 4px; }
.food .card h3 { margin-bottom: 0; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.spice { display: inline-flex; gap: 3px; }
.spice i { width: 8px; height: 14px; border-radius: 3px; background: var(--bg-3); display: block; }
.spice i.on { background: var(--red); }
.hotpot { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; margin-bottom: 20px; }
.hotpot h3 { grid-column: 1 / -1; font-size: 1.25rem; }
.hotpot dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hotpot dt { font-family: var(--font-cjk); font-size: 1.15rem; }
.hotpot dt small { font-family: var(--font-mono); color: var(--teal-ink); font-size: .74rem; margin-left: 6px; }
.hotpot dd { margin: 0; color: var(--fg-2); font-size: .9rem; }

/* ---------- jugar ---------- */
.quiz { max-width: 680px; }
.quiz .q-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--font-mono); font-size: .78rem; color: var(--fg-2); margin-bottom: 10px; }
.quiz h3 { font-size: 1.3rem; }
.q-opts { display: grid; gap: 8px; margin-top: 16px; }
.q-opt { text-align: left; border: 1px solid var(--line); background: var(--bg-3); padding: 12px 14px; border-radius: 10px; cursor: pointer; color: var(--fg); font-size: .95rem; }
.q-opt:hover:not([disabled]) { border-color: var(--fg); }
.q-opt.ok { background: var(--green-soft); border-color: var(--green); color: var(--fg); }
.q-opt.ko { background: var(--red-soft); border-color: var(--red); color: var(--fg); }
.q-tip { margin-top: 14px; color: var(--fg-2); font-size: .92rem; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.q-result { text-align: center; padding: 10px 0; }
.q-result .big { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; line-height: 1; }
.q-result svg { width: 96px; height: 96px; margin: 10px auto; display: block; }
.fact { display: flex; flex-direction: column; gap: 12px; }
.fact p { font-size: 1.1rem; line-height: 1.5; }
.fact .fact-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.phrase-day .zh { font-family: var(--font-cjk); font-size: 2.3rem; line-height: 1.2; color: var(--fg); }
.phrase-day .py { font-family: var(--font-mono); color: var(--teal-ink); }
.vs { width: 100%; border-collapse: collapse; font-size: .92rem; }
.vs th, .vs td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.vs th { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-2); font-weight: 600; }
.vs td:first-child { color: var(--fg-2); font-weight: 600; width: 22%; }
.vs td:last-child { color: var(--red-ink); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* ---------- llibres ---------- */
.book { display: flex; flex-direction: column; gap: 6px; }
.book h3 { margin-bottom: 0; font-size: 1.05rem; }
.book .author { color: var(--fg-2); font-size: .9rem; }
.book .when { align-self: flex-start; margin-top: 4px; }

/* ---------- pressupost ---------- */
.budget { display: flex; flex-direction: column; gap: 12px; }
.brow { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 12px; align-items: center; }
.brow .l { display: flex; justify-content: space-between; gap: 10px; font-size: .95rem; align-items: baseline; }
.brow .l small { color: var(--fg-2); font-size: .8rem; }
.brow .n { font-family: var(--font-mono); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bbar { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bbar i { display: block; height: 100%; background: var(--red); }
.bbar i.estat-donat { background: var(--teal); }
.bbar i.estat-ampliar { background: var(--gold); }
.btotal { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.btotal .card { flex: 1 1 200px; }
.btotal .big { font-family: var(--font-mono); font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--fg-2); margin-top: 14px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 5px; }

/* ---------- enllaços ---------- */
.linkgroup h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-2); font-family: var(--font-mono); font-weight: 600; margin-bottom: 10px; }
.linklist { display: flex; flex-direction: column; gap: 6px; }
.linklist a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); text-decoration: none; color: var(--fg); }
.linklist a:hover { border-color: var(--teal-ink); }
.linklist b { display: block; font-size: .95rem; }
.linklist span { color: var(--fg-2); font-size: .84rem; }

/* ---------- peu ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--fg-2); font-size: .88rem; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer .zh { font-family: var(--font-zh); font-size: 1.6rem; color: var(--red); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
