:root {
  --paper: #fffaf6;
  --paper-strong: #ffffff;
  --ink: #2d211d;
  --ink-soft: #77655d;
  --line: rgba(103, 70, 55, 0.12);
  --coral: #f05b49;
  --coral-dark: #d84436;
  --coral-soft: #ffebe5;
  --gold: #f6a94a;
  --mint: #5f9d83;
  --shadow: 0 20px 50px rgba(83, 48, 34, 0.10);
  --nav-height: 76px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #f4ede8;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #f4ede8;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 211, 184, 0.45), transparent 28rem),
    linear-gradient(160deg, #f8f1eb, #efe7e1);
  touch-action: manipulation;
}

button,
input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 18px calc(var(--nav-height) + 34px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 92% -4%, rgba(255, 211, 180, 0.42), transparent 16rem),
    var(--paper);
  box-shadow: 0 0 60px rgba(72, 43, 31, 0.08);
  overflow: hidden;
}

.page { display: none; animation: page-in 240ms ease-out; }
.page.is-active { display: block; }

.hero { padding: 16px 4px 18px; }
.hero-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-title-row h1 { flex: 1; }
.account-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(114, 79, 64, 0.1);
  border-radius: 50%;
  color: var(--ink-soft);
  background: #f4ece7;
  box-shadow: 0 8px 20px rgba(72, 43, 31, 0.12);
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-fallback { display: grid; width: 100%; height: 100%; place-items: center; }
.account-avatar-fallback svg { width: 58%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero h1 {
  max-width: 360px;
  margin: 8px 0 7px;
  font-size: clamp(30px, 9vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.045em;
}
.hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.hero .header-date { color: var(--ink); font-weight: 650; }
.hero .header-weather { margin-top: 7px; color: var(--ink-soft); }
.weather-row { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.weather-row::-webkit-scrollbar { display: none; }
.weather-item { padding: 6px 10px; border: 1px solid rgba(114, 79, 64, 0.08); border-radius: 999px; background: rgba(255, 255, 255, 0.58); white-space: nowrap; }

.eyebrow,
.section-kicker {
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.chip-strip {
  display: flex;
  gap: 9px;
  margin: 15px -18px 2px;
  padding: 0 18px 9px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.chip-strip::-webkit-scrollbar { display: none; }

.filter-chip,
.random-tag {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #695851;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: transform 140ms ease, color 140ms ease, background 140ms ease, border-color 140ms ease;
}
.filter-chip:active,
.random-tag:active { transform: scale(0.96); }
.filter-chip.is-active,
.random-tag.is-active {
  border-color: var(--coral);
  color: white;
  background: linear-gradient(135deg, var(--coral), #ef745f);
  box-shadow: 0 8px 18px rgba(240, 91, 73, 0.22);
}

.content-section { margin-top: 25px; }
.all-section { margin-top: 32px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-heading h2,
.filter-card-heading h2 {
  margin: 3px 0 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}
.count-pill {
  flex: 0 0 auto;
  margin-bottom: 2px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--coral-dark);
  background: var(--coral-soft);
  font-size: 12px;
  font-weight: 700;
}

.featured-list {
  display: grid;
  grid-auto-columns: 78%;
  grid-auto-flow: column;
  gap: 12px;
  margin: 0 -18px;
  padding: 0 18px 7px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.featured-list::-webkit-scrollbar { display: none; }
.featured-card {
  position: relative;
  min-height: 174px;
  padding: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  color: white;
  text-align: left;
  scroll-snap-align: start;
  box-shadow: var(--shadow);
}
.featured-card::before,
.dish-visual::before,
.sheet-visual::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), transparent 45%);
  content: "";
}
.dish-photo { display: block; object-fit: cover; }
.featured-card::before { z-index: 1; }
.featured-card .dish-photo { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; }
.featured-card.has-photo::before {
  background: linear-gradient(180deg, rgba(30, 16, 12, .08), rgba(30, 16, 12, .78));
}
.featured-card.has-photo .featured-emoji { display: none; }
.tone-0 { background: linear-gradient(145deg, #d84b3e, #8e2927); }
.tone-1 { background: linear-gradient(145deg, #e7823f, #ac462e); }
.tone-2 { background: linear-gradient(145deg, #789c79, #345f50); }
.tone-3 { background: linear-gradient(145deg, #b85a6c, #79354b); }
.tone-4 { background: linear-gradient(145deg, #a67a52, #684a38); }
.tone-5 { background: linear-gradient(145deg, #d7a33d, #9b6427); }
.featured-emoji {
  position: absolute;
  top: 19px;
  right: 20px;
  font-size: 54px;
  filter: drop-shadow(0 9px 14px rgba(53, 24, 13, 0.22));
  transform: rotate(4deg);
}
.featured-card-content { position: relative; z-index: 2; padding-top: 66px; }
.featured-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 23px;
  letter-spacing: -0.025em;
}
.featured-card span {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-block { margin-top: 26px; }
.category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.category-heading h3 { margin: 0; font-size: 18px; }
.category-heading span { color: #a18f87; font-size: 12px; }
.dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.category-expand-button {
  display: block;
  margin: 13px auto 0;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #8f7064;
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 13px;
}
.dish-card {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 21px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  text-align: left;
  box-shadow: 0 9px 24px rgba(83, 50, 36, 0.055);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.dish-card:active { transform: scale(0.98); box-shadow: 0 5px 14px rgba(83, 50, 36, 0.07); }
.dish-visual {
  position: relative;
  display: grid;
  height: 84px;
  place-items: center;
  overflow: hidden;
  color: white;
  font-size: 39px;
}
.dish-visual span { position: relative; z-index: 1; filter: drop-shadow(0 7px 10px rgba(56, 28, 17, 0.22)); }
.dish-visual .dish-photo { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; }
.dish-visual.has-photo span { visibility: hidden; }
.dish-card-body {
  display: block;
  width: 100%;
  padding: 13px 14px 14px;
  text-align: left;
}
.dish-card strong {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-tags { display: flex; min-width: 0; gap: 5px; overflow: hidden; }
.mini-tag {
  min-width: 0;
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 7px;
  color: #8a6154;
  background: #fff0ea;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  padding: 50px 18px 30px;
  color: var(--ink-soft);
  text-align: center;
}
.empty-icon { font-size: 46px; }
.empty-state h3 { margin: 12px 0 6px; color: var(--ink); }
.empty-state p { margin: 0 0 20px; font-size: 14px; }

.random-hero { padding-bottom: 15px; }
.random-filter-card {
  margin-top: 16px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
}
.filter-card-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.filter-card-heading h2 { font-size: 18px; }
.filter-card-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.filter-card-toggle h2 { margin: 2px 0 0; font-size: 18px; }
.filter-toggle-hint { display: flex; align-items: center; gap: 5px; color: var(--coral-dark); font-size: 12px; font-weight: 750; }
.filter-chevron { display: inline-block; font-size: 20px; line-height: 1; transition: transform 180ms ease; }
.filter-card-toggle[aria-expanded="true"] .filter-chevron { transform: rotate(180deg); }
.random-filter-content { padding-top: 13px; }
.filter-content-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filter-content-actions p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.text-button {
  min-height: 36px;
  padding: 0 4px;
  border: 0;
  color: var(--coral-dark);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}
.random-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.random-tag { min-height: 36px; padding: 0 12px; font-size: 12px; }
.pool-summary { margin: 13px 0 0; color: #9a887f; font-size: 12px; }

.result-card {
  position: relative;
  display: flex;
  min-height: 320px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  margin-top: 16px;
  padding: 30px 23px;
  overflow: hidden;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 205, 126, 0.45), transparent 26%),
    radial-gradient(circle at 14% 86%, rgba(249, 95, 79, 0.36), transparent 28%),
    linear-gradient(145deg, #5c302a, #2e2220 68%);
  text-align: center;
  box-shadow: 0 24px 54px rgba(62, 37, 30, 0.24);
}
.result-card.is-spinning .result-emoji { animation: spin-pop 130ms ease-in-out infinite alternate; }
.result-card.is-revealed { animation: reveal-card 420ms cubic-bezier(.2,.8,.2,1); }
.result-close {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-size: 24px;
  line-height: 1;
  backdrop-filter: blur(12px);
}
.result-close:active { transform: scale(0.94); }
.result-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
}
.orbit-one { width: 290px; height: 290px; }
.orbit-two { width: 220px; height: 220px; border-style: dashed; transform: rotate(30deg); }
.result-visual { position: relative; z-index: 1; display: grid; min-height: 82px; place-items: center; margin-bottom: 14px; }
.result-visual .dish-photo {
  width: clamp(188px, 56vw, 220px);
  height: clamp(126px, 37vw, 148px);
  border-radius: 20px;
  box-shadow: 0 13px 28px rgba(0, 0, 0, .24);
}
.result-visual.has-photo .result-emoji { display: none; }
.result-emoji {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 68px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.25));
}
.result-overline {
  position: relative;
  z-index: 1;
  color: #ffc7b5;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
}
.result-card h2 {
  position: relative;
  z-index: 1;
  margin: 7px 0 8px;
  font-size: 34px;
  letter-spacing: -0.04em;
}
.result-card p {
  position: relative;
  z-index: 1;
  max-width: 280px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.55;
}
.result-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}
.result-tag,
.sheet-tag {
  padding: 6px 9px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 650;
  backdrop-filter: blur(12px);
}

.random-actions { display: grid; gap: 10px; margin-top: 14px; }
.primary-button,
.secondary-button {
  min-height: 56px;
  border-radius: 18px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.primary-button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--coral), #ef765d);
  box-shadow: 0 12px 26px rgba(240, 91, 73, 0.26);
}
.primary-button:active { transform: translateY(1px) scale(0.995); }
.secondary-button {
  border: 1px solid rgba(240, 91, 73, 0.24);
  color: var(--coral-dark);
  background: white;
}
.button-spark { margin-right: 7px; }
.accept-button { width: 100%; }

.future-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 19px;
  padding: 15px;
  border: 1px dashed rgba(152, 113, 95, 0.24);
  border-radius: 20px;
  color: var(--ink-soft);
  background: rgba(246, 237, 231, 0.54);
}
.future-icon { font-size: 25px; }
.future-slot div:nth-child(2) { min-width: 0; flex: 1; }
.future-slot strong { display: block; color: #64524a; font-size: 13px; }
.future-send-button {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--coral);
  font-size: 12px;
  font-weight: 750;
}
.future-send-button:disabled { color: #aa9b95; background: #e9dfd9; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}
.nav-inner {
  display: grid;
  width: min(100%, 430px);
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  padding: 8px 28px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(104, 72, 58, 0.10);
  background: rgba(255, 250, 246, 0.90);
  box-shadow: 0 -15px 35px rgba(74, 43, 30, 0.08);
  backdrop-filter: blur(24px) saturate(150%);
  pointer-events: auto;
}

.checkin-header, .editor-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 2px 22px; }
.checkin-header h1, .editor-header h1 { margin: 4px 0 0; font-size: 32px; letter-spacing: -0.045em; }
.checkin-add-button, .editor-back-button { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; color: white; background: linear-gradient(135deg, var(--coral), var(--coral-dark)); box-shadow: 0 10px 25px rgba(211, 88, 62, 0.25); font-size: 29px; line-height: 1; }
.editor-header { justify-content: flex-start; }
.editor-back-button { color: var(--ink); background: #f2e8e2; box-shadow: none; font-size: 36px; }
.checkin-list { display: grid; gap: 0; }
.checkin-card { display: grid; grid-template-columns: 43px minmax(0, 1fr); gap: 10px; padding: 16px 8px; border-bottom: 1px solid rgba(103, 70, 55, .055); }
.checkin-author-avatar { width: 43px; height: 43px; overflow: hidden; border-radius: 7px; background: #eee5df; box-shadow: inset 0 0 0 1px rgba(70, 43, 32, .06); }
.checkin-author-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.checkin-card-content { position: relative; min-width: 0; }
.checkin-card-head { display: flex; min-height: 31px; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 0 4px; }
.checkin-card-head.is-titleless { position: absolute; z-index: 1; top: 0; right: 0; min-height: 30px; padding: 0; }
.checkin-card h2 { margin: 1px 0 0; color: #4f6381; font-size: 16px; line-height: 1.35; letter-spacing: -0.01em; }
.checkin-edit-button { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; margin-left: auto; padding: 0; border: 0; border-radius: 50%; color: var(--coral-dark); background: #fff0ea; }
.checkin-edit-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.checkin-card-text { margin: 0; padding: 0 0 8px; color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.55; letter-spacing: 0; white-space: pre-wrap; }
.checkin-card-head.is-titleless + .checkin-card-text { padding-right: 40px; }
.checkin-photo-strip { display: grid; width: 100%; max-width: 270px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 4px; padding: 0 0 8px; }
.checkin-photo-strip.photo-count-1 { grid-template-columns: min(100%, 220px); }
.checkin-photo-strip.photo-count-2, .checkin-photo-strip.photo-count-4 { max-width: 220px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkin-photo-strip::-webkit-scrollbar, .checkin-photo-preview::-webkit-scrollbar { display: none; }
.checkin-photo-button { display: grid; width: 100%; aspect-ratio: 1; place-items: center; overflow: hidden; padding: 0; border: 0; border-radius: 4px; background: #eee3dd; cursor: zoom-in; }
.checkin-photo-strip img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }
.checkin-photo-strip.photo-count-1 .checkin-photo-button { width: fit-content; max-width: 100%; aspect-ratio: auto; background: transparent; }
.checkin-photo-strip.photo-count-1 img { width: auto; max-width: 100%; height: auto; max-height: 260px; background: #eee3dd; }
.checkin-meta-row { display: grid; min-width: 0; align-items: start; gap: 2px; overflow: visible; color: #a6968e; font-size: 13px; line-height: 1.45; white-space: normal; }
.checkin-meta-row::-webkit-scrollbar { display: none; }
.checkin-author-time { min-width: 0; }
.checkin-location-link { min-width: 0; max-width: 100%; justify-self: start; overflow: hidden; padding: 0; border: 0; color: #2875ce; background: transparent; font: inherit; font-weight: 650; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.photo-lightbox { position: fixed; z-index: 220; inset: 0; display: grid; width: 100%; height: 100%; padding: max(20px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom)); place-items: center; border: 0; background: rgba(17, 13, 12, .94); cursor: zoom-out; }
.photo-lightbox img { display: block; max-width: 100%; max-height: 100%; border-radius: 4px; object-fit: contain; }
.checkin-map-sheet { position: fixed; z-index: 61; right: 0; bottom: 0; left: 50%; display: flex; width: min(100%, 430px); height: min(58vh, 620px); height: min(58svh, 620px); max-height: 92vh; max-height: 92svh; flex-direction: column; overflow: hidden; border-radius: 30px 30px 0 0; background: #fffaf6; box-shadow: 0 -18px 60px rgba(45, 30, 25, .22); transform: translate(-50%, var(--checkin-map-drag-y, 0)); animation: checkin-map-up 260ms ease-out; }
.checkin-map-sheet.is-dragging { animation: none; transition: none; }
.checkin-map-sheet.is-snapping-back { animation: none; transition: transform 200ms ease-out; }
.checkin-map-header { position: relative; display: block; min-height: 76px; padding: 10px 18px 8px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); cursor: grab; touch-action: none; user-select: none; }
.checkin-map-header:active { cursor: grabbing; }
.checkin-map-header > div { min-width: 0; padding: 0 72px; }
.checkin-map-header .sheet-handle { display: block; margin: 0 auto 8px; }
.checkin-map-header h2 { margin: 0; overflow: hidden; font-size: 18px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.checkin-map-header button { position: absolute; right: 18px; bottom: 9px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--coral-dark); background: #fff; font: inherit; font-weight: 750; }
.checkin-map-frame { position: relative; display: grid; min-height: 0; flex: 1 1 auto; place-items: center; overflow: hidden; background: #ece7df; }
.checkin-map-canvas { width: 100%; height: 100%; min-height: 0; }
.checkin-map-frame > img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.checkin-map-frame p { margin: 0; padding: 20px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.checkin-map-address { margin: 0; padding: 15px 18px calc(15px + env(safe-area-inset-bottom)); overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.45; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
@keyframes checkin-map-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.checkin-empty { padding: 70px 22px; text-align: center; }
.checkin-empty > span { font-size: 48px; }
.checkin-empty h2 { margin: 16px 0 7px; font-size: 21px; }
.checkin-empty p { margin: 0 0 22px; color: var(--ink-soft); line-height: 1.6; }
.checkin-empty .primary-button { width: 100%; }
.checkin-field { display: grid; gap: 8px; margin-bottom: 14px; color: var(--ink); font-size: 13px; font-weight: 750; }
.checkin-field input, .checkin-field textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; outline: 0; color: var(--ink); background: #fff; font: inherit; font-size: 16px; font-weight: 500; resize: vertical; }
.checkin-field input { min-height: 50px; }
.checkin-field input:focus, .checkin-field textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232, 112, 83, 0.12); }
.checkin-editor-section { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.72); }
.editor-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.editor-section-heading h2 { margin: 0; font-size: 17px; }
.editor-section-heading p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.photo-picker-button { flex: 0 0 auto; padding: 9px 12px; border: 0; border-radius: 12px; color: var(--coral-dark); background: #fff0ea; font-size: 12px; font-weight: 750; }
.checkin-photo-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.checkin-preview-item { position: relative; aspect-ratio: 1; min-width: 0; }
.checkin-preview-item img { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; background: #eee3dd; }
.remove-preview { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border: 0; border-radius: 50%; color: white; background: rgba(38, 27, 23, .66); font-size: 18px; }
.checkin-add-photo { display: grid; aspect-ratio: 1; place-items: center; border: 1px dashed #d9cbc4; border-radius: 13px; color: #8e7e76; background: #f7f3f0; cursor: pointer; }
.checkin-add-photo span { font-size: 38px; font-weight: 300; line-height: 1; transform: translateY(-2px); }
.location-editor { padding: 0; overflow: hidden; }
.location-picker-row { display: block; width: 100%; padding: 17px 18px; border: 0; color: var(--ink); background: transparent; text-align: left; }
.location-picker-row h2 { margin: 0; font-size: 17px; }
.location-picker-row p { margin: 5px 0 0; overflow: hidden; color: var(--ink-soft); font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.location-picker-backdrop { position: fixed; z-index: 79; inset: 0; background: rgba(37, 26, 23, .28); backdrop-filter: blur(3px); }
.location-picker { position: fixed; z-index: 80; top: 0; bottom: 0; left: 50%; display: flex; width: min(100%, 430px); flex-direction: column; overflow: hidden; transform: translateX(-50%); color: var(--ink); background: #fffaf6; box-shadow: 0 0 40px rgba(44, 29, 23, .18); }
.location-picker-header { display: grid; min-height: calc(62px + env(safe-area-inset-top)); grid-template-columns: 74px 1fr 74px; align-items: end; padding: env(safe-area-inset-top) 12px 13px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.location-picker-header h2 { align-self: center; margin: 0; font-size: 18px; text-align: center; }
.location-picker-close { align-self: center; padding: 10px 4px; border: 0; color: var(--coral-dark); background: transparent; font: inherit; font-weight: 700; text-align: left; }
.location-search-wrap { padding: 12px 16px; background: #f4ede8; }
.location-search-wrap input { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: 13px; outline: 0; color: var(--ink); background: white; font: inherit; font-size: 16px; }
.location-search-wrap input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232,112,83,.1); }
.hide-location-button { min-height: 54px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line); color: var(--coral-dark); background: white; font: inherit; font-weight: 700; text-align: left; }
.location-picker-status { margin: 0; padding: 18px; color: var(--ink-soft); font-size: 13px; }
.location-place-list { overflow-y: auto; background: white; overscroll-behavior: contain; }
.location-place-button { display: block; width: 100%; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: white; text-align: left; }
.location-place-button strong { display: block; overflow: hidden; font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.location-place-button span { display: block; margin-top: 5px; overflow: hidden; color: var(--ink-soft); font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.location-place-button:active { background: #fff1ea; }
.publication-time-note { margin: 14px 2px; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.checkin-save-button { width: 100%; }
.nav-button {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 4px;
  border: 0;
  color: #a39189;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.nav-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-button.is-active { color: var(--coral); }

.sheet-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(37, 26, 23, 0.38);
  backdrop-filter: blur(4px);
}
.dish-sheet {
  position: fixed;
  z-index: 61;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 430px);
  max-height: 88svh;
  margin: 0 auto;
  padding: 12px 20px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 30px 30px 0 0;
  background: var(--paper-strong);
  box-shadow: 0 -24px 70px rgba(50, 29, 22, 0.24);
  animation: sheet-up 260ms cubic-bezier(.2,.8,.2,1);
}
.sheet-handle { width: 42px; height: 5px; margin: 0 auto 12px; border-radius: 999px; background: #e3d8d2; }
.sheet-close {
  position: absolute;
  z-index: 5;
  top: 25px;
  right: 28px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(40, 28, 24, 0.28);
  font-size: 24px;
  backdrop-filter: blur(12px);
}
.sheet-visual {
  position: relative;
  display: grid;
  height: 170px;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  color: white;
  font-size: 75px;
}
.sheet-visual span { position: relative; z-index: 1; filter: drop-shadow(0 12px 18px rgba(50, 26, 17, 0.22)); }
.sheet-visual .dish-photo { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; }
.sheet-visual.has-photo span { visibility: hidden; }
.sheet-category { display: block; margin-top: 18px; color: var(--coral-dark); font-size: 11px; font-weight: 750; letter-spacing: 0.12em; }
.dish-sheet h2 { margin: 6px 0 8px; font-size: 29px; letter-spacing: -0.04em; }
.dish-sheet > p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.sheet-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.sheet-tag { color: #875d4f; background: #fff0ea; }
.dish-sheet .primary-button { width: 100%; }

.invite-ready { border-color: rgba(232, 112, 83, 0.2); background: linear-gradient(135deg, #fff4ef, #fffaf6); }
.invite-ready .future-badge { color: #238251; background: #e7f8ee; }
.invite-sheet { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.invite-sheet .sheet-close { color: var(--ink-soft); background: #f4ece7; }
.invite-dish { margin-bottom: 18px !important; color: var(--ink) !important; font-weight: 700; }
.invite-time-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.invite-time-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  background: #fff;
  font-weight: 700;
}
.invite-time-button.is-active { border-color: var(--coral); color: var(--coral-dark); background: #fff0ea; }
.field-label { display: grid; gap: 7px; margin: 14px 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.invite-input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
}
.invite-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232, 112, 83, 0.12); }
.message-preview { margin: 16px 0; padding: 14px; border-radius: 16px; background: #f8f3ef; }
.message-preview span { color: var(--ink-soft); font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.message-preview p { margin: 7px 0 0; color: var(--ink); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.invite-status { min-height: 20px; margin-top: 10px !important; text-align: center; }
.invite-status.is-error { color: #b33a31; }

.dialog-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgba(37, 26, 23, 0.46);
  backdrop-filter: blur(5px);
}
.confirm-dialog {
  position: fixed;
  z-index: 81;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 38px), 390px);
  padding: 25px 22px 21px;
  border-radius: 26px;
  background: var(--paper-strong);
  box-shadow: 0 28px 80px rgba(50, 29, 22, 0.28);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: dialog-in 200ms cubic-bezier(.2,.8,.2,1);
}
.confirm-icon { font-size: 38px; }
.confirm-dialog h2 { margin: 12px 0 8px; font-size: 21px; letter-spacing: -0.025em; }
.confirm-dialog p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.confirm-actions { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 9px; margin-top: 20px; }
.confirm-actions .secondary-button,
.danger-button { min-height: 50px; border-radius: 16px; font-size: 13px; font-weight: 750; }
.danger-button { border: 0; color: white; background: linear-gradient(135deg, #c9473c, #a72f2b); }
.danger-button:disabled { opacity: 0.65; }

.auth-screen {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  padding: max(30px, env(safe-area-inset-top)) 20px max(30px, env(safe-area-inset-bottom));
  place-items: center;
  overflow-y: auto;
  background: radial-gradient(circle at 15% 8%, #ffd8c3, transparent 42%), var(--paper);
}
.auth-card { width: min(100%, 370px); padding: 30px 25px; border-radius: 30px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); }
.auth-mark { display: block; margin-bottom: 12px; font-size: 42px; }
.auth-card h1 { margin: 5px 0 8px; font-size: 31px; letter-spacing: -.04em; }
.auth-intro { margin: 0 0 22px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.auth-field { display: grid; gap: 7px; margin: 13px 0; color: var(--ink); font-size: 13px; font-weight: 700; text-align: left; }
.auth-field input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 15px; outline: 0; color: var(--ink); background: #fff; font-size: 16px; }
.auth-field input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(240,91,73,.12); }
.remember-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 18px; color: var(--ink-soft); font-size: 13px; }
.auth-card .primary-button, .password-form .primary-button { width: 100%; }
.auth-status { min-height: 20px; margin: 10px 0 0; color: var(--ink-soft); font-size: 13px; text-align: center; }
.auth-status.is-error { color: #b33a31; }
.account-sheet { position: fixed; z-index: 201; top: 50%; left: 50%; width: min(calc(100% - 36px), 390px); max-height: 88svh; padding: 28px 23px 22px; overflow-y: auto; border-radius: 28px; background: #fff; box-shadow: 0 28px 80px rgba(50,29,22,.3); text-align: center; transform: translate(-50%,-50%); }
.account-close { position: absolute; top: 16px; right: 17px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--ink-soft); background: #f5efeb; font-size: 23px; }
.account-avatar.large { width: 58px; height: 58px; margin: 0 auto; font-size: 20px; }
.account-sheet h2 { margin: 12px 0 4px; font-size: 25px; }
.account-name { margin: 0; font-weight: 750; }
.account-username { margin: 4px 0 18px; color: var(--ink-soft); font-size: 13px; }
.account-note { margin: 16px 0; padding: 13px; border-radius: 14px; color: var(--ink-soft); background: #f8f3ef; font-size: 13px; }
.avatar-upload-panel { margin: 16px 0; padding: 15px; border-radius: 16px; background: #f8f3ef; }
.avatar-upload-button { display: inline-grid; min-height: 42px; padding: 0 18px; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--coral-dark); background: white; font-size: 14px; font-weight: 750; }
.avatar-upload-panel > p:not(.auth-status) { margin: 10px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.account-action-button { width: 100%; min-height: 48px; margin-top: 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #f8f3ef; font-weight: 750; }
.web-push-panel { margin: 16px 0 2px; padding: 15px; border-radius: 18px; background: #f8f3ef; text-align: left; }
.web-push-copy { display: grid; gap: 5px; }
.web-push-copy strong { font-size: 15px; }
.web-push-copy span { color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.web-push-panel .account-action-button { margin-top: 12px; background: #fff; }
.web-push-panel .web-push-button.is-enabled { border-color: rgba(54,143,78,.32); color: #287a40; background: #f1faf3; }
.web-push-panel .web-push-test-button { color: var(--coral-dark); }
.web-push-panel .auth-status { text-align: left; }
.account-credits-link { display: block; margin-top: 15px; color: var(--ink-soft); font-size: 12px; text-decoration: none; }
.account-credits-link:active { color: var(--coral-dark); }
.password-form { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); text-align: left; }
.password-form h3 { margin: 0 0 10px; text-align: center; }
.logout-button { width: 100%; min-height: 48px; margin-top: 14px; border: 1px solid var(--line); border-radius: 15px; color: #a43d35; background: #fff; font-weight: 750; }

.credits-page { min-height: 100%; margin: 0; color: var(--ink); background: #fff8f2; }
.credits-shell { width: min(100%, 720px); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 18px max(38px, env(safe-area-inset-bottom)); }
.credits-back { color: var(--coral-dark); font-size: 14px; font-weight: 700; text-decoration: none; }
.credits-shell h1 { margin: 22px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.credits-intro { margin: 0 0 22px; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.credits-list { display: grid; gap: 10px; }
.credit-card { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.84); }
.credit-card img { width: 82px; height: 82px; border-radius: 11px; object-fit: cover; background: #eee3dd; }
.credit-card h2 { margin: 1px 0 5px; font-size: 16px; }
.credit-card p { margin: 2px 0; overflow-wrap: anywhere; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.credit-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.credit-links a { color: #2875ce; font-size: 11px; font-weight: 650; text-decoration: none; }

.toast {
  position: fixed;
  z-index: 100;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  max-width: calc(100% - 38px);
  padding: 12px 18px;
  border-radius: 999px;
  color: white;
  background: rgba(45, 33, 29, 0.93);
  box-shadow: 0 12px 30px rgba(45, 33, 29, 0.2);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in 200ms ease-out;
}

[hidden] { display: none !important; }
body.sheet-open { overflow: hidden; }

@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes spin-pop { from { transform: rotate(-4deg) scale(0.88); } to { transform: rotate(4deg) scale(1.05); } }
@keyframes reveal-card { 0% { transform: scale(0.96); } 60% { transform: scale(1.015); } 100% { transform: scale(1); } }
@keyframes dialog-in { from { opacity: 0; transform: translate(-50%, -47%) scale(0.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

@media (min-width: 700px) {
  body { padding: 22px 0; }
  .app-shell { min-height: calc(100svh - 44px); border-radius: 34px; }
  .nav-inner { bottom: 22px; border: 1px solid var(--line); border-radius: 0 0 34px 34px; }
  .bottom-nav { bottom: 22px; }
}

@media (max-width: 360px) {
  .app-shell { padding-right: 14px; padding-left: 14px; }
  .chip-strip, .featured-list { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .dish-grid { gap: 8px; }
  .dish-card-body { padding: 11px; }
  .featured-list { grid-auto-columns: 84%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
