/* =====================================================================================================================
   HARVEST WOODEN BORDERS (Anton approved the look 2026-11-27 18:36 ET, "thatll do"; borders only, not the full Harvest skin).
   On only while the Thanksgiving Special is live (harvest-borders.js sets body.hv-borders from body.ev-thanksgiving, through
   Sat 2026-12-12 23:59:59 ET). In game only: the board hangs in a carved, lacquered walnut frame with pumpkin corner caps;
   the side panels get the lacquered walnut frame with brass corner brackets; the city tabs, the ticker and the Bix message
   bar become lacquered walnut plates. Everything else (panel fills, buttons, text, deeds, board art, Trophy Case, dialogs)
   stays exactly as it is. Art: art/event/hv_*.webp (3x CSS px, webp, ~70 KB total), from the locked v4 set.
   ===================================================================================================================== */
/* tgvisual-1128 (Anton 06:14 / 06:15 ET 2026-11-28, "the borders around the game can be thicker. It's okay if it blocks the
   edge of the board a bit", "more engraved details, like someone took the time to hand carve them in"): the board frame is
   about twice as wide (48 css px desktop, was 24; 26 phone, was 13) and carved deeper (rope moulding, an oak vine with
   acorns in relief on a punched ground, bead-and-reel, a bevelled lip: art/event/hv_frame_carved.webp). It now sits OVER
   the board's outer margin like a picture frame's lip instead of taking room from it, so the board is back to its live
   size. The pumpkin caps scale with it (171 / 100 css px, was 90 / 56) from a sharper render of the same cap.
   --hvb-ring frame width; --hvb-out how far the side rails reach OUT past the board on desktop (the page has room there, and
   Goldspire's / Ironbrook's outermost spaces sit 32-45 px from the board's sides, so the side rails overlap the board by
   ring - out = 28 px and never reach a space; top and bottom have 55+ px of scenery, so those rails overlap the full 48 px);
   --hvb-cap cap size; --hvb-cx / --hvb-ct / --hvb-cb where the cap's boss centre sits from the frame's outer side / top /
   bottom edge (the boss is 20/64 into the cap art; its disc radius is 0.228 of the cap). */
body.hv-borders { --hvb-ring: 48px; --hvb-out: 20px; --hvb-cap: 171px; --hvb-cx: 30px; --hvb-ct: 40px; --hvb-cb: 30px; --hvb-fp: 9px; }
@media (max-width: 900px) { body.hv-borders { --hvb-ring: 28px; --hvb-out: 0px; --hvb-cap: 108px; --hvb-cx: calc(1px + var(--hvb-cap) * .228); --hvb-ct: calc(2px + var(--hvb-cap) * .3125); --hvb-cb: calc(1px + var(--hvb-cap) * .228); } }
@media (max-width: 760px) { body.hv-borders { --hvb-ring: 26px; --hvb-out: 0px; --hvb-cap: 100px; --hvb-cx: calc(1px + var(--hvb-cap) * .228); --hvb-ct: calc(2px + var(--hvb-cap) * .3125); --hvb-cb: calc(1px + var(--hvb-cap) * .228); --hvb-fp: 7px; } }

/* 1. Board frame: .hv-frame wraps #viewport (which keeps its own overflow clip, so pan / zoom / follow-cam are untouched)
      and holds the carved ring (.hv-ring) and the caps. The ring lies over the board's outer margin like a picture frame's
      lip and lets every touch through to the board; the controls inside the viewport (Zoom, dice, Bix's cards) step in
      past it. */
body.hv-borders #game .hv-frame { position: relative; margin: 0 auto; width: min(100%, calc((100vh - 128px) * var(--board-ar, 1.1328))); }
body.hv-borders #game .hv-frame > .board-viewport { width: 100%; border-radius: 0; }
body.hv-borders #game .hv-ring { position: absolute; top: 0; bottom: 0; left: calc(-1 * var(--hvb-out)); right: calc(-1 * var(--hvb-out)); z-index: 4;
  pointer-events: none; box-sizing: border-box; border: var(--hvb-ring) solid transparent;
  border-image: url(art/event/hv_frame_carved.webp?v=843510651f) 120 / var(--hvb-ring) round;
  box-shadow: 0 0 0 1px #120501, 0 22px 50px rgba(0, 0, 0, .62), 0 0 46px rgba(242, 140, 40, .2); }
/* the lip's shadow falling onto the board (key light top left, so the top and left lips throw the longest shadow) */
body.hv-borders #game .hv-ring::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(18, 5, 1, .9), inset 0 10px 14px -6px rgba(12, 3, 0, .7), inset 10px 0 14px -8px rgba(12, 3, 0, .55),
              inset -6px 0 10px -7px rgba(12, 3, 0, .45), inset 0 -6px 10px -7px rgba(12, 3, 0, .45); }
/* controls inside the viewport: inside the frame's inner edge and clear of the caps' disc and arms */
body.hv-borders #game .hv-frame .zoom-btn { top: calc(var(--hvb-ct) + var(--hvb-cap) * .13 + 4px); right: calc(var(--hvb-cx) - var(--hvb-out) + var(--hvb-cap) * .228 + 8px); }
body.hv-borders #game .hv-frame .dice { left: calc(var(--hvb-ring) - var(--hvb-out) + 22px); bottom: calc(var(--hvb-ring) + 22px); }
body.hv-borders #game .hv-frame .explains { top: calc(var(--hvb-ct) + var(--hvb-cap) * .13 + 44px); right: calc(var(--hvb-ring) - var(--hvb-out) + 8px); width: min(300px, calc(100% - 2 * (var(--hvb-ring) - var(--hvb-out)) - 16px)); }
/* corner caps: lacquered pumpkin on a knurled brass boss (shadow baked into the art, no per-frame filter) */
body.hv-borders #game .hv-cap { position: absolute; z-index: 6; pointer-events: none; width: var(--hvb-cap); height: var(--hvb-cap);
  background: url(art/event/hv_cap_hd.webp?v=37abc3c0a6) center / contain no-repeat; --b: calc(var(--hvb-cap) * -.3125 - var(--hvb-out)); --bv: calc(var(--hvb-cap) * -.3125); }
body.hv-borders #game .hv-cap.tl { left: calc(var(--hvb-cx) + var(--b)); top: calc(var(--hvb-ct) + var(--bv)); }
body.hv-borders #game .hv-cap.tr { right: calc(var(--hvb-cx) + var(--b)); top: calc(var(--hvb-ct) + var(--bv)); transform: scaleX(-1); }
body.hv-borders #game .hv-cap.bl { left: calc(var(--hvb-cx) + var(--b)); bottom: calc(var(--hvb-cb) + var(--bv)); transform: scaleY(-1); }
body.hv-borders #game .hv-cap.br { right: calc(var(--hvb-cx) + var(--b)); bottom: calc(var(--hvb-cb) + var(--bv)); transform: scale(-1, -1); }
/* desktop (>=901px): the board column is a grid (tabs | ticker, then the board). The frame is the grid item and spans both
   columns; the column is the live board width again (100vh - 112px budget), since the frame no longer adds to it. */
@media (min-width: 901px) {
  body.hv-borders #game .board-col { width: min(100%, calc((100vh - 112px) * var(--board-ar, 1.1328))); }
  body.hv-borders #game .hv-frame { grid-column: 1 / -1; width: 100%; }
}
/* exchspace-1128 (Anton 21:50 ET 2026-11-28, "we have a space problem"): the side rails reach --hvb-out past the board and the pumpkin
   caps a further way, about 44 px past the board's edge in all. When the window is narrow for its height (1024-1280 wide, a tall
   1280 x 1024, or 1920 x 1080 where the game grid stops at 1500 px), the board filled its grid cell and the ring and caps landed on
   the side column: the Exchange, the turn card, Players, Bix Moments all lost their left edge under the carving. The board column
   now keeps that reach (--hvb-over, the cap's overhang + a 6 px breath) clear on both sides of its cell, so the frame can never
   cover a panel; at roomy sizes (1366 x 768, 1440 x 900) the board is exactly its live size. */
@media (min-width: 901px) {
  body.hv-borders #game { --hvb-over: calc(var(--hvb-cap) * .3125 + var(--hvb-out) - var(--hvb-cx) + 6px); }
  body.hv-borders #game .board-col { width: min(calc(100% - 2 * var(--hvb-over)), calc((100vh - 112px) * var(--board-ar, 1.1328))); }
}
/* narrow / phone (<=900px): the frame runs the full width; the ticker sits on its top edge, so the top caps start just
   under the ticker (--hvb-ct) and on a phone the side caps step in to show the whole disc (--hvb-cx) */
@media (max-width: 900px) { body.hv-borders #game .hv-frame { width: 100%; } }

/* 2. Side panels (turn card, Players, Secret titles, Bix Moments, log): lacquered walnut rail with a gilt outer bead,
      gold pinstripe, gloss on the top rail and brushed-brass corner brackets with domed rivets. The rail is the border;
      the 9-slice is drawn 10/3 of the rail so the bracket arms paint over the panel's corner padding. Panel fill unchanged. */
body.hv-borders #game .side-col > .panel { border: var(--hvb-fp) solid transparent; border-radius: 0; background: var(--glass) padding-box;
  border-image: url(art/event/hv_panel.webp?v=5c014bbf4d) 90 / calc(var(--hvb-fp) * 10 / 3) stretch; }

/* 3. City tabs: chamfered lacquered-walnut plates (gilt for the board on view) with a gold pinstripe and a rivet in each
      chamfer. Today's 1.5 px border (drawn 1 px) + padding becomes the 4 px 9-slice border + padding, so every tab keeps its size. */
body.hv-borders #game .board-tabs .tab, body.hv-borders #game .board-tabs .tab[data-board].on { border: 4px solid transparent; border-radius: 0; background: none;
  border-image: url(art/event/hv_tab.webp?v=02c96387fd) 30 fill / 10px stretch; padding: 3.5px 11px; color: #f6e6cf; text-shadow: 0 1px 1px rgba(30, 8, 0, .85); }
body.hv-borders #game .board-tabs .tab.on, body.hv-borders #game .board-tabs .tab[data-board].on { border-image-source: url(art/event/hv_tab_on.webp?v=5367129e1d); color: #3a1606; text-shadow: 0 1px 0 rgba(255, 240, 200, .6); }
@media (max-width: 900px) { body.hv-borders #game .board-tabs .tab, body.hv-borders #game .board-tabs .tab[data-board].on { padding: 2.5px 7px; } }

/* 4. Ticker: a lacquered walnut rail with a gold pinstripe and brass rivets (the city label sits set into it) */
body.hv-borders #game .ticker { background: none; border: 3px solid transparent; border-radius: 0;
  border-image: url(art/event/hv_rail.webp?v=39b2c5709a) 24 30 fill / 8px 10px stretch; box-shadow: 0 3px 8px rgba(0, 0, 0, .45); }

/* 5. Bix message bar: the bubble becomes a lacquered walnut plate with a walnut pointer (same outer size as today) */
body.hv-borders #game .bix-bar .bix-bubble { background: none; border: 3px solid transparent; border-radius: 0; box-shadow: 0 6px 14px rgba(0, 0, 0, .4);
  border-image: url(art/event/hv_plate.webp?v=b09b0fa0b3) 36 fill / 12px stretch; padding: 8.5px 12.5px; color: #f6e6cf; }
body.hv-borders #game .bix-bar .bix-bubble::before { left: -10px; top: 13px; border-right-color: #6a3214; }

/* =====================================================================================================================
   6. Walnut panel fills, gilt header tags and ribbons (tgvisual-1128, Anton 2026-11-28 05:27 "use the best version of the
      borders"). The look Anton approved at 18:36 ET 2026-11-27 was the v7 RICH BORDERS mockup, where the panels inside the frames
      are walnut, not navy. Ported from harvest.css v7 (containers, headers, tags, timer ribbon, buttons, players/log), scoped to the
      game screen's side column and Bix bar under body.hv-borders, so it is on only during the Thanksgiving Special like the frames.
      NOT ported: the Harvest background scene, card faces (deeds, mini cards, board art), dialogs/menus, the Deal Offer pop-up,
      home / lobby / Trophy Case. --card is not remapped, so deed faces and card art keep their own paper and ink.
      No rounded pills: every shape here is a chamfer or a swallowtail. Text contrast measured >= 4.5:1 (see tgvisual1128 report).
   ===================================================================================================================== */
body.hv-borders #game {
  --hvb-walnut: repeating-linear-gradient(2deg, rgba(255, 210, 150, 0) 0 2px, rgba(255, 210, 150, .07) 2px 3px, rgba(30, 8, 0, 0) 3px 5px, rgba(30, 8, 0, .2) 5px 6px), linear-gradient(180deg, #6e3212, #52220a 60%, #441c08);
  --hvb-gilt: linear-gradient(135deg, #fff1b8, #e9b23c 35%, #8a5a12 65%, #ffd76a);
  --hvb-ribbon: linear-gradient(180deg, rgba(255, 220, 170, .18) 0 1px, rgba(0, 0, 0, 0) 1px 45%, rgba(40, 8, 0, .22) 100%), linear-gradient(90deg, #5e1a04, #8a300a 14%, #92360c 50%, #8a300a 86%, #5e1a04);
  --hvb-divider: linear-gradient(90deg, rgba(233, 178, 60, 0), #e9b23c 14%, #fff1b8 50%, #e9b23c 86%, rgba(233, 178, 60, 0));
  --hvb-cut: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
}
/* the side column reads warm: glass, secondary ink, hairlines and wells (not --card: card faces keep their own colours) */
body.hv-borders #game .side-col {
  --glass: linear-gradient(180deg, rgba(40, 16, 7, .9), rgba(26, 10, 4, .93));
  --glass2: linear-gradient(180deg, rgba(58, 24, 10, .86), rgba(36, 14, 5, .9));
  --ink2: #dcc3a0; --line: rgba(255, 198, 120, .2); --inset: rgba(20, 7, 2, .55);
}
/* panel fills: smoked walnut (turn card a shade warmer, as in the mockup) */
body.hv-borders #game .side-col > .panel { background: linear-gradient(180deg, rgba(40, 16, 7, .9), rgba(26, 10, 4, .93)) padding-box;
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .16), 0 14px 30px rgba(0, 0, 0, .5), 0 0 30px rgba(242, 140, 40, .1); }
body.hv-borders #game .side-col > .turn-card { background: linear-gradient(180deg, rgba(64, 26, 10, .92), rgba(40, 15, 5, .95)) padding-box;
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .16), 0 14px 30px rgba(0, 0, 0, .5), 0 0 34px rgba(242, 140, 40, .2); }
/* panel headers: carved walnut tag with a gilt edge (the rim is the plate; face = ::before 1.5 px inside) */
body.hv-borders #game .side-col > .panel > h3, body.hv-borders #game .side-col .mom-head h3 {
  position: relative; isolation: isolate; display: inline-block; margin: 0 0 10px; padding: 3px 12px 4px;
  font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #fff3de; text-shadow: 0 1px 1px rgba(30, 8, 0, .85);
  --c: 5px; clip-path: var(--hvb-cut); background: var(--hvb-gilt); border-radius: 0; }
body.hv-borders #game .side-col > .panel > h3::before, body.hv-borders #game .side-col .mom-head h3::before {
  content: ''; position: absolute; inset: 1.5px; z-index: -1; --c: 4px; clip-path: var(--hvb-cut); background: var(--hvb-walnut); }
/* turn header: gilt rule under it */
body.hv-borders #game .turn-head { position: relative; padding-bottom: 8px; margin-bottom: 10px; }
body.hv-borders #game .turn-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--hvb-divider); opacity: .75; }
/* city / status tags in the side column (IRONBROOK on the turn card, Players tags): walnut tag, gilt hairline, chamfered */
body.hv-borders #game .side-col .tag-pill:not(.gold-turkey):not(.title) { --c: 4px; clip-path: var(--hvb-cut); background: var(--hvb-walnut); color: #fff0d8; box-shadow: inset 0 0 0 1px rgba(255, 198, 120, .5); }
body.hv-borders #game .side-col .tag-pill.out { background: linear-gradient(180deg, #8a1a22, #5a0c12); color: #ffe0dc; }
body.hv-borders #game .side-col :is(.tag-pill.bix, .tag-pill.off) { background: linear-gradient(180deg, #3a2a20, #24170e); color: #e8dccb; }
/* turn timer (Anton 06:55 ET 2026-11-28): the same chamfered walnut plate and gilt hairline as the city tag beside it, no icon;
   "no timer" quiet, countdown numerals in gilt, low time a crimson plate with a red hairline */
body.hv-borders #game .timer { --c: 4px; clip-path: var(--hvb-cut); background: var(--hvb-walnut); color: rgba(255, 232, 200, .66);
  box-shadow: inset 0 0 0 1px rgba(255, 198, 120, .5); text-shadow: 0 1px 1px rgba(30, 8, 0, .85); }
body.hv-borders #game .timer .tm-num { color: #ffd98a; }
body.hv-borders #game .timer.low { background: linear-gradient(180deg, #8a1a22, #5a0c12); color: #ffe0dc; box-shadow: inset 0 0 0 1px rgba(255, 140, 140, .85); }
body.hv-borders #game .timer.low .tm-num { color: #fff0f0; }
/* buttons in the side column and the Bix bar: chamfered plates (walnut; gilt for gold; pumpkin for Roll). No pills. */
body.hv-borders #game :is(.side-col, .bix-bar) .btn { --c: 8px; border-radius: 0; clip-path: var(--hvb-cut); color: #fff3de;
  background: linear-gradient(180deg, #8f4a1e 0%, #6e3412 52%, #50220a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .35), inset 0 -4px 0 #2a0e03, inset 0 0 0 1px rgba(255, 198, 120, .3); }
body.hv-borders #game :is(.side-col, .bix-bar) .btn::before { border-radius: 0; }
body.hv-borders #game :is(.side-col, .bix-bar) .btn.small { --c: 6px; }
body.hv-borders #game :is(.side-col, .bix-bar) :is(.btn.gold, .btn3d.gold) { color: #3a1606; text-shadow: 0 1px 0 rgba(255, 245, 210, .55);
  background: linear-gradient(180deg, #fff1b8 0%, #f6cf62 28%, #e9a830 62%, #b9781a 100%); box-shadow: inset 0 1px 0 #fff8d6, inset 0 -4px 0 #7a4a0c, inset 0 0 0 1px rgba(90, 50, 6, .5); }
body.hv-borders #game .side-col .btn.roll { color: #fffaf0; text-shadow: 0 1px 1px rgba(60, 16, 0, .8);
  background: linear-gradient(180deg, #f39446 0%, #d8590f 12%, #bf4a0b 22%, #b0420a 78%, #7a2805 100%); box-shadow: inset 0 1px 0 #ffe2c4, inset 0 -4px 0 #6e2404, inset 0 0 0 1px rgba(90, 30, 4, .5); }
body.hv-borders #game :is(.side-col, .bix-bar) .btn.ghost { color: #f6e6cf; background: linear-gradient(180deg, rgba(48, 19, 8, .9), rgba(30, 11, 4, .92));
  box-shadow: inset 0 0 0 1.5px rgba(233, 178, 60, .55), inset 0 1px 0 rgba(255, 220, 170, .14); }
body.hv-borders #game .side-col .btn.green { background: linear-gradient(180deg, #8fb058, #5e7d24 50%, #3e5614); box-shadow: inset 0 1px 0 #e6f4c0, inset 0 -4px 0 #2e3e0c; }
body.hv-borders #game .side-col .btn.red { background: linear-gradient(180deg, #e8645a, #c01e2a 50%, #7e0f1c); box-shadow: inset 0 1px 0 #ffc4bc, inset 0 -4px 0 #4a0610; }
body.hv-borders #game :is(.side-col, .bix-bar) .btn:disabled { filter: saturate(.55) brightness(.85); }
/* players: the current player's row gets a ribbon edge; gilt hairlines between rows; cash in warm gold */
body.hv-borders #game .players li { border-bottom: 0; position: relative; }
body.hv-borders #game .players li + li::before { content: ''; position: absolute; left: 6px; right: 6px; top: 0; height: 1px; background: var(--hvb-divider); opacity: .45; }
body.hv-borders #game .players li.turn { border-radius: 0; background: linear-gradient(90deg, rgba(150, 52, 8, .42), rgba(150, 52, 8, .06)); box-shadow: inset 4px 0 0 #e9b23c; }
body.hv-borders #game .players .cash { color: #ffe2a8; }
/* log: a sunk walnut well */
body.hv-borders #game .log { background: rgba(16, 6, 2, .5); border-radius: 0; --c: 6px; clip-path: var(--hvb-cut); }
/* panel tab bar (My Tycoon / Exchange / Bank / Deal Files / Chat): a sunk walnut well with chamfered carved tags; the open tab is gilt */
body.hv-borders #game .side-col .ptabs { border-radius: 0; --c: 8px; clip-path: var(--hvb-cut); background: rgba(16, 6, 2, .55); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 198, 120, .22); }
body.hv-borders #game .side-col .ptab { border-radius: 0; --c: 6px; clip-path: var(--hvb-cut); color: #e8d2b0; }
body.hv-borders #game .side-col .ptab .ptab-ic { color: #d9a85a; }
body.hv-borders #game .side-col .ptab.on { color: #3a1606; background: linear-gradient(180deg, #fff1b8 0%, #f6cf62 28%, #e9a830 62%, #b9781a 100%); box-shadow: inset 0 -3px 0 #7a4a0c, inset 0 1px 0 #fff8d6; }
body.hv-borders #game .side-col .ptab.on .ptab-ic { color: #6a3a06; }
/* secret-title badges: walnut plates with a gilt hairline (the earned one stays gilt) */
body.hv-borders #game .side-col .title-badge:not(.on) { background: var(--hvb-walnut); color: #ecd6b4; box-shadow: inset 0 0 0 1px rgba(255, 198, 120, .45); }
