/* Hearth Home: the four calls as gilt coins on a mantel shelf (Addendum 15 B12, Tom 20 Nov 21:37-21:40).
   GM mode, Library, Map builder, Shop: the same buttons and actions, restyled only. A gold coin with a simple line icon,
   then the label and the same subtitle under it, one row of four, low on the screen, just above the safe area. The shelf
   is a charwood band in Dark and an oxblood leather band in Light. The room the old 2 x 2 doors took goes to the hero
   carousel (.hv-car is the flex: 1 part of Home), so the portraits are bigger. The coin icons are new artwork, flagged
   for Ned. Theme and root tokens only (no px, no hex): Dark, Light, Blue and the colour wheels each read their own.
   Loaded after home-v2.css and prestige.css, so these win; Home v2's other rules are untouched. */
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins {
  --coin: clamp(3.25rem, 15vw, 4rem);
  position: relative; isolation: isolate; flex: none;
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: var(--sp-1) !important;
  align-items: start; width: 100%; max-width: var(--dmax, 100%); margin: 0 auto !important;
  padding: var(--sp-2) var(--sp-2) calc(var(--sp-3) + var(--hearth-safe-bottom, env(safe-area-inset-bottom, 0rem))) !important;
}
/* the shelf: a full-width band from the coins' middle down to the screen's foot */
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: calc(var(--sp-2) + var(--coin) / 2); bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: linear-gradient(rgb(from var(--c-black) r g b / 0.15), rgb(from var(--c-black) r g b / 0.55)), var(--dk-wood, var(--hearth-oak)) 0 0 / 32rem 32rem repeat, var(--c-night-07);
  border-top: var(--sp-half) solid var(--oak-brass, var(--gold));
  box-shadow: 0 calc(-1 * var(--sp-hair)) 0 rgb(from var(--oak-brass-hi, var(--gold)) r g b / 0.6), 0 calc(-1 * var(--sp-3)) var(--sp-5) rgb(from var(--c-black) r g b / 0.35);
}
html:root.hv2[data-look="light"][data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins::before {
  background: radial-gradient(120% 140% at 50% 0%, rgb(from var(--oxblood) calc(r + 25) calc(g + 8) calc(b + 6)), var(--oxblood) 55%, rgb(from var(--oxblood) calc(r - 35) calc(g - 14) calc(b - 8)));
}
/* each call: the coin, then the label and its subtitle under it; the whole column is the tap target */
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door {
  height: auto !important; min-height: var(--tap) !important; min-width: 0;
  display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0;
  padding: 0 0 var(--sp-1) !important; margin: 0 !important; text-align: center !important;
  border: 0 !important; border-radius: var(--rad-3, var(--sp-3)) !important; background: none !important; box-shadow: none !important;
  color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door::before, html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door::after { content: none !important; display: none !important; }
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-ring {
  width: var(--coin) !important; height: var(--coin) !important; flex: none; margin: 0 0 var(--sp-1);
  border-radius: 50%; display: grid; place-items: center;
  /* the coin is gold in every look (fixed metal, like the coins row on the sheet), not the look's accent */
  background: radial-gradient(circle at 34% 28%, var(--lock-gold-86) 0%, var(--lock-gold-65) 44%, var(--lock-gold-36-b) 100%) !important;
  border: var(--sp-half) solid var(--lock-gold-38-b) !important;
  box-shadow: inset 0 0 0 var(--sp-half) rgb(from var(--lock-gold-86) r g b / 0.55), inset 0 calc(-1 * var(--sp-1)) var(--sp-2) rgb(from var(--c-black) r g b / 0.3), 0 var(--sp-1) var(--sp-3) rgb(from var(--c-black) r g b / 0.55) !important;
  color: var(--lock-night-03) !important;
}
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-ring .hv-i { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* the label and the subtitle: never cut off; they wrap onto a second line on the narrowest phones instead */
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door b {
  display: block; max-width: 100%; margin: 0; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; text-wrap: balance;
  font: 700 clamp(0.72rem, 3.3vw, 1.05rem) / 1.12 var(--serif) !important; color: var(--oak-brass-hi, var(--gold)) !important;
  text-shadow: 0 var(--sp-hair) var(--sp-half) rgb(from var(--c-black) r g b / 0.6);
}
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door small {
  display: block; max-width: 100%; margin: var(--sp-half) 0 0; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; text-wrap: balance;
  font: 500 clamp(0.6rem, 2.6vw, 0.8rem) / 1.2 var(--sans) !important; color: rgb(from var(--ink) r g b / 0.82) !important;
}
html:root.hv2[data-look="light"][data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door b { color: rgb(from var(--c-white) r g b / 0.96) !important; text-shadow: 0 var(--sp-hair) var(--sp-half) rgb(from var(--c-black) r g b / 0.5); }
html:root.hv2[data-look="light"][data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door small { color: rgb(from var(--c-white) r g b / 0.82) !important; }
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door:focus-visible { outline: var(--sp-half) solid var(--oak-brass-hi, var(--gold)); outline-offset: var(--sp-half); }
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door:active .hv-ring { transform: translateY(var(--sp-half)); }
/* the GM mode call keeps no special frame: all four coins are equal */
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door.hv-d-dm { border: 0 !important; box-shadow: none !important; }

/* the room the coins free goes to the hero: on a standing phone the arch may now take all of the height the old doors held, so the
   portraits are taller and bigger than in 255 wherever the height was the limit. The width cap stays at 255's 76%
   (the calm mock: both neighbours peek), so a slow swipe from the middle still moves on and the next card still peeks */
@media (max-width: 37.4375rem) and (min-height: 42.5625rem) {
  html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-card {
    --aw: clamp(7rem, min(calc((100cqh - 10.9375rem) * .749), 76cqw), 21.25rem) !important;
    --cw: clamp(11.25rem, min(calc(var(--aw) + 2rem), 94cqw), 23.25rem) !important;
  }
}

/* short screens (a phone on its side, 360-540 tall): the same coins, smaller, with the label and subtitle beside the
   coin, so the shelf is one slim band and the hero card keeps its room between the header and the shelf */
@media (max-height: 33.75rem) {
  html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins {
    --coin: 2.5rem; align-items: center;
    padding: 0 var(--sp-2) calc(var(--sp-half) + var(--hearth-safe-bottom, env(safe-area-inset-bottom, 0rem))) !important;
  }
  html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins::before { top: 0; } /* the band holds the whole row, so the Light labels (white) always sit on the oxblood */
  html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door {
    display: grid !important; grid-template: auto auto / var(--coin) minmax(0, 1fr); column-gap: var(--sp-2); align-items: center; justify-items: start;
    padding: 0 !important; text-align: left !important;
  }
  html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-ring { grid-row: 1 / span 2; margin: 0; }
  /* the whole drop-cap (A3) makes the name line a little taller; the arch gives those few pixels back here, so the
     card and its dots still sit between the header and the shelf */
  html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-card { --aw: clamp(6rem, min(34cqh, 16cqw), 10rem); }
  html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door b { align-self: end; font-size: clamp(0.8rem, 2.2vw, 1rem) !important; }
  html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-doors.hv-coins .hv-door small { align-self: start; margin: 0; font-size: clamp(0.62rem, 1.6vw, 0.78rem) !important; }
}

/* (A15 B10, Tom signed 21:25, Ned YES-IF 21:28) the New character card is see-through: the arch has no fill and the card
   no paint, so the page itself (Dark: black-leather-768; Light: parchment-768; Blue and the wheel tints: their own page)
   shows through. The page background is pinned to the viewport, so the texture behind the arch stays still while the
   card slides. Kept: the thin gold outline, the gold + medallion and the title; it still opens creation. */
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body[data-u-route="home"] { background-attachment: fixed !important; }
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-card.hv-new {
  background: none !important; box-shadow: none !important;
  border: var(--sp-hair) solid rgb(from var(--oak-brass-hi, var(--gold)) r g b / 0.75) !important;
}
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-card.hv-new::before { background: none !important; }
html:root.hv2[data-palette][data-palette][data-palette][data-palette][data-palette][data-palette] body .hv-home .hv-card.hv-new .hv-por.hv-ghost {
  background: none !important; box-shadow: none !important;
  border: var(--sp-hair) solid rgb(from var(--oak-brass-hi, var(--gold)) r g b / 0.9) !important;
}
