/* App chrome for the director surface and the contestant PWA. */

.app-head { border-bottom: 1px solid var(--rule); background: var(--cream); position: sticky; top: 0; z-index: 60; }
.app-head > .page { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; min-width: 0; }
.app-head .brand__mark { font-size: 1.28rem; }
.app-nav {
  display: flex; gap: 22px; align-items: center; white-space: nowrap;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  /* On a phone the four items are wider than the header. Let them scroll rather than push
     the whole page sideways — a contestant is almost always on a phone. */
  overflow-x: auto; scrollbar-width: none; min-width: 0;
}
.app-nav::-webkit-scrollbar { display: none; }
.app-nav a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--wine); padding-bottom: 3px; }
@media (max-width: 640px) {
  .app-nav { gap: 13px; font-size: 0.64rem; letter-spacing: 0.06em; }
  .app-head .brand__mark { font-size: 1.05rem; }
  .app-head > .page { gap: 10px; }
}

.app-main { padding: 2.2rem 0 4rem; }
.app-title { font-family: "Fraunces", Georgia, serif; font-weight: 350; font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin: 0 0 0.3rem; line-height: 1.1; }
.app-sub { color: var(--ink-soft); margin: 0 0 1.8rem; }

/* The day-one director home: exactly three things. */
.three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .three-up { grid-template-columns: 1fr; } }
.big-action {
  display: block; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 26px 24px 24px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
}
.big-action:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.big-action__label { font-family: "Fraunces", Georgia, serif; font-size: 1.42rem; margin: 0 0 0.35rem; }
.big-action__sub { color: var(--ink-soft); font-size: 0.93rem; margin: 0; }
.big-action__stat { font-family: "Fraunces", Georgia, serif; font-size: 2.4rem; color: var(--wine); line-height: 1; margin-bottom: 0.6rem; }

.stack > * + * { margin-top: 1.4rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow { flex: 1; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 1.8rem; overflow-x: auto; }
.tabs button {
  background: none; border: none; padding: 10px 16px; cursor: pointer; white-space: nowrap;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.is-active { color: var(--ink); border-bottom-color: var(--wine); }
.tab-panel[hidden] { display: none; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }
.empty h3 { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 1.3rem; color: var(--ink); margin: 0 0 0.5rem; }

/* Contestant app */
.app-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 20px; margin-bottom: 16px; }
.app-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 0.9rem; }
.app-card__title { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: 1.24rem; margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.timeline li:last-child { border-bottom: none; }
.timeline .when { font-variant-numeric: tabular-nums; color: var(--ink-soft); min-width: 82px; font-size: 0.9rem; }
.timeline li.is-mine { background: var(--cream-2); margin: 0 -10px; padding: 10px; border-radius: 3px; }
.timeline li.is-mine .what { font-weight: 600; }
.mine-tag { display: inline-block; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wine); margin-left: 8px; }

.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-list li { border-bottom: 1px solid var(--rule-soft); }
.msg-list a { display: block; padding: 14px 0; }
.msg-list .subject { font-family: "Fraunces", Georgia, serif; font-size: 1.1rem; }
.msg-list li.is-unread .subject::before { content: "●"; color: var(--wine); font-size: 0.6rem; vertical-align: middle; margin-right: 8px; }
.msg-list .meta { font-size: 0.82rem; color: var(--ink-faint); }

/* Install walkthrough */
.walk { max-width: 460px; margin: 0 auto; }
.walk__steps { counter-reset: step; list-style: none; padding: 0; margin: 1.6rem 0; }
.walk__steps li {
  counter-increment: step; position: relative; padding: 0 0 1.3rem 46px; font-size: 1.02rem;
}
.walk__steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--wine); color: var(--cream);
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 600;
}
.walk__share { display: inline-block; vertical-align: -3px; }
.walk__demote { display: block; text-align: center; margin-top: 1.6rem; font-size: 0.86rem; color: var(--ink-faint); }
.walk__demote a { color: var(--ink-faint); text-decoration: underline; }

/* The draw */
.draw-stage {
  background: var(--ink); color: var(--cream); border-radius: 5px; padding: 3rem 1.5rem;
  text-align: center; overflow: hidden; position: relative; min-height: 210px;
  display: grid; place-items: center;
}
.draw-reel { font-family: "Fraunces", Georgia, serif; font-size: clamp(1.7rem, 6vw, 3.4rem); line-height: 1.15; }
.draw-reel.is-winner { color: var(--gold-soft); font-style: italic; }
.draw-pool { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin-top: 1rem; }

@media print {
  .app-head, .site-foot, .no-print { display: none !important; }
  body::before { display: none; }
  body { background: #fff; }
}
