/* The Table (/play) in the sparrow-seal look (JP, 19 Nov 2026). Loaded after the page's own styles. The felt stays green
   (it is the table); everything around it follows light (daylight paper) and dark (night, one lantern). */
html[data-mode=dark]{--room:#0a1a1b;--panel:#0d2021;--panel-line:rgba(217,180,108,.28);--ink:#e8decb;--muted:#b3b9ae;--gold:#d9b46c;--gold-deep:#b8913f}
/* Light paper is for the surfaces that sit on top (sheets, cards, the walkthrough); the table and its bar sit on the night painting in both modes. */
html[data-mode=light] .card,html[data-mode=light] #tour-card,html[data-mode=light] #coach-card{--panel:#f8f1e1;--panel-line:rgba(31,38,35,.26);--ink:#1f2623;--muted:#4a544e;--gold:#8a6420;--gold-deep:#9a7424;color:var(--ink)}
html[data-mode=light] .card .btn:not(.gold):not(.danger),html[data-mode=light] #tour-card .btn:not(.gold):not(.danger){background:var(--panel);color:var(--ink);border-color:var(--panel-line)}
.btn.gold{background:var(--red);color:var(--redtx);border-color:transparent}
.home-btn svg{display:block;width:100%;height:100%;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}
.set-item .lantern-switch{margin:6px 0}
html[data-mode=light] .sheet{background:rgba(60,45,20,.45)}
/* brand.css sets the light paper colours on the whole page; the table and its bar are night in both modes */
html[data-mode=light] #app{--ink:#f3ecdc;--muted:#b9cbbf;--gold:#e9c784;--gold-deep:#b8913f;--panel:#122c27;--panel-line:#3f6a5c;color:var(--ink)}
html[data-mode=light] #app .btn:not(.gold):not(.danger){background:linear-gradient(#1c3d35,#11291f);color:var(--ink);border-color:var(--gold-deep)}
html[data-mode=light] #app .btn.ghost{background:transparent;border-color:var(--panel-line)}

/* Light mode, inside the sheets (account, settings, Learn, progress): fields, chips and tabs that kept the dark-green look become paper (JP, 19 Nov 2026). */
html[data-mode=light] .card{--field:#fffaf0}
html[data-mode=light] .card :is(.tabs button,.set-choice,.unit,.choice,.country-row select,.text-in,.agechip,.badge,.podium li,.set-group,.lvlbar):not([aria-pressed=true]):not([aria-selected=true]):not(.right):not(.wrong):not(.on){background:#fffaf0;color:var(--ink);border-color:var(--panel-line)}
html[data-mode=light] .card :is(.agechip,.set-choice)[aria-pressed=true],html[data-mode=light] .card .tabs button[aria-selected=true]{background:#f1d597;color:#22190a;border-color:#9a7424}
html[data-mode=light] .card .medal.locked{background:#e9dfc7}
/* The enlarged tile's card (JP, 19 Nov 2026: "the text under the tile is really hard to see in dark mode"): an opaque night panel in both modes, so the plates behind never show through, with a large cream name. */
#peek{background:rgb(9,22,24);border-color:#e9c784;box-shadow:0 14px 34px rgba(0,0,0,.75),0 0 0 1px rgba(0,0,0,.6)}
#peek b{color:#f6e3b4;font-size:19px;font-weight:700;letter-spacing:.01em;text-shadow:0 1px 2px rgba(0,0,0,.8)}
#peek small{color:#f3ecdc;font-size:15px}
#peek .pair span{color:#f6e3b4}
/* Name plates over the felt: more solid, brighter text. */
.plate,#plates3d .plate{background:rgba(7,17,19,.88);color:#f6efde;border-color:rgba(233,199,132,.45);text-shadow:0 1px 2px rgba(0,0,0,.7)}
.plate small,#plates3d .plate small{color:#e3d9c2}
#plates3d .plate.turn,.plate.turn{background:rgba(58,45,16,.94);border-color:var(--gold);color:#fff}
/* Light mode, the Course quiz (JP, 19 Nov 2026: dark answers with dark text): paper card, paper answers, soft green / rose for right and wrong, always dark ink. */
html[data-mode=light] .card .qcard{background:#fffaf0;color:#1f2623;border-color:rgba(31,38,35,.26)}
html[data-mode=light] .card .qcard .unit-intro{background:rgba(31,38,35,.06)}
html[data-mode=light] .card .qcard .qtext,html[data-mode=light] .card .qcard .note{color:#1f2623}
html[data-mode=light] .card .qcard .choice,html[data-mode=light] .card .qcard .choice:disabled{background:#f6eedb;color:#1f2623;border-color:rgba(31,38,35,.3);opacity:1}
html[data-mode=light] .card .qcard .choice:hover:not(:disabled){border-color:#9a7424;background:#f1e3bf}
html[data-mode=light] .card .qcard .choice.right{background:#d5ecd0;color:#0f3a1f;border-color:#2f7a45}
html[data-mode=light] .card .qcard .choice.wrong{background:#f7d4cf;color:#5a1510;border-color:#b94a41}
html[data-mode=light] .card .fb.ok{background:#d5ecd0;color:#0f3a1f;border-color:#2f7a45}
html[data-mode=light] .card .fb.bad{background:#f7d4cf;color:#5a1510;border-color:#b94a41}
html[data-mode=light] .card .fb .verdict small,html[data-mode=light] .card .fb p{color:inherit}
html[data-mode=light] .card .fb .levelup{color:#7a5410}
/* Side plates split onto two lines when the screen is too narrow for both on one (table.js place3dLabels). */
#plates3d .plate.stacked{white-space:normal;text-align:center;line-height:1.15;width:max-content;max-width:46%}
#plates3d .plate.stacked small{display:block;margin:0}
/* Light mode: a daylight scene from the Keeper's story behind the Table, not rice paper (JP, 20 Nov 2026; src/table-scenes.js), a new one
   each hand, under a paper wash (stronger for the evening scene) so plates and tiles stay clear. */
html[data-mode=light].room-art body{background:linear-gradient(rgba(251,245,230,var(--table-scene-wash,.12)),rgba(251,245,230,calc(var(--table-scene-wash,.12) + .1))),var(--table-scene,url(/assets/table/story/empty-rain-room.webp)) var(--table-scene-pos,45% 55%)/cover no-repeat,var(--room)}
/* Light mode: name plates and Head/Tail tags are paper with dark ink over the sage table. */
html[data-mode=light] #plates3d .plate,html[data-mode=light] .plate{background:rgba(24,58,46,.94);color:#f6efde;border-color:rgba(233,199,132,.6);text-shadow:0 1px 2px rgba(0,0,0,.55)}
html[data-mode=light] #plates3d .plate small,html[data-mode=light] .plate small{color:#e8dfc8}
html[data-mode=light] #plates3d .plate.turn,html[data-mode=light] .plate.turn{background:#6b4d12;border-color:#f0cf7a;color:#fff}
html[data-mode=light] #plates3d .wall-label{background:rgba(251,245,230,.93);color:#6a470c;border-color:rgba(122,84,16,.55)}
/* Light mode, Learn: the drill and video cards are paper with dark ink (JP, 19 Nov 2026: "the light mode drills need styling"). */
html[data-mode=light] .card :is(.dcard,.vcard){background:#fffaf0;color:#1f2623;border-color:rgba(31,38,35,.26);box-shadow:0 2px 8px rgba(60,45,20,.1)}
html[data-mode=light] .card :is(.dcard,.vcard) h3{color:#6a470c}
html[data-mode=light] .card :is(.dcard,.vcard) .note{color:#4a544e}
html[data-mode=light] .card :is(.dcard,.vcard) .done{color:#1d6b45}
html[data-mode=light] .card :is(.dcard,.vcard) .btn.ghost{background:#f6eedb;color:#1f2623;border-color:#9a7424}
/* Light mode: the unit chip in use in the Course is gold with dark ink, not a dark pill. */
html[data-mode=light] .card .unit.on{background:#f1d597;color:#22190a;border-color:#9a7424}
html[data-mode=light] .card .unit.full{border-color:#2f7a45}

/* Light 3D table: no strip behind the top bar, as in dark mode (JP, 21 Nov 2026: "I don't like the white bar on the
   top"). Its words sit on small paper pills instead, so they never fade into the painting; the buttons keep their own fill. */
html[data-mode=light].room-art .bar{background:transparent;border-bottom:0;box-shadow:none}
html[data-mode=light].room-art .bar .stat{color:#3d4640;background:rgba(251,245,230,.9);border-radius:999px;padding:2px 9px;box-shadow:0 1px 4px rgba(31,38,35,.16)}
html[data-mode=light].room-art .bar .stat b{color:#1f2623}

/* The lantern in the Table's top bar: just the lamp, a tap target the size of the other buttons. */
.bar .bar-lantern{min-height:34px;width:40px;padding:0;justify-content:center;flex:0 0 auto}
.bar .bar-lantern .ls-t{display:none}
@media (pointer:coarse){.bar .bar-lantern{min-height:44px;width:44px}}
html[data-mode=light] .bar .bar-lantern{color:#1f2623;border-color:rgba(122,84,16,.55);background:rgba(251,245,230,.9)}
html[data-mode=light] .bar .bar-lantern .ls-lamp{color:#7a5410}
html[data-mode=dark] .bar .bar-lantern{color:#f6efde;border-color:rgba(233,199,132,.5)}
/* Wide screens: the ink-wash painting sits lower, so its mountains fill the sky above the table. */

/* Learn: tiles as large and clean as the home page's (JP, 19 Nov 2026): bigger, brighter ivory, softer edge. */
.row img{height:64px;filter:brightness(1.07) saturate(1.06) drop-shadow(0 3px 3px rgba(60,40,10,.28))}
.row.small img{height:52px}
@media (max-width:480px){.row img{height:58px}.row.small img{height:48px}}
.coach-hand .row img{height:46px;filter:none}
