/* Hours (board #115): the currency of time. Markup: hours.js. The chip (Shop, Inventory, Account), the Account plate
   with the ledger, and the moment ("You just earned back 2 hours"). Joe's gold-on-black glyph look: gilt edges, bone
   type, the print halftone. Art: Codex's currency/hours-v1 web exports (the coin, the bundles, the earned-back emblem). */
.hr-coin { display: inline-block; flex: none; width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.hr-coin.is-big { width: 54px; height: 54px; }

/* ---------- the balance chip ---------- */
.hr-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 9px; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font: 500 14.5px/1 var(--bp-sans, Inter, sans-serif); color: var(--bp-ink2, #b9b0a5);
  background: radial-gradient(60% 140% at 20% 50%, rgba(240, 200, 112, .16), transparent 70%), rgba(10, 8, 7, .82);
  box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .5), inset 0 1px 0 rgba(255, 240, 200, .12), 0 6px 18px rgba(0, 0, 0, .45);
  transition: transform 160ms var(--bp-out, cubic-bezier(.23, 1, .32, 1)), box-shadow 180ms ease; }
.hr-chip-n { font: 400 19px/1 var(--bp-serif, Georgia, serif); color: #f6dc94; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.01em; }
.hr-chip:active { transform: scale(.97); }
.hr-chip:focus-visible { outline: 2px solid var(--bp-gold, #f0c870); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .hr-chip:hover { box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .8), inset 0 1px 0 rgba(255, 240, 200, .16), 0 8px 22px rgba(0, 0, 0, .5), 0 0 22px -6px rgba(240, 200, 112, .55); } }
.hr-chip.is-bump { animation: hr-bump 520ms var(--bp-out, cubic-bezier(.23, 1, .32, 1)); }
@keyframes hr-bump { 30% { transform: scale(1.08); box-shadow: inset 0 0 0 1px #f6dc94, 0 0 30px -4px rgba(240, 200, 112, .8); } }
.hr-chip.is-frozen { background: radial-gradient(60% 140% at 20% 50%, rgba(150, 190, 220, .14), transparent 70%), rgba(10, 10, 14, .85); box-shadow: inset 0 0 0 1px rgba(160, 196, 224, .45), 0 6px 18px rgba(0, 0, 0, .45); }
.hr-chip.is-frozen .hr-coin { filter: grayscale(.7) brightness(.9) drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.hr-chip.is-frozen .hr-chip-n { color: #c9dcea; }
.hr-chip-ice { padding: 3px 7px; border-radius: 999px; font: 600 12.5px/1 var(--bp-sans, sans-serif); font-style: normal; letter-spacing: .04em; text-transform: uppercase; color: #cfe2ef; background: rgba(120, 160, 190, .18); }

/* ---------- the Account plate ---------- */
.hr-panel { display: grid; gap: 18px; }
.hr-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hr-panel-head .acp-title { margin: 2px 0 0; }
.hr-life { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 12px;
  background: radial-gradient(50% 120% at 0% 50%, rgba(240, 200, 112, .14), transparent 70%), var(--bp-dots, none), rgba(8, 6, 5, .5); box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .28); }
.hr-life-glass { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(240, 200, 112, .22), transparent); }
.hr-life p { display: grid; gap: 2px; margin: 0; min-width: 0; }
.hr-life b { font: 400 clamp(44px, 4vw, 60px)/1 var(--bp-serif, Georgia, serif); color: #f6dc94; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; text-shadow: 0 0 24px rgba(240, 200, 112, .25); }
.hr-life span { font: 500 16px/1.3 var(--bp-sans, sans-serif); color: var(--bp-bone, #ece4d8); }
.hr-life small { margin-top: 4px; font: 400 14.5px/1.45 var(--bp-sans, sans-serif); color: var(--bp-ink2, #b9b0a5); }
.hr-panel-note { margin: 0; padding: 10px 14px; border-radius: 10px; font: 400 15px/1.45 var(--bp-sans, sans-serif); color: #cfe2ef; background: rgba(120, 160, 190, .1); box-shadow: inset 0 0 0 1px rgba(160, 196, 224, .3); }
.hr-panel-sub { margin: 4px 0 -8px; font: 400 19px/1.2 var(--bp-serif, Georgia, serif); color: var(--bp-bone, #ece4d8); }
.hr-panel-sub small { margin-left: 8px; font: 400 14px/1 var(--bp-sans, sans-serif); color: var(--bp-ink2, #b9b0a5); }
.hr-ledger { display: grid; margin: 0; padding: 0; list-style: none; max-height: 320px; overflow: auto; }
.hr-ledger li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 10px 2px; box-shadow: inset 0 -1px 0 rgba(236, 228, 216, .08); font: 400 15px/1.4 var(--bp-sans, sans-serif); color: var(--bp-bone, #ece4d8); }
.hr-ledger time { font-size: 14px; color: var(--bp-ink2, #b9b0a5); font-variant-numeric: tabular-nums; }
.hr-ledger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-ledger b { font: 400 17px/1 var(--bp-serif, Georgia, serif); font-variant-numeric: lining-nums tabular-nums; }
.hr-ledger .is-earn b { color: #f6dc94; }
.hr-ledger .is-spend b { color: var(--bp-ink2, #b9b0a5); }
.hr-ledger-empty { margin: 0; font: 400 15px/1.5 var(--bp-sans, sans-serif); color: var(--bp-ink2, #b9b0a5); }
.hr-panel-test { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding-top: 4px; font: 400 14.5px/1.4 var(--bp-sans, sans-serif); color: var(--bp-ink2, #b9b0a5); }
.hr-panel-test p { margin: 0; }
.hr-panel-test b { color: var(--bp-bone, #ece4d8); }
.hr-panel.is-frozen .hr-life { filter: saturate(.35); }

/* ---------- the moment ---------- */
.hr-moment { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; align-content: center; gap: 6px; padding: 24px; cursor: pointer; color: var(--bone, #ece4d8);
  font-family: var(--sans, Inter, sans-serif); opacity: 0; transition: opacity 240ms cubic-bezier(.23, 1, .32, 1); }
.hr-moment.is-in { opacity: 1; }
.hr-moment.is-out { opacity: 0; transition-duration: 200ms; }
.hr-m-veil { position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 60% at 50% 42%, rgba(48, 34, 14, .82), rgba(5, 4, 4, .94) 70%); }
.hr-m-veil::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(236, 228, 216, .05) .8px, transparent 1.2px) 0 0 / 4px 4px; }
.hr-m-stage { position: relative; display: grid; place-items: center; width: min(46vh, 380px); aspect-ratio: 1; }
.hr-m-burst { position: absolute; inset: -18%; display: grid; place-items: center; pointer-events: none; opacity: 0; transform: scale(.9); transition: opacity 600ms ease, transform 900ms cubic-bezier(.23, 1, .32, 1); }
.hr-m-rays { position: absolute; inset: 0; border-radius: 50%; animation: hr-spin 24s linear infinite;
  background: repeating-conic-gradient(from 0deg, rgba(246, 220, 148, .22) 0deg 4deg, transparent 4deg 18deg);
  -webkit-mask: radial-gradient(closest-side, transparent 22%, #000 34%, transparent 72%); mask: radial-gradient(closest-side, transparent 22%, #000 34%, transparent 72%); }
.hr-m-glow { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(246, 220, 148, .42), rgba(201, 154, 69, .12) 60%, transparent); }
.hr-moment.is-flipped .hr-m-burst { opacity: 1; transform: none; }
.hr-moment.is-landed .hr-m-glow { animation: hr-flare 900ms cubic-bezier(.23, 1, .32, 1); }
@keyframes hr-flare { 30% { transform: scale(1.25); opacity: 1; filter: brightness(1.4); } }
@keyframes hr-spin { to { transform: rotate(360deg); } }
.hr-m-glass { position: relative; width: 88%; transform: translateY(14px) scale(.92); opacity: 0; filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .65)) drop-shadow(0 0 34px rgba(240, 200, 112, .28));
  transition: transform 420ms cubic-bezier(.23, 1, .32, 1), opacity 260ms ease; }
.hr-moment.is-in .hr-m-glass { transform: none; opacity: 1; }
/* Codex's earned-back emblem (an hourglass in laurel and rays). It arrives upside down and turns over like an hourglass
   (a half turn with a little overshoot); then sand runs through its neck while the time counts up, and a glint lands. */
.hr-m-turn { position: relative; transform: rotate(-180deg) scale(.94); }
.hr-moment.is-flipped .hr-m-turn { transform: none; transition: transform 700ms cubic-bezier(.34, 1.36, .5, 1); }
.hr-m-emblem { display: block; width: 100%; height: auto; aspect-ratio: 1; }
/* the stream: red grains falling through the neck of the glass (the emblem's neck sits at about 50% x 46%) */
.hr-m-sand { position: absolute; left: 50%; top: 44.5%; width: 2.2%; height: 16%; margin-left: -1.1%; opacity: 0; border-radius: 2px;
  background: radial-gradient(circle, #ff8a6a 0 32%, #c8241a 45%, transparent 62%) 50% 0 / 100% 7px repeat-y;
  -webkit-mask: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent); mask: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent);
  transition: opacity 200ms ease; }
.hr-moment.is-pouring .hr-m-sand { opacity: .95; animation: hr-sand 260ms linear infinite; }
.hr-moment.is-poured .hr-m-sand { opacity: 0; animation: none; transition-duration: 320ms; }
@keyframes hr-sand { to { background-position: 50% 7px; } }
/* the glint: a soft light that sweeps once across the gold when the time lands */
.hr-m-glint { position: absolute; inset: 6%; border-radius: 50%; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 244, 210, .55) 48%, transparent 58%) -120% 0 / 220% 100% no-repeat;
  -webkit-mask: url("assets/art/new/currency/hours-v1/web/hours-celebration.webp") center / contain no-repeat; mask: url("assets/art/new/currency/hours-v1/web/hours-celebration.webp") center / contain no-repeat; }
.hr-moment.is-landed .hr-m-glint { animation: hr-glint 900ms cubic-bezier(.23, 1, .32, 1) 60ms; }
@keyframes hr-glint { 0% { opacity: 1; background-position: -120% 0; } 100% { opacity: 1; background-position: 120% 0; } }

.hr-m-text { display: grid; justify-items: center; gap: 10px; max-width: 560px; text-align: center; }
.hr-m-kick { margin: 0; font: 600 14px/1 var(--sans, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--t-titan, #f0c870); opacity: 0; transition: opacity 300ms ease 200ms; }
.hr-m-num { display: grid; justify-items: center; gap: 6px; margin: 0; }
.hr-m-num > span[aria-hidden] { font: 400 clamp(20px, 2vw, 26px)/1.2 var(--serif, Georgia, serif); color: var(--bone, #ece4d8); opacity: 0; transition: opacity 300ms ease 260ms; }
.hr-m-num b { font: 400 clamp(64px, 8vw, 112px)/1 var(--serif, Georgia, serif); letter-spacing: -.025em; font-variant-numeric: lining-nums tabular-nums; color: #f6dc94;
  background: linear-gradient(180deg, #fff1c4, #f0c870 55%, #b98a36); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 24px rgba(240, 200, 112, .35)); opacity: 0; transform: translateY(8px); transition: opacity 300ms ease 300ms, transform 420ms cubic-bezier(.23, 1, .32, 1) 300ms; }
.hr-moment.is-in :is(.hr-m-kick, .hr-m-num > span[aria-hidden]) { opacity: 1; transform: none; }
/* the number arrives with the sand: nothing to read while the glass turns */
.hr-moment:is(.is-pouring, .is-landed, .is-calm) .hr-m-num b { opacity: 1; transform: none; transition-delay: 0ms; }
.hr-moment.is-landed .hr-m-num b { animation: hr-land 520ms cubic-bezier(.34, 1.5, .5, 1); }
@keyframes hr-land { 40% { transform: scale(1.07); filter: drop-shadow(0 4px 34px rgba(255, 230, 160, .7)); } }
.hr-m-sub { margin: 0; max-width: 44ch; font: 400 16px/1.5 var(--sans, sans-serif); color: var(--bone-2, #b9b0a5); opacity: 0; transform: translateY(6px); transition: opacity 320ms ease, transform 420ms cubic-bezier(.23, 1, .32, 1); }
.hr-m-total { display: inline-flex; align-items: center; gap: 9px; margin: 4px 0 0; padding: 8px 14px 8px 10px; border-radius: 999px; font: 400 15px/1 var(--sans, sans-serif); color: var(--bone-2, #b9b0a5);
  background: rgba(10, 8, 7, .7); box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .4); opacity: 0; transform: translateY(6px); transition: opacity 320ms ease 80ms, transform 420ms cubic-bezier(.23, 1, .32, 1) 80ms; }
.hr-m-total b { font: 400 17px/1 var(--serif, Georgia, serif); color: #f6dc94; }
.hr-m-go { margin-top: 8px; min-height: 44px; min-width: 160px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer; font: 600 16px/1 var(--sans, sans-serif); color: #1c1306;
  background: linear-gradient(180deg, #f6dc94, #c99a45 62%, #a77b2c); box-shadow: inset 0 1px 0 rgba(255, 250, 230, .6), 0 8px 22px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(6px); transition: opacity 320ms ease 160ms, transform 420ms cubic-bezier(.23, 1, .32, 1) 160ms, scale 120ms ease-out; }
.hr-m-go:active { scale: .97; }
.hr-m-go:focus-visible { outline: 2px solid #f6dc94; outline-offset: 3px; }
.hr-moment.is-landed :is(.hr-m-sub, .hr-m-total, .hr-m-go), .hr-moment.is-calm :is(.hr-m-sub, .hr-m-total, .hr-m-go) { opacity: 1; transform: none; }

/* calm / reduced motion: a fade, the numbers already there, the sand already down */
.hr-moment.is-calm *, .hr-moment.is-calm { animation: none !important; }
.hr-moment.is-calm :is(.hr-m-glass, .hr-m-burst, .hr-m-kick, .hr-m-num > span[aria-hidden], .hr-m-num b) { transform: none; transition: opacity 240ms ease; }
.hr-moment.is-calm .hr-m-burst { opacity: 1; }
.hr-moment.is-calm .hr-m-turn { transform: none; transition: none; }
.hr-moment.is-calm :is(.hr-m-sand, .hr-m-glint) { display: none; }
@media (prefers-reduced-motion: reduce) { .hr-chip, .hr-chip.is-bump { animation: none; transition: none; } }
@media (max-width: 620px) { .hr-m-stage { width: min(34vh, 280px); } .hr-m-sub { font-size: 16px; } }
