:root {
  color-scheme: light;
  --ink: #12233f;
  --muted: #62728c;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(112, 145, 190, 0.28);
  --blue: #285181;
  --blue-2: #2e94ad;
  --cyan: #11bbdd;
  --success: #18a37e;
  --danger: #ef6b7a;
  --gold: #d5a039;
  --shadow: 0 24px 56px rgba(40, 81, 129, 0.18);
  --glass-blur: blur(22px) saturate(1.2);
  --app-pad-x: clamp(12px, 3.8vw, 18px);
  --app-pad-y: clamp(8px, 1.35svh, 13px);
  --app-gap: clamp(7px, 1.05svh, 10px);
  --title-size: clamp(22px, 3svh, 27px);
  --restaurant-title-size: clamp(19px, 2.45svh, 23px);
  --status-font-size: clamp(10px, 1.55dvh, 12px);
  --info-font-size: clamp(12px, 1.75dvh, 14px);
  --chip-font-size: clamp(10px, 1.45dvh, 12px);
  --icon-size: clamp(46px, 6.8svh, 56px);
  --card-info-h: 128px;
  --deck-w: min(100%, 414px);
  --deck-h: 480px;
  --stage-h: 480px;
  --stage-pad-x: 8px;
  --stage-pad-y: 20px;
  --nudge-top: 72px;
  --guide-h: clamp(58px, 8.8dvh, 76px);
  --card-pad-x: clamp(14px, 3.5vw, 18px);
  --card-pad-y: clamp(12px, 1.75dvh, 16px);
  --floating-action-size: 52px;
  --floating-action-bottom: max(14px, env(safe-area-inset-bottom));
  font-family: Inter, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(236, 246, 255, 0.9) 48%, rgba(247, 252, 255, 0.98) 100%),
    linear-gradient(90deg, rgba(40, 81, 129, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(40, 81, 129, 0.06) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
  color: var(--ink);
  overscroll-behavior: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 187, 221, 0.18), transparent 34%, rgba(40, 81, 129, 0.1));
  pointer-events: none;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p {
  margin: 0;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100dvh;
  height: 100svh;
  margin: 0 auto;
  padding:
    max(var(--app-pad-y), env(safe-area-inset-top))
    var(--app-pad-x)
    max(var(--app-pad-y), env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--app-gap);
  overflow: hidden;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--icon-size);
  padding: 2px 0 2px 4px;
  overflow: hidden;
}

.topbar > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--blue-2);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

h1 {
  flex: 0 1 auto;
  color: var(--blue);
  font-size: var(--title-size);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 0;
  flex: 0 0 auto;
  width: var(--icon-size);
  height: var(--icon-size);
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(40, 81, 129, 0.14);
}

.status-row {
  position: relative;
  flex: 0 1 auto;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.status-row span:empty {
  display: none;
}

.status-row span {
  min-width: 44px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--blue);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 20px rgba(40, 81, 129, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.top-action {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--blue);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(40, 81, 129, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

@media (max-width: 360px) {
  .top-action {
    padding: 0 7px;
    font-size: 11px;
  }

  .status-row {
    gap: 5px;
  }
}

.top-action.primary {
  background: rgba(40, 81, 129, 0.92);
  color: #ffffff;
  border-color: rgba(40, 81, 129, 0.18);
}

.legacy-status-row {
  display: none;
}

.guide-panel {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.guide-bubble {
  position: absolute;
  max-width: min(310px, calc(100vw - 36px));
  padding: 10px 12px;
  border: 1px solid rgba(117, 158, 207, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(40, 81, 129, 0.16);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.guide-bubble::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(117, 158, 207, 0.24);
  border-bottom: 1px solid rgba(117, 158, 207, 0.24);
  transform: rotate(45deg);
}

.guide-bubble-reset {
  top: max(54px, calc(env(safe-area-inset-top) + 48px));
  right: calc(var(--app-pad-x) + 48px);
}

.guide-bubble-reset::after {
  top: 13px;
  right: -7px;
  transform: rotate(-45deg);
}

.guide-bubble-card {
  left: var(--app-pad-x);
  right: var(--app-pad-x);
  top: 142px;
  max-width: none;
}

.guide-bubble-card::after {
  left: 42px;
  bottom: -8px;
  width: 14px;
  height: 14px;
}

.guide-bubble-bookmark {
  right: calc(var(--app-pad-x) + 58px);
  bottom: calc(var(--floating-action-bottom) + var(--floating-action-size) + 12px);
}

.guide-bubble-bookmark::after {
  right: -7px;
  bottom: -7px;
  transform: rotate(45deg);
}

.guide-bubble strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
}

.guide-bubble p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 750;
}

.guide-button {
  position: absolute;
  left: var(--app-pad-x);
  bottom: var(--floating-action-bottom);
  z-index: 13;
  width: var(--floating-action-size);
  height: var(--floating-action-size);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(229, 241, 252, 0.64)),
    rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(40, 81, 129, 0.16);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.guide-button.is-active {
  background: rgba(40, 81, 129, 0.92);
  color: #ffffff;
}

.card-stage {
  height: var(--stage-h);
  min-height: var(--stage-h);
  display: grid;
  place-items: start center;
  padding: var(--stage-pad-y) var(--stage-pad-x);
  overflow: visible;
  touch-action: none;
}

.deck-stack {
  position: relative;
  width: var(--deck-w);
  height: var(--deck-h);
  min-height: 0;
  display: grid;
  place-items: stretch;
}

.ghost-card {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: none;
  grid-template-rows: minmax(0, 1fr) var(--card-info-h);
  border-radius: 28px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.88);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  will-change: transform, opacity;
}

.ghost-card.is-flying {
  display: grid;
}

.flying-card {
  margin: 0;
  box-shadow: 0 24px 56px rgba(40, 81, 129, 0.2);
  pointer-events: none;
}

.preview-card {
  position: absolute;
  left: 50%;
  top: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--card-info-h);
  border: 1px solid rgba(40, 81, 129, 0.26);
  outline: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(224, 241, 253, 0.82)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 18px 36px rgba(40, 81, 129, 0.23),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  overflow: hidden;
  will-change: transform, opacity;
  transition:
    transform 520ms cubic-bezier(.18, .92, .2, 1),
    opacity 360ms ease,
    filter 360ms ease;
}

.preview-card-one {
  transform: translateX(-50%) translateY(-5px) scale(0.982);
  z-index: 0;
  opacity: 0.82;
}

.preview-card-two {
  width: 100%;
  transform: translateX(-50%) translateY(-9px) scale(0.966);
  opacity: 0.46;
  z-index: -1;
}

.deck-stack.is-advancing .preview-card-one {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 0.86;
  filter: saturate(1.03);
}

.deck-stack.is-advancing .preview-card-two {
  transform: translateX(-50%) translateY(-5px) scale(0.982);
  opacity: 0.82;
}

.preview-save {
  flex: 0 0 auto;
  width: clamp(28px, 4.6dvh, 34px);
  height: clamp(28px, 4.6dvh, 34px);
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
  box-shadow: none;
}

.restaurant-card {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--card-info-h);
  background: var(--surface);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.88);
  user-select: none;
  touch-action: none;
  will-change: transform;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.restaurant-card .save-button,
.preview-card .preview-save {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(11, 29, 56, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.photo-wrap {
  position: relative;
  min-height: 0;
  background: #d7e8f6;
  overflow: hidden;
}

.photo-grid {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #d7e8f6;
}

.photo-grid-layer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  opacity: 0;
  transform: scale(1.008);
  transition: opacity 820ms ease, transform 1100ms ease;
}

.photo-grid-layer.is-current {
  opacity: 1;
  transform: scale(1);
}

.photo-grid-layer.is-next,
.photo-grid-layer.is-leaving {
  opacity: 0;
}

.photo-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.88), transparent 34%),
    linear-gradient(145deg, #d7edf8, #eef8fc 48%, #b9d3e8);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 1400ms ease, filter 900ms ease;
  filter: saturate(1.04) contrast(1.02);
}

.photo-tile-fallback::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 999px;
  border: 1px solid rgba(40, 81, 129, 0.18);
  background: rgba(255, 255, 255, 0.28);
}

.photo-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(11, 29, 56, 0.48));
  pointer-events: none;
}

.pattern-0 .tile-1 { grid-column: 1 / 3; grid-row: 1 / 4; }
.pattern-0 .tile-2 { grid-column: 3 / 4; grid-row: 1 / 2; }
.pattern-0 .tile-3 { grid-column: 3 / 4; grid-row: 2 / 3; }
.pattern-0 .tile-4 { grid-column: 3 / 4; grid-row: 3 / 4; }
.pattern-1 .tile-1 { grid-column: 2 / 4; grid-row: 1 / 4; }
.pattern-1 .tile-2 { grid-column: 1 / 2; grid-row: 1 / 2; }
.pattern-1 .tile-3 { grid-column: 1 / 2; grid-row: 2 / 3; }
.pattern-1 .tile-4 { grid-column: 1 / 2; grid-row: 3 / 4; }
.pattern-2 .tile-1 { grid-column: 1 / 4; grid-row: 1 / 3; }
.pattern-2 .tile-2 { grid-column: 1 / 2; grid-row: 3 / 4; }
.pattern-2 .tile-3 { grid-column: 2 / 3; grid-row: 3 / 4; }
.pattern-2 .tile-4 { grid-column: 3 / 4; grid-row: 3 / 4; }
.photo-count-3.pattern-0 .tile-3 { grid-column: 3 / 4; grid-row: 2 / 4; }
.photo-count-3.pattern-1 .tile-2 { grid-column: 1 / 2; grid-row: 1 / 3; }
.photo-count-3.pattern-1 .tile-3 { grid-column: 1 / 2; grid-row: 3 / 4; }
.photo-count-3.pattern-2 .tile-3 { grid-column: 2 / 4; grid-row: 3 / 4; }
.photo-count-2 .tile-1 { grid-column: 1 / 3; grid-row: 1 / 4; }
.photo-count-2 .tile-2 { grid-column: 3 / 4; grid-row: 1 / 4; }
.photo-count-1 .tile-1 { grid-column: 1 / 4; grid-row: 1 / 4; }

.map-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 58px;
  height: 34px;
  min-width: 58px;
  max-width: 58px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.62);
  color: var(--blue);
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(11, 29, 56, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.decision-label {
  position: absolute;
  top: 18px;
  z-index: 2;
  padding: 8px 11px;
  border: 2px solid currentColor;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  opacity: 0;
  transform: rotate(-9deg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.decision-label.like {
  left: 18px;
  color: var(--success);
}

.decision-label.nope {
  right: 18px;
  color: var(--danger);
  transform: rotate(9deg);
}

.card-content {
  min-height: 0;
  padding: clamp(12px, 1.45svh, 14px) var(--card-pad-x);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 252, 255, 0.72));
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 0;
  min-width: 0;
}

h2 {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--ink);
  font-size: var(--restaurant-title-size);
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.save-button {
  flex: 0 0 auto;
  width: clamp(28px, 4.6dvh, 34px);
  height: clamp(28px, 4.6dvh, 34px);
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
  box-shadow: none;
}

.open-status {
  flex: 0 0 auto;
  max-width: 68px;
  height: 28px;
  padding: 0 9px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-status.is-open {
  background: #1d9b72;
}

.open-status.is-closed {
  background: #d95c64;
}

.open-status.is-unknown {
  background: #6c7b91;
}

.save-button svg,
.preview-save svg {
  width: 21px;
  height: 21px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.bookmark-action svg {
  width: 17px;
  height: 17px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.save-button.is-bookmarked svg,
.preview-save.is-bookmarked svg,
.bookmark-action.is-bookmarked svg {
  fill: currentColor;
}

.save-button.is-bookmarked {
  background: transparent;
  color: var(--blue);
  border-color: transparent;
}

.category-row {
  margin-top: clamp(5px, 0.85dvh, 7px);
  min-width: 0;
}

.category-row span {
  display: block;
  color: var(--muted);
  font-size: clamp(11px, 1.5dvh, 12px);
  line-height: 1.2;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-row {
  margin-top: clamp(7px, 1dvh, 9px);
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.detail-item {
  min-width: 0;
  height: auto;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: #264a75;
  overflow: hidden;
}

.detail-item strong {
  min-width: 0;
  display: block;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-item strong {
  color: var(--blue);
  font-size: clamp(13px, 1.85dvh, 15px);
  font-weight: 950;
}

.detail-item.is-closed {
  background: transparent;
  border-color: transparent;
}

.detail-item.is-closed strong {
  color: #8a5a2c;
}

.detail-item.is-open strong {
  color: #197083;
}

.mood-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.mood-row span {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: #264a75;
  font-size: var(--chip-font-size);
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mood-row {
  margin-top: clamp(7px, 1dvh, 9px);
  height: 18px;
  max-height: 18px;
}

.mood-row span {
  color: #197083;
}

.bottom-actions {
  position: absolute;
  left: var(--app-pad-x);
  right: var(--app-pad-x);
  bottom: var(--floating-action-bottom);
  z-index: 12;
  margin-top: 0;
  display: grid;
  grid-template-columns: var(--floating-action-size) minmax(0, 1fr) var(--floating-action-size);
  align-items: end;
  gap: 8px;
  pointer-events: none;
}

.keep-tray {
  position: absolute;
  left: 50%;
  bottom: -38px;
  transform: translateX(-50%);
  justify-self: center;
  width: 92px;
  height: 118px;
  display: grid;
  place-items: center;
  background: transparent;
  pointer-events: auto;
}

.saved-tray {
  grid-column: 3;
  justify-self: end;
  width: var(--floating-action-size);
  height: var(--floating-action-size);
  padding: 0;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  color: var(--blue);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(229, 241, 252, 0.64)),
    rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(40, 81, 129, 0.16);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  pointer-events: auto;
}

.saved-tray svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.mini-stack {
  position: relative;
  width: 92px;
  height: 118px;
}

.mini-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 74px;
  height: 112px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(226, 239, 250, 0.46)),
    rgba(255, 255, 255, 0.58);
  box-shadow: 0 13px 28px rgba(40, 81, 129, 0.2);
  outline: 1px solid rgba(112, 145, 190, 0.28);
  outline-offset: -1px;
  backdrop-filter: blur(14px) saturate(1.18);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
  transform-origin: 50% 92%;
  transition:
    transform 520ms cubic-bezier(.18, .92, .2, 1),
    opacity 260ms ease;
}

.mini-card-total {
  left: 50%;
  opacity: 1;
  transform: translateX(-50%);
}

.mini-card-snapshot {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}

.mini-card-snapshot-inner {
  width: 362px;
  height: 520px;
  transform: scale(0.15);
  transform-origin: 0 0;
  pointer-events: none;
  border-radius: 28px;
  box-shadow: none;
  border: 0;
}

.mini-card-snapshot-inner .map-chip,
.mini-card-snapshot-inner .preview-save {
  display: none;
}

.mini-card-count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding-bottom: 38px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(229, 241, 252, 0.72)),
    rgba(255, 255, 255, 0.78);
  color: var(--blue);
}

.mini-card-count strong,
.mini-card-count small {
  display: block;
  line-height: 1;
  text-align: center;
}

.mini-card-count strong {
  font-size: 30px;
  font-weight: 950;
}

.mini-card-count small {
  font-size: 12px;
  font-weight: 850;
  opacity: 0.78;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 35, 63, 0.24);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 470px);
  max-height: min(78dvh, 620px);
  transform: translateX(-50%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px 14px max(14px, env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px 26px 0 0;
  background: rgba(249, 253, 255, 0.9);
  box-shadow: 0 -24px 60px rgba(40, 81, 129, 0.22);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.sheet-header {
  position: relative;
  min-height: 46px;
  padding: 3px 54px 12px 4px;
}

.sheet-header h2 {
  white-space: normal;
}

.sheet-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.sheet-close {
  top: 4px;
  right: 4px;
}

.keep-list {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 2px 2px 8px;
}

.keep-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.keep-item img {
  width: 88px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}

.keep-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.22;
}

.keep-item p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.keep-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.keep-item-actions button,
.empty-action {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(233, 244, 253, 0.9);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.keep-item-actions .bookmark-action {
  min-width: 32px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--blue);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.keep-item-actions .bookmark-action.is-bookmarked {
  background: rgba(40, 81, 129, 0.92);
  color: #ffffff;
  border-color: rgba(40, 81, 129, 0.24);
}

.empty-keeps {
  padding: 22px 14px;
  border: 1px dashed rgba(40, 81, 129, 0.26);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.empty-keeps p {
  margin-bottom: 12px;
  font-size: 13px;
}

.nudge {
  position: absolute;
  left: 50%;
  top: var(--nudge-top);
  width: min(var(--deck-w), calc(100% - 24px));
  transform: translate(-50%, -10px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(112, 145, 190, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(40, 81, 129, 0.18);
  z-index: 14;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  pointer-events: auto;
}

.nudge p {
  flex: 1;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 850;
}

.nudge button {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(40, 81, 129, 0.92);
  color: var(--blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .photo-grid-layer,
  .photo-tile img {
    transition: none;
    animation: none;
  }
}

@media (hover: hover) {
  button {
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  }

  button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(40, 81, 129, 0.18);
  }

  .icon-button:hover {
    transform: translateY(calc(-50% - 1px));
  }
}

@media (max-height: 720px) {
  .app-shell {
    --card-info-h: 124px;
    --app-gap: 7px;
  }
}

@media (max-height: 640px) {
  .app-shell {
    --title-size: 20px;
    --restaurant-title-size: 17px;
    --card-info-h: 116px;
    --icon-size: 31px;
    --app-pad-y: 5px;
    --app-gap: 5px;
    --floating-action-size: 46px;
  }

  .eyebrow {
    display: none;
  }

  .bottom-actions {
    margin-top: 0;
  }

  .keep-tray {
    width: 82px;
    height: 104px;
    bottom: -35px;
  }

  .mini-stack {
    width: 82px;
    height: 104px;
  }

  .mini-card {
    width: 66px;
    height: 98px;
  }

  .saved-tray {
    border-radius: 15px;
  }
}

@media (max-width: 360px) {
  .app-shell {
    --app-pad-x: 10px;
  }

  .deck-stack {
    width: 100%;
  }

  .mini-stack {
    width: 68px;
  }
}
