/* [나] and the account screens: me, delete confirms, privacy, welcome, install, login, team, check-in, go (design d1).
   Shared tokens, hero, sheet, buttons and chips live in /static/style.css. */

/* ───────── Sheet pages ───────── */

.me-sec + .me-sec { margin-top: 30px; }
.sheet .me-sec h2 { margin: 0 0 6px; }
.done { color: var(--minari); font-weight: 700; }

/* 내 기록 — date small above, place bold, rating as a tinted pill on the right. */
.records .rec { display: grid; flex: 1; min-width: 0; }
.rec-date { font-size: 13px; font-weight: 600; color: var(--muted); }
.rec-what { font-size: 16px; }
.rec-what b { font-weight: 800; }
.badge:empty { display: none; }
.badge[data-rating="1"] { background: color-mix(in srgb, var(--minari) 14%, var(--rice)); color: color-mix(in srgb, var(--minari) 75%, #000); } /* 5.8:1 */
.badge[data-rating="-1"] { background: color-mix(in srgb, var(--danger) 10%, var(--rice)); color: var(--danger); }

/* 내 팀 스페이스 — one row per team: membership on the left, push as a switch on the right. */
.spaces { display: grid; gap: 0; }
.space-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}
.space-row:first-of-type { border-top: 0; }
.space-row label { display: flex; align-items: center; gap: 10px; min-height: 56px; cursor: pointer; }
.space-name { flex: 1; font-size: 17px; font-weight: 800; }
.space-name input { width: 24px; height: 24px; flex: none; }
.space-push { font-size: 14px; font-weight: 700; color: var(--muted); }
.space-push input {
  order: 2;
  appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: #D9CCC2;
  transition: background 0.2s ease;
}
.space-push input::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(42, 23, 18, 0.3);
  transition: transform 0.2s ease;
}
.space-push input:checked { background: var(--minari); }
.space-push input:checked::after { transform: translateX(18px); }
.space-push:has(input:checked) { color: var(--soy); }
.space-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

.main-team { margin-top: 18px; padding: 16px; border-radius: 22px; background: color-mix(in srgb, var(--soy) 4%, var(--rice)); }
.main-team legend { float: left; width: 100%; font-size: 15px; }
.main-team .muted { clear: both; margin: 2px 0 10px; font-size: 14px; }
.main-team .chips { margin: 0; }
.spaces > button { margin-top: 16px; }
.wide { width: 100%; }

/* 알림 */
.push-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.push-row form { margin: 0; }
.push-on { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--minari); font-weight: 800; }
.push-on::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(30, 122, 76, 0.18); }

/* 식당 관리 · 관리 */
ul.go-links { margin-top: 30px; border-top: 1px solid var(--line); }
ul.go-links > li { padding: 0; }
.go-links a { display: flex; align-items: center; justify-content: space-between; flex: 1; min-height: 56px; padding: 0 8px 0 4px; font-size: 16px; text-decoration: none; }
.go-links a::after {
  content: "";
  width: 9px; height: 9px;
  border-top: 2.5px solid var(--muted);
  border-right: 2.5px solid var(--muted);
  transform: rotate(45deg);
}

.me-foot { align-items: center; justify-content: space-between; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.me-foot form { margin: 0; }

/* 날씨 출처 (MET Norway, CC BY 4.0) — the quietest line on the page. */
.credit { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.doc-source { margin-top: 28px; }
.doc-source .credit { margin: 0; }

/* 삭제 확인 — the danger button is the only loud thing. */
.confirm-text p { margin: 0 0 12px; font-size: 16px; }
.confirm-actions { display: grid; gap: 10px; margin-top: 22px; }
.confirm-actions .button, .confirm-actions button { width: 100%; min-height: 56px; }

/* 개인정보 안내 · 동의 */
.page-doc .notice { padding: 2px 2px 0; background: none; font-size: 15px; white-space: pre-line; }
.bottom-bar { position: sticky; z-index: 2; bottom: calc(14px + env(safe-area-inset-bottom)); margin-top: 18px; }
.bottom-bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -22px -18px -14px;
  border-radius: 0 0 32px 32px;   /* the sheet's own corners: on wide screens a square fade poked out past them */
  background: linear-gradient(rgba(255, 252, 247, 0), var(--rice) 45%);
}
.bottom-bar button { width: 100%; min-height: 60px; font-size: 18px; box-shadow: 0 10px 24px color-mix(in srgb, var(--stage) 38%, transparent); }
.page-welcome .sheet { padding-bottom: 20px; }

/* 설치 방법 — the app icon as it will sit on the home screen, then big numbered steps. */
.app-icon {
  width: 96px; height: 96px;
  margin: 6px auto 12px;
  border-radius: 24px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 16px 26px rgba(40, 0, 0, 0.35);
}
.steps { counter-reset: step; display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.steps li {
  counter-increment: step;
  position: relative;
  min-height: 60px;
  padding: 8px 0 8px 54px;
  font-size: 16px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 6px;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--stage) 10%, var(--rice));
  color: var(--stage);
  font: 22px/1 var(--display);
}
.steps strong { font-weight: 800; }
.tip { margin-top: 10px; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--sesame) 22%, var(--rice)); font-size: 15px; }

/* ───────── 오늘 어디서 드셨어요? ───────── */

.search { display: flex; gap: 8px; margin-bottom: 14px; }
.search input { flex: 1; }
.search button { min-height: 48px; }
.picks { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.picks label {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  column-gap: 14px;
  align-items: center;
  min-height: 60px;
  padding: 8px 16px 8px 14px;
  border: 2px solid transparent;
  border-radius: 22px;
  cursor: pointer;
}
.picks input {
  appearance: none;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  margin: 0;
  border: 2px solid #C9B9AE;
  border-radius: 50%;
  background: #fff;
}
.picks input::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--stage); transform: scale(0); transition: transform 0.15s ease; }
.picks input:checked { border-color: var(--stage); }
.picks input:checked::after { transform: scale(1); }
.picks input:focus-visible { outline: 3px solid var(--soy); outline-offset: 3px; }
.picks label:has(input:checked) { border-color: var(--stage); background: color-mix(in srgb, var(--stage) 7%, var(--rice)); }
.pick-name { font-size: 17px; font-weight: 800; line-height: 1.35; }
.pick-walk { display: flex; align-items: baseline; gap: 2px; font-size: 14px; font-weight: 700; }
.pick-walk small { margin-right: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pick-walk b { font: 28px/1 var(--display); color: var(--stage); }
.price-q { margin: 24px 0 0 !important; font-weight: 800; }
.rate-bar { position: sticky; z-index: 2; bottom: var(--dock); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.rate-bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -16px -18px -10px;
  background: linear-gradient(rgba(255, 252, 247, 0), var(--rice) 40%);
}
.rate-bar button { min-height: 60px; padding: 0 8px; font-size: 18px; }
.rate-bar button:not(:first-child) { background: color-mix(in srgb, var(--stage) 10%, var(--rice)); color: var(--soy); }

/* ───────── Full-screen moments: login, go ───────── */

.page-moment main { padding-top: 0; }
.moment {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  min-height: 100dvh;
  padding: 48px 24px calc(48px + env(safe-area-inset-bottom));
  color: #fff;
  text-align: center;
}
.page-go .moment { padding-bottom: calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }
.moment :focus-visible { outline-color: #fff; }
.moment p { margin: 0; }
.moment-dish { position: relative; display: grid; place-items: center; width: 220px; height: 204px; }
.moment-dish img { position: relative; width: 200px; height: 200px; filter: drop-shadow(0 18px 16px rgba(40, 0, 0, 0.35)); }
.moment-halo {
  position: absolute;
  inset: -80px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 150, 0.45), rgba(255, 190, 110, 0.12) 60%, transparent 100%);
}
.moment-steam { position: absolute; left: 50%; top: -38px; width: 120px; height: 110px; transform: translateX(-50%); pointer-events: none; }
.moment-steam i {
  position: absolute;
  bottom: 0;
  width: 22px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  filter: blur(6px);
  opacity: 0;
  animation: me-steam 3.4s ease-in infinite;
}
.moment-steam i:nth-child(1) { left: 22px; animation-delay: 0.6s; }
.moment-steam i:nth-child(2) { left: 50px; height: 96px; animation-delay: 1.5s; }
.moment-steam i:nth-child(3) { left: 78px; animation-delay: 1.1s; }
.moment-title .wordmark { display: block; width: min(80vw, 340px); height: auto; filter: drop-shadow(0 5px 0 rgba(40, 0, 0, 0.22)); }
.moment-title {
  margin: 22px 0 0;
  font: clamp(72px, 24vw, 104px)/1 var(--display);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-shadow: 0 5px 0 rgba(40, 0, 0, 0.22);
}
.moment-cta {
  min-height: 60px;
  margin-top: 34px;
  padding: 0 34px;
  background: #fff;
  color: var(--soy);
  font-size: 18px;
  box-shadow: 0 12px 26px rgba(20, 4, 0, 0.3);
}
.moment .error { margin-top: 22px; max-width: 340px; background: #fff; }
.moment-hint { max-width: 300px; margin-top: 22px !important; font-size: 14px; font-weight: 600; opacity: 0.9; }
.moment-link { display: inline-flex; align-items: center; min-height: 48px; margin-top: 12px; padding: 0 12px; font-size: 16px; font-weight: 700; }

/* Embedded browser: one rice card with the address to copy. */
.moment-card {
  width: 100%;
  max-width: 360px;
  margin-top: 26px;
  padding: 20px 18px;
  border-radius: 26px;
  background: var(--rice);
  color: var(--soy);
  text-align: left;
  box-shadow: 0 14px 30px rgba(30, 0, 0, 0.25);
}
.moment-card h2 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.moment-card p { margin-bottom: 14px; font-size: 15px; color: var(--muted); }
.moment-card button { width: 100%; margin-top: 10px; }
.moment-card :focus-visible { outline-color: var(--soy); }

/* 어느 팀이세요? — the question on the stage, one big rice button per team (typed names: body face), 나중에 small. */
.page-team .moment-dish { width: 150px; height: 140px; }
.page-team .moment-dish img { width: 136px; height: 136px; }
.team-q {
  margin: 14px 0 0;
  font: clamp(38px, 11vw, 52px)/1.1 var(--display);
  font-weight: 400;
  text-shadow: 0 4px 0 rgba(40, 0, 0, 0.22);
  text-wrap: balance;
}
.team-q { animation: me-pop 0.6s cubic-bezier(.3, 1.5, .5, 1) 0.45s both; }
.team-pick:active { transform: scale(0.97); }
.team-picks { display: grid; gap: 10px; width: 100%; max-width: 340px; margin-top: 26px; }
/* Five teams or more: two columns, so 나중에 stays on a small phone's first screen. */
.team-picks:has(> .team-pick:nth-of-type(5)) { grid-template-columns: 1fr 1fr; }
.team-picks:has(> .team-pick:nth-of-type(5)) .team-pick { padding: 8px 12px; border-radius: 24px; font-size: 17px; }
.team-picks .team-pick:last-child:nth-of-type(odd) { grid-column: 1 / -1; }
.team-pick {
  min-height: 60px;
  padding-block: 8px;   /* a two-line team name keeps clear of the pill's edge */
  background: var(--rice);
  color: var(--soy);
  font: 800 19px/1.25 var(--body);
  box-shadow: 0 10px 22px rgba(20, 4, 0, 0.25);
}
.moment .team-why {
  max-width: 320px;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  text-wrap: balance;
  opacity: 0.92;
}
.team-later {
  min-height: 44px;
  margin-top: 8px;
  padding: 0 14px;
  background: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Short phones (375x667): a smaller dish and tighter gaps, so four rows of teams and 나중에 fit the first screen. */
@media (max-height: 720px) {
  .page-team .moment { padding-top: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .page-team .moment-dish { width: 100px; height: 92px; }
  .page-team .moment-dish img { width: 88px; height: 88px; }
  .team-q { margin-top: 8px; }
  .team-picks { margin-top: 18px; }
  .team-pick { min-height: 54px; }
  .moment .team-why { margin-top: 16px; }
}

/* go: decided! The plate lands, a gold ring bursts once, then the place name. */
.go-msg { max-width: 330px; margin-top: 24px !important; font-size: 19px; font-weight: 700; line-height: 1.45; }
.go-place { display: block; margin: 4px 0; font-size: clamp(30px, 9vw, 38px); font-weight: 900; line-height: 1.2; }
.moment-burst {
  position: absolute;
  inset: 6px;
  border: 6px solid var(--sesame);
  border-radius: 50%;
  opacity: 0;
}

.moment-dish img { animation: me-drop 0.85s cubic-bezier(.25, .9, .3, 1) both; }
.moment-halo { animation: me-bloom 0.7s cubic-bezier(.2, .8, .2, 1) both; }
.moment-title, .go-place { animation: me-pop 0.6s cubic-bezier(.3, 1.5, .5, 1) 0.45s both; }
.moment-burst { animation: me-burst 0.9s ease-out 0.5s; }

@keyframes me-drop {
  0%   { transform: translateY(-90px) scale(0.6) rotate(-14deg); opacity: 0; }
  45%  { transform: translateY(8px) scale(1.06, 0.92) rotate(2deg); opacity: 1; }
  68%  { transform: translateY(-6px) scale(0.98, 1.03) rotate(-1deg); }
  100% { transform: none; }
}
@keyframes me-bloom { from { transform: scale(0.35); opacity: 0; } }
@keyframes me-pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.06); opacity: 1; }
}
@keyframes me-burst {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}
@keyframes me-steam {
  0%   { transform: translateY(16px) scaleX(0.7); opacity: 0; }
  30%  { opacity: 0.75; }
  100% { transform: translateY(-64px) scaleX(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .moment-steam { display: none; }
}

/* The check-in banner's place name is the user's text, so not the display face (shared rule proposed). */

/* ───────── PC (≥1024px): the shell's rail and wide main come from style.css ───────── */

@media (min-width: 1024px) {
  /* [나]: 내 기록 on the left; teams, 식대, 알림, links and the footer stacked on the right.
     Five rows fit the right column's most blocks; the last 1fr row takes whatever height 내 기록 needs beyond them. */
  .page-me .sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(5, auto) 1fr;
    column-gap: 56px;
    align-items: start;
  }
  .page-me .sheet > * { grid-column: 2; }
  .page-me .sheet > :first-child { grid-column: 1; grid-row: 1 / -1; }
  .page-me .sheet > :nth-child(2) { margin-top: 0; }

  /* Confirms, privacy/welcome, install, check-in: one centred reading column. Login, team and go are already centred. */
  .page-confirm main, .page-doc main, .page-install main, .page-checkin main { max-width: var(--read); }
}

/* No tabs under the sticky 좋음/보통/별로 (PC, and the right rail, style.css): the fade runs down over the --dock
   gap so rows don't show beneath it. */
@media (min-width: 1024px) {
  .rate-bar::before { bottom: calc(-1 * var(--dock)); }
}
:where(.rail-right) .rate-bar::before { bottom: calc(-1 * var(--dock)); }
