/* Era Clash · Home hub: today's dailies (small, calm) above the Arena (big, loud). */
/* body is a flex column and main has margin:auto, so main used to shrink to its content.
   On the home page let main span the screen and the hub use it (cap 1480 = old 1180 + 25%). */
body.hub-view > main { width: 100%; max-width: none; box-sizing: border-box; padding-inline: clamp(16px, 2vw, 28px); }
.hub {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(12px, 2.5vh, 28px) 0 40px;
  display: grid;
  gap: clamp(16px, 2.4vh, 26px);
  color: var(--ec-text, #fcf1e1);
  font-family: var(--ec-font-ui, system-ui, sans-serif);
}
.hub button { font: inherit; color: inherit; cursor: pointer; }
.hub-eyebrow { margin: 0 0 4px; color: var(--ec-gold, #d9ab52); font: 700 11px/1.3 var(--ec-font-ui); letter-spacing: .2em; text-transform: uppercase; }

/* ---- Today's dailies ---------------------------------------------------- */
.hub-dailies-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 14px; position: relative; top: -8px; /* owner: heading sits a touch higher; cards stay put */ }
.hub-dailies-head h2, body.roman-menu main .hub-dailies-head #hub-dailies-title { margin: 0; font: 600 clamp(32px, 3.8vw, 44px)/1 var(--ec-font-display); color: #fff6e6; }
.hub-dailies-head .hub-eyebrow { font-size: 13px; margin-bottom: 8px; }
.hub-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--ec-text-2, #dcc8aa); font-size: 14px; }
.hub-progress b { color: var(--ec-gold-hi, #f6dc9c); }
.hub-pips { display: inline-flex; gap: 5px; }
.hub-pips i { width: 26px; height: 6px; border-radius: 99px; background: rgb(246 220 156 / .16); transition: background var(--ec-med, .3s); }
.hub-pips i.is-on { background: linear-gradient(90deg, var(--ec-gold, #d9ab52), var(--ec-gold-hi, #f6dc9c)); box-shadow: 0 0 10px rgb(217 171 82 / .5); }
.hub-ico { width: 20px; height: 20px; display: block; }
.hub-done-tick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 5px; border-radius: 99px; background: rgb(166 220 143 / .12); border: 1px solid rgb(166 220 143 / .35); color: var(--ec-right, #a6dc8f); font-weight: 650; font-size: 13px; }
.hub-done-tick .hub-ico { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--ec-right, #a6dc8f); color: #12260c; box-sizing: border-box; }
.hub-streak { padding: 3px 10px; border-radius: 99px; background: rgb(184 54 46 / .25); border: 1px solid rgb(243 145 145 / .3); color: #ffd9c8; font-weight: 650; font-size: 13px; }

.hub-daily-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hub-daily {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  min-height: 132px; padding: 16px 18px; text-align: left;
  border: 1px solid var(--ec-line-2, rgb(246 220 156 / .28)); border-radius: var(--ec-r-lg, 22px);
  background: var(--ec-glass, none), var(--ec-glass-fill, rgb(28 9 7 / .62));
  box-shadow: var(--ec-shadow-1, none);
  transition: transform var(--ec-fast, .16s) var(--ec-ease, ease), border-color var(--ec-fast, .16s), box-shadow var(--ec-med, .3s);
}
.hub-daily:hover { transform: translateY(-2px); border-color: var(--ec-line-3, rgb(246 220 156 / .5)); box-shadow: var(--ec-glow-gold, none); }
.hub-daily:focus-visible { outline: 2px solid var(--ec-gold-hi, #f6dc9c); outline-offset: 3px; }
.hub-daily[data-state="new"] { border-color: rgb(246 220 156 / .45); }
.hub-daily[data-state="done"] { background: rgb(28 9 7 / .45); }
.hub-daily { min-height: 104px; }
.hub-daily-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-laurel, .hub-mask { display: none; }
.hub-dailies-head h2 { display: inline-flex; align-items: center; gap: 14px; }
.hub-daily-photo {
  position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  background: center 20% / cover no-repeat, radial-gradient(circle at 35% 30%, #5a2620, #200a08);
  border: 2px solid var(--ec-gold-lo, #8f6526); box-shadow: 0 6px 18px rgb(0 0 0 / .5);
}
.hub-daily-photo b { font: 700 34px/1 var(--ec-font-display); color: var(--ec-gold-hi, #f6dc9c); }
.hub-phone { width: 40px; height: 40px; color: var(--ec-gold-hi, #f6dc9c); }
.hub-phone-buzz { opacity: 0; }
.hub-daily-photo.is-ringing .hub-phone { animation: hub-ring 2.4s ease-in-out infinite; transform-origin: 50% 60%; }
.hub-daily-photo.is-ringing .hub-phone-buzz { animation: hub-buzz 2.4s ease-in-out infinite; }
@keyframes hub-ring { 0%, 52%, 100% { transform: rotate(0); } 6%, 18%, 30% { transform: rotate(-9deg); } 12%, 24%, 36% { transform: rotate(9deg); } 42% { transform: rotate(0); } }
@keyframes hub-buzz { 0%, 46%, 100% { opacity: 0; } 6%, 36% { opacity: .85; } }
.hub-footnote { width: 40px; height: 40px; color: var(--ec-gold-hi, #f6dc9c); overflow: visible; }
.hub-footnote-glass { fill: #3a1712; }
.hub-daily-photo.is-searching .hub-footnote-lens { animation: hub-search 3.2s ease-in-out infinite; }
@keyframes hub-search { 0%, 60%, 100% { transform: translate(0, 0); } 15% { transform: translate(-3px, -2px); } 30% { transform: translate(-6px, -9px); } 45% { transform: translate(-2px, -4px); } }
.hub-ping { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #e2483d; border: 2px solid #2a0d0a; }
.hub-ping::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #e2483d; animation: hub-ping 1.8s ease-out infinite; }
@keyframes hub-ping { to { transform: scale(2.4); opacity: 0; } }
.hub-daily-body { display: grid; gap: 4px; min-width: 0; }
.hub-daily-kicker { color: var(--ec-gold-hi, #f6dc9c); font: 700 clamp(26px, 2.6vw, 32px)/1.05 var(--ec-font-display); letter-spacing: .01em; }
.hub-daily-body strong { font: 600 clamp(16px, 1.4vw, 18px)/1.2 var(--ec-font-ui); color: #fff6e6; }
.hub-daily-line { color: var(--ec-text-2, #dcc8aa); font-size: 14px; line-height: 1.4; }
.hub-daily-line b { color: var(--ec-gold-hi, #f6dc9c); font-weight: 650; }
.hub-daily-meta { display: flex; align-items: center; gap: 10px; margin-top: 2px; color: var(--ec-text-3, #a99179); font-size: 12.5px; }
.hub-chip { font-style: normal; padding: 2px 9px; border-radius: 99px; background: rgb(246 220 156 / .12); color: var(--ec-gold-hi, #f6dc9c); font-weight: 650; }
.hub-daily[data-state="new"] .hub-chip { background: #b8362e; color: #fff3e6; }
.hub-daily[data-state="done"] .hub-chip { background: rgb(166 220 143 / .16); color: var(--ec-right, #a6dc8f); }
.hub-daily-go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ec-gold, #d9ab52); color: #2a0d0a; font-weight: 800; font-size: 18px; transition: transform var(--ec-fast, .16s) var(--ec-ease, ease); }
.hub-daily:hover .hub-daily-go { transform: translateX(3px); }
.hub-daily[data-state="done"] .hub-daily-go { background: rgb(166 220 143 / .2); color: var(--ec-right, #a6dc8f); }

/* ---- The Arena ---------------------------------------------------------- */
.hub-arena {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-rows: 1fr auto;
  min-height: clamp(420px, 58vh, 600px);
  border: 1px solid var(--ec-line-2, rgb(246 220 156 / .28)); border-radius: var(--ec-r-lg, 22px);
  box-shadow: var(--ec-shadow-2, none);
}
.hub-arena-art { position: absolute; inset: 0; z-index: -2; background: url("assets/loading-covers/teslas-workshop.jpg") center 40% / cover; filter: brightness(.62) saturate(1.1); animation: hub-drift 24s ease-in-out infinite alternate; }
.hub-arena::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(20 4 3 / .95) 0%, rgb(20 4 3 / .7) 45%, rgb(20 4 3 / .15) 75%), linear-gradient(0deg, rgb(20 4 3 / .92), transparent 40%); }
@keyframes hub-drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateX(-1.5%); } }
.hub-arena-copy { grid-column: 1; grid-row: 1; align-self: center; padding: clamp(24px, 4vw, 52px); display: grid; gap: 14px; }
.hub-arena-titles { display: grid; gap: 6px; }
.hub-arena-titles .hub-eyebrow { margin: 0; }
.hub-arena-copy #hub-arena-title { margin: 0 0 0 -.05em; /* cancel the big "T" side-bearing so it lines up with the text below */ font: 700 clamp(52px, 7vw, 92px)/.92 var(--ec-font-display); color: #fff6e6; text-shadow: 0 4px 24px rgb(0 0 0 / .7); }
.hub-arena-tagline { margin: 0; font: 600 clamp(22px, 2.4vw, 30px)/1.15 var(--ec-font-display); color: var(--ec-text-2, #dcc8aa); text-shadow: 0 2px 14px rgb(0 0 0 / .6); }
.hub-arena-cta { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 12px; margin-top: 6px; }
.hub-btn {
  display: grid; gap: 2px; min-width: 0; padding: 14px 22px; text-align: left;
  border-radius: 14px; border: 1px solid var(--ec-line-3, rgb(246 220 156 / .5));
  background: rgb(24 8 6 / .7); backdrop-filter: blur(6px);
  transition: transform var(--ec-fast, .16s) var(--ec-ease, ease), box-shadow var(--ec-med, .3s), background var(--ec-fast, .16s);
}
.hub-btn span { font: 700 18px/1.1 var(--ec-font-ui); }
.hub-btn small { color: var(--ec-text-2, #dcc8aa); font-size: 12.5px; }
.hub-btn:hover { transform: translateY(-2px); box-shadow: var(--ec-glow-gold, none); }
.hub-btn.is-primary { background: linear-gradient(180deg, #e6bd63, #b98a36); border-color: #f6dc9c; color: #2a0d0a; }
.hub-btn.is-primary small { color: #4a2a10; }
.hub-btn:focus-visible, .hub-modes button:focus-visible { outline: 2px solid var(--ec-gold-hi, #f6dc9c); outline-offset: 3px; }
.hub-arena-champs { grid-column: 2; grid-row: 1; position: relative; align-self: end; justify-self: center; width: 100%; height: 100%; min-height: 300px; pointer-events: none; }
.hub-arena-champs img { position: absolute; bottom: 8%; width: clamp(120px, 15vw, 190px); aspect-ratio: 5 / 7; object-fit: cover; border-radius: 14px; border: 2px solid rgb(246 220 156 / .55); box-shadow: 0 20px 40px rgb(0 0 0 / .6); }
.hub-arena-champs img:nth-child(1) { left: 6%; transform: rotate(-9deg); }
.hub-arena-champs img:nth-child(2) { left: 50%; bottom: 14%; transform: translateX(-50%); z-index: 1; }
.hub-arena-champs img:nth-child(3) { right: 6%; transform: rotate(9deg); }
/* Desktop: the fan sits higher and further left, centred over the window light */
@media (min-width: 861px) {
  .hub-arena-champs { --cw: clamp(120px, 15vw, 190px); }
  .hub-arena-champs img { bottom: auto; top: 50%; }
  .hub-arena-champs img:nth-child(1) { left: calc(37% - var(--cw) * 1.4); right: auto; transform: translateY(-48%) rotate(-9deg); }
  .hub-arena-champs img:nth-child(2) { left: 37%; transform: translate(-50%, -56%); }
  .hub-arena-champs img:nth-child(3) { left: calc(37% + var(--cw) * .4); right: auto; transform: translateY(-48%) rotate(9deg); }
}
.hub-modes { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--ec-line, rgb(246 220 156 / .13)); border-top: 1px solid var(--ec-line-2, rgb(246 220 156 / .28)); }
.hub-modes button { display: grid; gap: 2px; padding: 14px 18px; text-align: left; border: 0; background: rgb(20 6 5 / .82); transition: background var(--ec-fast, .16s); }
.hub-modes button:hover { background: rgb(60 20 16 / .9); }
.hub-modes b { font-weight: 650; font-size: 15px; color: #fff6e6; }
.hub-modes small { color: var(--ec-text-3, #a99179); font-size: 12.5px; }

@media (max-width: 860px) {
  .hub-daily-grid { grid-template-columns: 1fr; }
  .hub-arena { grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 0; }
  .hub-arena-champs { grid-column: 1; grid-row: 1; min-height: 190px; height: 190px; }
  .hub-arena-champs img { width: 110px; bottom: 0; }
  .hub-arena-copy { grid-row: 2; padding-top: 4px; }
  .hub-modes { grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-arena::after { background: linear-gradient(0deg, rgb(20 4 3 / .96) 30%, rgb(20 4 3 / .35)); }
}
@media (max-width: 480px) {
  .hub-daily { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 12px; }
  .hub-daily-go { display: none; }
  .hub-daily-photo { width: 54px; height: 54px; }
  .hub-arena-cta { grid-template-columns: 1fr; }
}
/* ---- Rounded dailies (trial): same size cards, softer corners (meander band clipped to the curve) ---- */
.hub-daily-grid.is-round .hub-daily { border-radius: 24px !important; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .hub-arena-art, .hub-ping::after, .hub-daily-photo.is-ringing .hub-phone, .hub-daily-photo.is-searching .hub-footnote-lens { animation: none; }
  .hub-daily-photo.is-ringing .hub-phone-buzz { animation: none; opacity: .85; }
  .hub-daily, .hub-btn, .hub-daily-go { transition: none; }
}
