/* Header state switcher, account menu and the sign-in / choose-your-state sheet. */

/* ---------- State chip (top of every page) ---------- */
.chip-wrap, .acct-wrap { position: relative; }
.state-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; margin-right: 4px;
  border: 1px solid var(--gold); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer;
  font-family: var(--label); font-size: 12px; letter-spacing: .1em; white-space: nowrap;
}
.state-chip:hover { border-color: var(--primary); }
body.over-hero .state-chip { background: rgba(0, 0, 0, .2); color: #FFF6E6; border-color: rgba(231, 199, 122, .8); }
.sc-art { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none; padding: 3px; display: grid; place-items: center; background: var(--r-floor); }
.sc-art .art { width: 100%; height: 100%; }
.sc-pin { width: 28px; height: 28px; display: grid; place-items: center; color: var(--primary); }
body.over-hero .sc-pin { color: var(--gold-soft); }
.sc-pin svg { width: 18px; height: 18px; }
.sc-caret { font-size: 10px; opacity: .7; }
.sc-name { display: none; }
.state-chip.nudge { animation: nudge .6s var(--ease) 3; }
@keyframes nudge { 50% { transform: translateY(-3px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 40%, transparent); } }

.state-menu { right: auto; left: 50%; transform: translateX(-62%); min-width: 250px; top: 46px; }
.state-menu button, .acct-menu button, .pop-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 18px; border: 0; background: none; cursor: pointer;
  text-align: left; font: inherit; font-size: 14px; color: var(--ink);
}
.state-menu button:hover, .acct-menu button:hover, .pop-btn:hover { background: var(--bg); }
.state-menu button small { display: block; font-size: 12px; color: var(--muted); }
.state-menu button[aria-checked="true"] { background: var(--bg); box-shadow: inset 3px 0 0 var(--primary); }
.pop-h { margin: 6px 18px 6px; font-family: var(--label); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }
.pop-note { margin: 8px 18px 6px; font-size: 12px; color: var(--muted); }
.pop-who { margin: 0 18px 8px; font-weight: 600; }
.pop-who small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.acct-menu { min-width: 240px; }
#accountBtn.on::after { content: ""; position: absolute; top: 10px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* ---------- Sign-in sheet ---------- */
.auth-ov { position: fixed; inset: 0; z-index: 110; background: rgba(40, 10, 6, .55); display: grid; place-items: end center; animation: fadeIn .3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }
.auth-card {
  position: relative; width: 100%; max-height: 94svh; overflow-y: auto; background: var(--bg); display: grid;
  animation: sheetUp .45s var(--ease);
}
/* zari temple border across the top of the sheet */
.auth-card::before { content: ""; grid-column: 1 / -1; height: 18px; background: var(--temple) left bottom / 24px 18px repeat-x, var(--primary); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.auth-media { display: none; }
.auth-body { padding: 28px 22px 32px; }
.auth-body .h2 { font-size: clamp(30px, 7vw, 40px); margin-bottom: 10px; }
.auth-body .orn { justify-content: flex-start; margin-bottom: 8px; }
.auth-body .orn::before { display: none; }
.auth-sub { color: var(--muted); margin: 0 0 22px; line-height: 1.6; }
.auth-close { position: absolute; top: 8px; right: 8px; color: var(--ink); }
.auth-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 0 0 22px; }
.auth-tabs button { border: 0; background: none; padding: 10px 0; cursor: pointer; font-family: var(--label); letter-spacing: .12em; font-size: 13px; color: var(--muted); position: relative; }
.auth-tabs button[aria-selected="true"] { color: var(--primary); }
.auth-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); }
.auth-body .field input { border-radius: 2px; }
.auth-body .hint { color: var(--muted); font-size: 12px; }
.auth-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.auth-link { display: block; margin: 18px auto 0; border: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; font-size: 14px; }
.auth-link:hover { color: var(--primary); }

.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 14px 8px 12px; cursor: pointer;
  border: 0; border-radius: var(--arch); color: var(--r-on); background: var(--r-floor); font: inherit;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.pick:first-child { grid-column: 1 / -1; }
.pick::before { content: ""; position: absolute; inset: 5px; border: 1px solid color-mix(in srgb, var(--r-gold) 70%, transparent); border-radius: var(--arch); pointer-events: none; }
.pick:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(52, 16, 12, .2); }
.pick[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold); }
.pick.busy { opacity: .7; }
.pick:disabled { cursor: progress; }
.pick-art { width: 64px; height: 64px; }
.pick-greet { font-weight: 700; font-size: 18px; line-height: 1.4; }
.pick-name { font-family: var(--label); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--r-gold); }

/* ---------- Personal home ---------- */
.my-hero { position: relative; padding-top: 72px; }
.my-hero .toran { top: 0; }
.my-hero .st-native { line-height: 1.3; }
.lede.center { text-align: center; margin: -16px auto 32px; }

@media (min-width: 640px) {
  .sc-name { display: inline; }
  .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick:first-child { grid-column: auto; }
}
@media (min-width: 760px) {
  .auth-ov { place-items: center; padding: 24px; }
  .auth-card { width: min(920px, 100%); grid-template-columns: 0.85fr 1.15fr; border-radius: 2px; box-shadow: 0 30px 80px rgba(30, 6, 4, .4); }
  .auth-media { display: block; position: relative; min-height: 100%; background: var(--primary); overflow: hidden; }
  .auth-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .auth-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(52, 12, 8, .85)); }
  .auth-media-copy { position: absolute; z-index: 1; left: 28px; bottom: 28px; color: #FFF6E6; display: grid; }
  .auth-media-copy span { font-family: "Noto Serif Tamil", serif; font-weight: 700; color: var(--gold-soft); font-size: 18px; }
  .auth-media-copy strong { font-family: var(--display); font-weight: 400; font-size: 34px; }
  .auth-body { padding: 40px 44px 36px; }
}
@media (min-width: 960px) {
  .my-hero { padding-top: 96px; }
}

/* Phones: keep the switcher to a small badge so the logo has room. */
@media (max-width: 639px) {
  .state-chip { height: 36px; width: 36px; padding: 0; margin: 0 2px 0 0; justify-content: center; gap: 0; border-width: 1.5px; }
  .state-chip .sc-caret { display: none; }
  .logo { font-size: 20px; }
  .logo-sub { font-size: 9px; }
  .state-menu { transform: translateX(-70%); }
}
