@import url('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&display=swap');

:root {
  color-scheme: light;
  --bg: #f0e6ff;
  --bg-deep: #e0ccff;
  --panel: #ffffff;
  --panel-strong: #f4ecff;
  --text: #2d1847;
  --muted: #7a5f9a;
  --line: #dcc8f7;
  --accent: #7c3aed;
  --accent-dark: #5b21b6;
  --accent-soft: #ede0ff;
  --violet: #7c3aed;
  --violet-soft: #ede0ff;
  --plum: #a21caf;
  --plum-soft: #fae8ff;
  --gold: #b45309;
  --gold-soft: #fff7ed;
  --danger: #be123c;
  --danger-soft: #ffe4e6;
  --reminder: #dc2626;
  --reminder-dark: #991b1b;
  --reminder-soft: #fee2e2;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --good: #15803d;
  --good-soft: #e7f7eb;
  --blue: #2563eb;
  --blue-soft: #e8efff;
  --shadow: 0 18px 45px rgba(63, 31, 104, 0.13);
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  --page-stage: min(560px, calc(100vw - 24px));
}

.app-main {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 0;
  align-items: center;
  overflow-x: hidden;
}

.hero-panel,
.alert-panel,
.toolbar,
.tab-section,
.tabs {
  width: var(--page-stage);
  max-width: var(--page-stage);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.hero-panel {
  overflow: hidden;
}

.hero-panel::before,
.hero-panel::after,
.scene-card::before,
.scene-card::after {
  display: none;
}

.hero-copy h2 {
  width: 100%;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.hero-art,
.scene-card,
.scene-visual,
.scene-copy,
.section-heading,
.notice-line,
.quick-items,
.work-grid,
.list-head,
.item-grid,
.photo-grid {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.scene-card {
  align-items: center;
}

.scene-visual {
  justify-items: center;
  overflow: hidden;
}

.tabs {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.photo-fridge-button.fridge-visual.furniture-piece,
.photo-closet-button.closet-visual.furniture-piece,
.photo-cabinet-button.cabinet-visual.furniture-piece,
.photo-pantry-button.pantry-visual.furniture-piece {
  width: min(100%, 420px);
  margin-left: auto;
  margin-right: auto;
}

.cheese-clock-button {
  width: min(100%, 420px);
  height: min(var(--page-stage), 420px);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  body {
    --page-stage: calc(100vw - 24px);
  }

  .app-main {
    width: 100%;
    max-width: 100%;
  }

  .hero-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-copy h2 {
    font-size: clamp(1.7rem, 8.2vw, 2.28rem);
    line-height: 1.16;
  }

  .tab-section {
    padding-left: 0;
    padding-right: 0;
  }

  .section-heading {
    align-items: center;
    text-align: center;
  }

  .tabs {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .pantry-scene .scene-visual {
    width: 100%;
  }

  .photo-pantry-button.pantry-visual.furniture-piece {
    width: min(100%, 420px);
  }

  .pantry-scene .scene-copy {
    width: 100%;
  }
}

/* Latest mobile polish: big centered object, form above list, list at bottom. */
.work-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: var(--page-stage);
  max-width: var(--page-stage);
  margin-left: auto;
  margin-right: auto;
}

.work-grid > form {
  order: 1;
}

.work-grid > div {
  order: 2;
}

.editor-panel,
.work-grid > div,
.item-grid,
.photo-grid {
  width: 100%;
  max-width: 100%;
}

.fridge-state-badge,
.closet-state-badge,
.cabinet-state-badge,
.pantry-state-badge,
.scene-visual::after {
  display: none !important;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.eyebrow {
  font-size: 1rem;
}

.scene-copy strong,
.list-head h3 {
  font-size: clamp(1.55rem, 4vw, 2rem);
}

.scene-copy p,
.notice-line,
.quick-items button,
label span,
.compact-meta span,
.item-card,
.photo-card,
input,
select,
textarea,
button {
  font-size: 1.05rem;
}

.scene-storage-overlay {
  top: 14px;
  width: min(92%, 440px);
  max-height: min(34%, 210px);
  padding: 12px;
  gap: 8px;
}

.scene-storage-overlay span,
.scene-storage-overlay button {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.96rem;
}

.tabs {
  padding: 9px 6px;
}

.tab-button {
  min-height: 72px;
}

.tab-icon {
  width: 46px;
  height: 46px;
  font-size: 1.9rem;
}

.tab-label {
  font-size: 0.86rem;
  line-height: 1.15;
}

@media (max-width: 640px) {
  body {
    --page-stage: calc(100vw - 24px);
  }

  .tab-section {
    width: var(--page-stage);
    max-width: var(--page-stage);
    padding-left: 0;
    padding-right: 0;
  }

  .work-grid {
    width: var(--page-stage);
    max-width: var(--page-stage);
    grid-template-columns: 1fr;
  }

  .work-grid > form {
    order: 1;
  }

  .work-grid > div {
    order: 2;
  }

  .scene-card {
    width: 100%;
    max-width: 100%;
    align-items: center;
  }

  .scene-visual {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    margin-right: 0;
    transform: translateX(-50%);
    overflow: hidden;
    justify-items: center;
  }

  .fridge-scene .scene-visual,
  .closet-scene .scene-visual,
  .cabinet-scene .scene-visual,
  .pantry-scene .scene-visual {
    min-height: calc(100svh - 118px);
  }

  .reminder-scene .scene-visual {
    min-height: 100vw;
  }

  .photo-fridge-button.fridge-visual.furniture-piece,
  .photo-closet-button.closet-visual.furniture-piece,
  .photo-cabinet-button.cabinet-visual.furniture-piece,
  .photo-pantry-button.pantry-visual.furniture-piece {
    width: 100vw;
    max-width: 100vw;
    height: calc(100svh - 118px);
    max-height: none;
    margin-left: auto;
    margin-right: auto;
  }

  .photo-fridge-button .fridge-photo,
  .photo-closet-button .closet-photo,
  .photo-cabinet-button .cabinet-photo,
  .photo-pantry-button .pantry-photo {
    object-fit: cover;
    object-position: center center;
  }

  .photo-fridge-button .fridge-photo {
    object-position: 55% center;
  }

  .cheese-clock-button {
    width: 100vw;
    max-width: 100vw;
    height: 100vw;
    max-height: none;
    margin-left: auto;
    margin-right: auto;
  }

  .cheese-clock-image {
    object-fit: cover;
    object-position: center center;
  }

  .scene-copy {
    width: var(--page-stage);
    max-width: var(--page-stage);
  }

  .section-heading {
    text-align: center;
  }

  .section-heading h2 {
    font-size: 1.85rem;
  }

  .eyebrow {
    font-size: 1.06rem;
  }

  .scene-copy strong,
  .list-head h3 {
    font-size: 1.68rem;
  }

  .scene-copy p,
  .notice-line,
  .quick-items button,
  label span,
  .compact-meta span,
  .item-card,
  .photo-card,
  input,
  select,
  textarea,
  button {
    font-size: 1.08rem;
  }

  .scene-storage-overlay {
    top: 12px;
    width: calc(100% - 24px);
    max-height: 178px;
    padding: 10px;
  }

  .scene-storage-overlay span,
  .scene-storage-overlay button {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 0.98rem;
  }

  .tabs {
    width: calc(100vw - 10px);
    max-width: calc(100vw - 10px);
    min-height: 82px;
    padding: 9px 4px;
  }

  .tab-button {
    min-height: 72px;
  }

  .tab-icon {
    width: 44px;
    height: 44px;
    font-size: 1.82rem;
  }

  .tab-label {
    font-size: 0.82rem;
    line-height: 1.15;
  }
}

/* Layout polish requested: form first, lists last, larger centered visuals. */
.work-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: var(--page-stage);
  max-width: var(--page-stage);
}

.work-grid > form {
  order: 1;
}

.work-grid > div {
  order: 2;
}

.editor-panel {
  width: 100%;
}

.fridge-state-badge,
.closet-state-badge,
.cabinet-state-badge,
.pantry-state-badge {
  display: none !important;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 4vw, 2rem);
}

.eyebrow {
  font-size: 0.92rem;
}

.scene-copy strong,
.list-head h3 {
  font-size: clamp(1.45rem, 4vw, 1.9rem);
}

.scene-copy p,
.notice-line,
label span,
.compact-meta span,
.item-card,
.photo-card {
  font-size: 1rem;
}

input,
select,
textarea,
button {
  font-size: 1rem;
}

.scene-storage-overlay {
  top: 14px;
  width: min(92%, 420px);
  max-height: min(34%, 200px);
  padding: 12px;
  gap: 8px;
}

.scene-storage-overlay span,
.scene-storage-overlay button {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.95rem;
}

.tab-icon {
  width: 42px;
  height: 42px;
  font-size: 1.72rem;
}

.tab-label {
  font-size: 0.78rem;
}

.tab-button {
  min-height: 68px;
}

.tabs {
  padding: 8px 5px;
}

@media (max-width: 640px) {
  .work-grid {
    width: var(--page-stage);
    max-width: var(--page-stage);
  }

  .work-grid > form {
    order: 1;
  }

  .work-grid > div {
    order: 2;
  }

  .scene-visual {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    overflow: hidden;
    transform: translateX(-50%);
  }

  .photo-fridge-button.fridge-visual.furniture-piece,
  .photo-closet-button.closet-visual.furniture-piece,
  .photo-cabinet-button.cabinet-visual.furniture-piece,
  .photo-pantry-button.pantry-visual.furniture-piece {
    width: 100vw;
    max-width: 100vw;
    height: calc(100vh - 112px);
  }

  .cheese-clock-button {
    width: 100vw;
    max-width: 100vw;
    height: 100vw;
  }

  .scene-copy {
    width: var(--page-stage);
  }

  .section-heading h2 {
    font-size: 1.72rem;
  }

  .eyebrow {
    font-size: 1rem;
  }

  .scene-copy strong,
  .list-head h3 {
    font-size: 1.58rem;
  }

  .scene-copy p,
  .notice-line,
  label span,
  input,
  select,
  textarea,
  button {
    font-size: 1.05rem;
  }

  .scene-storage-overlay {
    top: 12px;
    width: calc(100% - 24px);
    max-height: 172px;
  }

  .scene-storage-overlay span,
  .scene-storage-overlay button {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 0.92rem;
  }

  .tabs {
    width: calc(100vw - 10px);
    max-width: calc(100vw - 10px);
    min-height: 76px;
    padding: 8px 4px;
  }

  .tab-button {
    min-height: 66px;
  }

  .tab-icon {
    width: 40px;
    height: 40px;
    font-size: 1.65rem;
  }

  .tab-label {
    font-size: 0.74rem;
    line-height: 1.15;
  }
}

/* Stored item chips live on top of the opened main object. */
.scene-copy .scene-items {
  display: none;
}

.scene-storage-overlay {
  position: absolute;
  left: 50%;
  top: 12px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  width: min(88%, 360px);
  max-height: min(30%, 170px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 30px rgba(63, 31, 104, 0.16);
  backdrop-filter: blur(12px) saturate(1.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.scene-card.main-open .scene-storage-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.scene-storage-overlay span,
.scene-storage-overlay button {
  max-width: 100%;
  min-height: 28px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 14px rgba(63, 31, 104, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  word-break: break-word;
}

.scene-storage-overlay button {
  cursor: pointer;
}

.scene-storage-overlay button:focus-visible,
.scene-storage-overlay button:hover {
  border-color: rgba(139, 92, 246, 0.45);
  outline: 0;
  transform: translateY(-1px);
}

.scene-storage-overlay .scene-empty {
  color: var(--muted);
  border-style: dashed;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 640px) {
  .scene-storage-overlay {
    top: 10px;
    width: calc(100% - 28px);
    max-height: 150px;
    padding: 8px;
    gap: 6px;
  }

  .scene-storage-overlay span,
  .scene-storage-overlay button {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 0.74rem;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100vh;
  height: 100%;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 0%, #d8bef0 0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 20% 50%, #e4ccf5 0%, transparent 55%),
    radial-gradient(ellipse 120% 100% at 80% 70%, #dcc4f2 0%, transparent 50%),
    radial-gradient(ellipse 140% 100% at 50% 100%, #c8a4e6 0%, transparent 50%),
    linear-gradient(180deg, #e8d5f5 0%, #edddf8 30%, #f2e7fa 60%, #e3cef4 100%);
  background-attachment: fixed;
  background-size: cover;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  color: var(--text);
  background: transparent;
  font-family:
    "ZCOOL KuaiLe", "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", "Comic Sans MS", "Chalkboard SE",
    cursive, sans-serif;
  font-size: 16px;
  letter-spacing: 0.01em;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(16px, 4vw, 40px);
  width: 100%;
  max-width: 100%;
  border-bottom: 1px solid rgba(180, 155, 220, 0.35);
  background: rgba(238, 218, 248, 0.7);
  backdrop-filter: blur(16px);
}

.app-header h1,
.section-heading h2,
.list-head h3 {
  margin: 0;
}

.app-header h1 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.header-actions,
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.primary-button,
.ghost-button,
.tab-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 700;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--plum));
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.23);
}

.primary-button:hover {
  background: linear-gradient(135deg, var(--accent-dark), #86198f);
  transform: translateY(-1px);
}

.ghost-button {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}

.ghost-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.ghost-button.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.primary-button.full {
  width: 100%;
}

.app-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 24px 0 128px;
}

.hero-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: min(560px, calc(100vw - 12px));
  min-height: auto;
  margin: 0 auto 42px;
  padding: clamp(22px, 4vw, 32px) clamp(16px, 4vw, 24px);
  border: 1px solid rgba(200, 172, 237, 0.6);
  border-radius: 16px;
  overflow: visible;
  background:
    linear-gradient(135deg, rgba(255, 252, 255, 0.88), rgba(240, 228, 255, 0.84)),
    radial-gradient(circle at 12% 18%, rgba(245, 158, 11, 0.16), transparent 26%),
    radial-gradient(circle at 82% 14%, rgba(124, 58, 237, 0.2), transparent 30%),
    radial-gradient(circle at 78% 78%, rgba(162, 28, 175, 0.12), transparent 28%);
  box-shadow: var(--shadow);
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero-panel::before {
  width: 360px;
  height: 360px;
  right: -130px;
  top: -160px;
  background: rgba(124, 58, 237, 0.18);
}

.hero-panel::after {
  width: 220px;
  height: 220px;
  left: -90px;
  bottom: -120px;
  background: rgba(162, 28, 175, 0.13);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
}

.hero-copy h2 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.7;
}

.hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 280px;
  width: 100%;
  overflow: visible;
}

.hero-art::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 26px;
  z-index: 2;
  width: min(350px, 86%);
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.1), rgba(124, 58, 237, 0.44), rgba(162, 28, 175, 0.16));
  box-shadow: 0 16px 30px rgba(63, 31, 104, 0.16);
}

.qisi-corner {
  position: absolute;
  right: -18px;
  bottom: -8px;
  z-index: 3;
  width: clamp(270px, 31vw, 400px);
  max-width: none;
  height: auto;
  transform: rotate(2deg);
  filter: drop-shadow(0 28px 28px rgba(50, 23, 78, 0.24));
  pointer-events: none;
  user-select: none;
}

.qisi-corner.image-missing {
  display: none;
}

.qisi-corner::selection {
  background: transparent;
}

.qisi-fallback {
  position: absolute;
  right: 78px;
  bottom: 86px;
  z-index: 3;
  display: none;
  place-items: center;
  width: min(260px, 72%);
  aspect-ratio: 1;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 28px;
  color: var(--accent-dark);
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.95) 0 20%, transparent 21%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(241, 232, 255, 0.88));
  box-shadow: 0 20px 42px rgba(63, 31, 104, 0.14);
  font-size: 1.5rem;
  font-weight: 900;
}

.qisi-fallback.show {
  display: grid;
}

.qisi-label {
  position: absolute;
  right: 118px;
  bottom: -28px;
  z-index: 4;
  min-height: 38px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 999px;
  padding: 8px 18px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 30px rgba(63, 31, 104, 0.14);
  font-weight: 900;
}

.music-note {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: rgba(99, 55, 139, 0.72);
  background: radial-gradient(
    circle at 40% 35%,
    rgba(255, 255, 255, 0.92),
    rgba(220, 200, 255, 0.5)
  );
  border: 2px solid rgba(180, 140, 240, 0.28);
  box-shadow:
    0 8px 28px rgba(124, 58, 237, 0.16),
    inset 0 0 12px rgba(255, 255, 255, 0.5);
  font-size: 1.6rem;
  font-weight: 900;
  z-index: 10;
  pointer-events: none;
  user-select: none;
  opacity: 0.68;
}

.note-tl {
  top: 14px;
  left: 14px;
  animation: floatNoteTL 5s ease-in-out infinite;
}

.note-tr {
  top: 10px;
  right: 14px;
  animation: floatNoteTR 5.5s ease-in-out infinite 0.6s;
}

.note-bl {
  bottom: 10px;
  left: 10px;
  animation: floatNoteBL 4.8s ease-in-out infinite 1.2s;
}

.note-br {
  bottom: 12px;
  right: 10px;
  animation: floatNoteBR 5.2s ease-in-out infinite 1.8s;
}

@keyframes floatNoteTL {
  0%, 100% { transform: translate(0, 0) rotate(-6deg) scale(1); }
  30% { transform: translate(18px, -14px) rotate(8deg) scale(1.12); }
  60% { transform: translate(-8px, -22px) rotate(-3deg) scale(0.94); }
}

@keyframes floatNoteTR {
  0%, 100% { transform: translate(0, 0) rotate(5deg) scale(1); }
  35% { transform: translate(-16px, -18px) rotate(-7deg) scale(1.1); }
  65% { transform: translate(10px, -24px) rotate(4deg) scale(0.92); }
}

@keyframes floatNoteBL {
  0%, 100% { transform: translate(0, 0) rotate(-4deg) scale(1); }
  40% { transform: translate(14px, -16px) rotate(6deg) scale(1.08); }
  70% { transform: translate(-6px, -20px) rotate(-5deg) scale(0.96); }
}

@keyframes floatNoteBR {
  0%, 100% { transform: translate(0, 0) rotate(3deg) scale(1); }
  33% { transform: translate(-14px, -12px) rotate(-6deg) scale(1.14); }
  66% { transform: translate(8px, -26px) rotate(7deg) scale(0.9); }
}

.alert-panel {
  width: min(560px, calc(100vw - 12px));
  margin: 16px auto 0;
  border: 1px solid #f3c8d0;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 241, 242, 0.92), rgba(255, 247, 237, 0.84));
  padding: 14px 16px;
}

.alert-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--danger);
}

.alert-panel ul {
  margin: 0;
  padding-left: 20px;
}

.toolbar {
  width: min(560px, calc(100vw - 12px));
  margin: 18px auto 0;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 255, 0.84);
  box-shadow: 0 12px 28px rgba(79, 23, 68, 0.06);
}

.search-box span {
  color: var(--muted);
  font-weight: 700;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.tabs {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom, 10px));
  z-index: 40;
  display: flex;
  justify-content: space-evenly;
  gap: 2px;
  padding: 6px 4px;
  width: min(560px, calc(100vw - 12px));
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 4px 24px rgba(109, 40, 217, 0.12);
  transform: translateX(-50%);
}

.tab-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 56px;
  min-height: 56px;
  padding: 4px 8px;
  border-radius: 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition:
    background 200ms ease,
    transform 180ms ease;
}

.tab-button:active {
  transform: scale(0.93);
}

.tab-button.active {
  background: linear-gradient(135deg, #ede0ff, #f3e8ff);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.tab-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 1.4rem;
  line-height: 1;
  border-radius: 50%;
  transition: transform 200ms ease;
}

.tab-button.active .tab-icon {
  transform: scale(1.12);
}

.tab-label {
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(99, 55, 139, 0.55);
  letter-spacing: 0.02em;
  transition: color 200ms ease;
}

.tab-button.active .tab-label {
  color: var(--accent-dark);
}

.tab-section {
  display: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  width: min(560px, calc(100vw - 12px));
  max-width: 100vw;
  margin: 0 auto;
}

.tab-section.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  letter-spacing: 0.03em;
}

.notice-line {
  margin: -4px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-strong);
}

.scene-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 100vw;
  min-height: 190px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.scene-card::before,
.scene-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.scene-card::before {
  right: -54px;
  bottom: -66px;
  width: 160px;
  height: 160px;
  background: rgba(139, 92, 246, 0.1);
}

.scene-card::after {
  left: 22px;
  top: 20px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(192, 132, 0, 0.2);
  background: rgba(255, 244, 204, 0.44);
}

.reminder-scene {
  border-color: rgba(220, 38, 38, 0.2);
  background:
    radial-gradient(circle at 92% 12%, rgba(220, 38, 38, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 242, 0.9));
}

.scene-visual,
.scene-copy {
  position: relative;
  z-index: 1;
}

.scene-visual {
  display: grid;
  place-items: center;
  min-height: 150px;
}

.appliance {
  position: relative;
  width: min(100%, 180px);
  height: 150px;
  border-radius: 8px;
  transform-origin: center bottom;
  animation: sceneFloat 4.8s ease-in-out infinite;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.62),
    0 18px 30px rgba(63, 31, 104, 0.16);
}

.appliance span,
.appliance i {
  position: absolute;
  display: block;
}

.fridge-visual {
  width: 126px;
  height: 168px;
  border: 2px solid rgba(139, 92, 246, 0.2);
  background:
    linear-gradient(90deg, transparent 49%, rgba(139, 92, 246, 0.18) 49% 51%, transparent 51%),
    linear-gradient(180deg, #ffffff, #edf7ff);
}

.fridge-visual::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 52px;
  height: 2px;
  background: rgba(139, 92, 246, 0.18);
  box-shadow: 0 48px 0 rgba(139, 92, 246, 0.14);
}

.fridge-visual span {
  width: 9px;
  height: 42px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.35);
}

.fridge-visual span:first-child {
  left: 43px;
  top: 66px;
}

.fridge-visual span:nth-child(2) {
  right: 43px;
  top: 66px;
}

.fridge-visual i {
  left: 24px;
  bottom: 18px;
  width: 78px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), rgba(162, 28, 175, 0.2));
}

.closet-visual,
.cabinet-visual,
.pantry-visual {
  width: 178px;
  height: 150px;
  border: 2px solid rgba(124, 58, 237, 0.18);
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.42) 49% 51%, transparent 51%),
    linear-gradient(135deg, rgba(139, 92, 246, 0.74), rgba(162, 28, 175, 0.5));
}

.closet-visual::before,
.cabinet-visual::before,
.pantry-visual::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 34px;
  height: 2px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 42px 0 rgba(255, 255, 255, 0.24);
}

.closet-visual span,
.cabinet-visual span,
.pantry-visual span {
  top: 66px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.closet-visual span:first-child,
.cabinet-visual span:first-child,
.pantry-visual span:first-child {
  left: 72px;
}

.closet-visual span:nth-child(2),
.cabinet-visual span:nth-child(2),
.pantry-visual span:nth-child(2) {
  right: 72px;
}

.closet-visual i,
.cabinet-visual i,
.pantry-visual i {
  left: 22px;
  right: 22px;
  bottom: 18px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.cabinet-visual {
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.38) 49% 51%, transparent 51%),
    linear-gradient(135deg, #9f7aea, #7c3aed 54%, #a21caf);
}

.pantry-visual {
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.38) 49% 51%, transparent 51%),
    linear-gradient(135deg, #a855f7, #c08400);
}

.reminder-visual {
  width: 150px;
  height: 142px;
  border: 2px solid rgba(220, 38, 38, 0.18);
  border-radius: 22px 22px 8px 8px;
  background:
    linear-gradient(180deg, rgba(220, 38, 38, 0.86) 0 36px, #fff 36px),
    linear-gradient(135deg, #fff, #fff1f2);
}

.reminder-visual::before {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  top: 62px;
  height: 3px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.18);
  box-shadow:
    0 22px 0 rgba(220, 38, 38, 0.14),
    0 44px 0 rgba(220, 38, 38, 0.1);
}

.reminder-visual span {
  top: 20px;
  width: 12px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.reminder-visual span:first-child {
  left: 42px;
}

.reminder-visual span:nth-child(2) {
  right: 42px;
}

.reminder-visual i {
  left: 58px;
  bottom: 22px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.16);
}

.scene-copy strong {
  display: block;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.scene-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.scene-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 13px;
}

.scene-items span,
.scene-items button {
  max-width: 100%;
  min-height: 30px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 9px 20px rgba(63, 31, 104, 0.08);
  font-size: 0.88rem;
  font-weight: 800;
  word-break: break-word;
  animation: itemPop 220ms ease both;
}

.scene-items button {
  cursor: pointer;
}

.scene-items button:hover,
.scene-items button:focus-visible {
  border-color: rgba(139, 92, 246, 0.45);
  background: #fff;
  outline: 0;
  transform: translateY(-1px);
}

.scene-visual {
  width: 100%;
  min-height: 300px;
  perspective: 1400px;
}

.furniture-piece {
  width: min(74vw, 330px);
  height: 300px;
  border: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  overflow: visible;
  transform-style: preserve-3d;
  transition:
    transform 280ms ease,
    filter 280ms ease;
}

.furniture-piece:hover,
.furniture-piece:focus-visible {
  outline: 0;
  filter: saturate(1.05) brightness(1.02);
  transform: translateY(-4px) rotateX(2deg);
}

.furniture-piece::before {
  content: "";
  position: absolute;
  z-index: 5;
  left: auto;
  top: 17px;
  right: 16px;
  bottom: 22px;
  width: calc(50% - 18px);
  height: auto;
  border-radius: 14px 22px 18px 10px;
  transform-origin: left center;
  transition:
    transform 620ms cubic-bezier(0.2, 0.75, 0.2, 1),
    box-shadow 620ms ease;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.48),
    inset 14px 0 20px rgba(255, 255, 255, 0.14);
}

.furniture-piece.door-open::before {
  transform: perspective(720px) rotateY(-68deg) translateZ(8px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    18px 12px 22px rgba(63, 31, 104, 0.2);
}

.furniture-piece::after {
  content: "点击开门";
  position: absolute;
  left: 50%;
  bottom: -42px;
  z-index: 0;
  min-width: 90px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 24px rgba(63, 31, 104, 0.12);
  font-size: 0.82rem;
  font-weight: 900;
  transform: translateX(-50%);
}

.furniture-piece.door-open::after {
  content: "已打开";
}

.furniture-piece span,
.furniture-piece i {
  position: absolute;
  display: block;
  z-index: 6;
}

.fridge-visual {
  border: 2px solid rgba(146, 119, 92, 0.18);
  border-radius: 30px 30px 18px 18px;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(139, 92, 246, 0.16) 49.5% 50.5%, transparent 50.5%),
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.96), transparent 17%),
    linear-gradient(155deg, #ffffff, #e7f5ff 50%, #d8caff);
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.48),
    inset 0 -24px 40px rgba(124, 58, 237, 0.13),
    0 34px 60px rgba(65, 44, 96, 0.22);
}

.fridge-visual::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(214, 236, 255, 0.96)),
    linear-gradient(180deg, #ffffff, #dff0ff);
}

.fridge-visual span {
  top: 110px;
  width: 12px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #8b5cf6);
  box-shadow: 0 4px 12px rgba(63, 31, 104, 0.2);
}

.fridge-visual span:first-child {
  left: 126px;
}

.fridge-visual span:nth-child(2) {
  right: 126px;
}

.fridge-visual i {
  left: 54px;
  right: 54px;
  bottom: 34px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.18), rgba(162, 28, 175, 0.24));
}

.closet-visual,
.cabinet-visual,
.pantry-visual {
  border: 2px solid rgba(97, 54, 30, 0.28);
  border-radius: 24px 24px 12px 12px;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255, 225, 166, 0.28) 49.5% 50.5%, transparent 50.5%),
    radial-gradient(circle at 24% 18%, rgba(255, 231, 184, 0.28), transparent 22%),
    linear-gradient(145deg, #5d2f1e, #b98245 38%, #7a4128 70%, #3b1f17);
  box-shadow:
    inset 0 0 0 7px rgba(255, 226, 174, 0.18),
    inset 0 0 0 14px rgba(72, 35, 22, 0.1),
    0 34px 62px rgba(64, 37, 24, 0.25);
}

.closet-visual::before,
.cabinet-visual::before,
.pantry-visual::before {
  background:
    linear-gradient(90deg, rgba(255, 224, 154, 0.18), rgba(107, 53, 31, 0.38)),
    linear-gradient(145deg, #7b3f26, #d09b58 40%, #63301f);
}

.closet-visual span,
.cabinet-visual span,
.pantry-visual span {
  top: 130px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #fff6d7, #c08400);
  box-shadow: 0 3px 12px rgba(42, 24, 16, 0.28);
}

.closet-visual span:first-child,
.cabinet-visual span:first-child,
.pantry-visual span:first-child {
  left: 132px;
}

.closet-visual span:nth-child(2),
.cabinet-visual span:nth-child(2),
.pantry-visual span:nth-child(2) {
  right: 132px;
}

.closet-visual i,
.cabinet-visual i,
.pantry-visual i {
  left: 38px;
  right: 38px;
  bottom: 30px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 229, 177, 0.2);
  box-shadow:
    0 -68px 0 rgba(255, 229, 177, 0.11),
    0 -132px 0 rgba(255, 229, 177, 0.12);
}

.closet-visual {
  width: min(76vw, 350px);
  height: 315px;
}

.cabinet-visual {
  height: 285px;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255, 225, 166, 0.28) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(145deg, #4b281c, #9a673c 42%, #6d3a24 70%, #3b1f17);
}

.pantry-visual {
  height: 285px;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255, 225, 166, 0.26) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(145deg, #6d28d9, #a855f7 46%, #9a5a14 86%);
}

.reminder-visual {
  width: min(64vw, 260px);
  height: 330px;
  border: 2px solid rgba(97, 54, 30, 0.32);
  border-radius: 46px 46px 18px 18px;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 244, 204, 0.92) 0 42px, transparent 44px),
    linear-gradient(145deg, #5c2f1f, #b98245 45%, #4a2418);
  box-shadow:
    inset 0 0 0 7px rgba(255, 226, 174, 0.18),
    0 34px 60px rgba(64, 37, 24, 0.24);
}

.reminder-visual::before {
  top: 122px;
  right: 18px;
  bottom: 24px;
  width: calc(50% - 18px);
  border-radius: 18px 20px 16px 10px;
  background:
    linear-gradient(90deg, rgba(255, 224, 154, 0.16), rgba(107, 53, 31, 0.42)),
    linear-gradient(145deg, #7b3f26, #d09b58 40%, #63301f);
}

.reminder-visual span:first-child {
  left: 50%;
  top: 38px;
  width: 82px;
  height: 82px;
  border: 8px solid rgba(255, 244, 204, 0.88);
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 48%, #5c2f1f 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, #5c2f1f 48% 52%, transparent 52%),
    #fff9df;
  transform: translateX(-50%);
  box-shadow: 0 10px 24px rgba(42, 24, 16, 0.22);
}

.reminder-visual span:nth-child(2) {
  left: 50%;
  top: 142px;
  width: 8px;
  height: 94px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff4cc, #c08400);
  transform: translateX(-50%);
}

.reminder-visual i {
  left: 50%;
  top: 220px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: radial-gradient(circle at 34% 34%, #fff4cc, #c08400);
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(42, 24, 16, 0.22);
}

/* Realistic double-door furniture */
.furniture-piece {
  isolation: isolate;
  border-radius: 26px 26px 16px 16px;
  background:
    linear-gradient(180deg, transparent 26%, rgba(255, 255, 255, 0.36) 26% 27%, transparent 27% 48%, rgba(255, 255, 255, 0.28) 48% 49%, transparent 49% 70%, rgba(255, 255, 255, 0.22) 70% 71%, transparent 71%),
    radial-gradient(circle at 28% 35%, rgba(255, 244, 204, 0.65) 0 10px, transparent 11px),
    radial-gradient(circle at 68% 42%, rgba(236, 72, 153, 0.35) 0 9px, transparent 10px),
    radial-gradient(circle at 55% 62%, rgba(34, 197, 94, 0.24) 0 12px, transparent 13px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 232, 255, 0.78));
  box-shadow:
    inset 0 0 0 8px rgba(24, 24, 27, 0.72),
    inset 0 -34px 46px rgba(63, 31, 104, 0.14),
    0 30px 58px rgba(44, 24, 67, 0.24);
}

.furniture-piece::before,
.furniture-piece::after {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 18px;
  z-index: 8;
  width: calc(50% - 14px);
  height: auto;
  border: 4px solid rgba(20, 15, 15, 0.88);
  border-radius: 16px;
  backface-visibility: visible;
  transform-style: preserve-3d;
  transition:
    transform 760ms cubic-bezier(0.18, 0.78, 0.2, 1),
    box-shadow 760ms ease,
    filter 760ms ease;
  box-shadow:
    inset 0 0 0 2px rgba(255, 238, 200, 0.16),
    inset 0 18px 28px rgba(255, 255, 255, 0.1),
    0 12px 24px rgba(31, 17, 12, 0.24);
}

.furniture-piece::before {
  left: 14px;
  right: auto;
  transform-origin: left center;
}

.furniture-piece::after {
  left: auto;
  right: 14px;
  transform-origin: right center;
}

.furniture-piece.door-open::before {
  transform: perspective(760px) rotateY(68deg) translateX(-4px);
  box-shadow:
    inset -16px 0 24px rgba(0, 0, 0, 0.22),
    -18px 16px 28px rgba(31, 17, 12, 0.24);
  filter: brightness(0.98);
}

.furniture-piece.door-open::after {
  transform: perspective(760px) rotateY(-68deg) translateX(4px);
  box-shadow:
    inset 16px 0 24px rgba(0, 0, 0, 0.22),
    18px 16px 28px rgba(31, 17, 12, 0.24);
  filter: brightness(0.98);
}

.furniture-piece span {
  z-index: 12;
  top: 45%;
  width: 10px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7d6, #c08400 70%, #6d3a12);
  box-shadow: 0 5px 12px rgba(31, 17, 12, 0.25);
  transition: transform 760ms cubic-bezier(0.18, 0.78, 0.2, 1);
}

.furniture-piece span:first-child {
  left: calc(50% - 20px);
}

.furniture-piece span:nth-child(2) {
  right: calc(50% - 20px);
}

.furniture-piece.door-open span:first-child {
  transform: perspective(760px) rotateY(68deg) translateX(-38px);
}

.furniture-piece.door-open span:nth-child(2) {
  transform: perspective(760px) rotateY(-68deg) translateX(38px);
}

.furniture-piece i {
  z-index: 2;
  left: 10%;
  right: 10%;
  bottom: 9%;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.16), rgba(255, 244, 204, 0.34), rgba(124, 58, 237, 0.16));
}

.fridge-visual {
  border-radius: 20px 20px 12px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0 6%, transparent 6% 28%, rgba(120, 120, 120, 0.32) 28% 29%, transparent 29% 50%, rgba(120, 120, 120, 0.28) 50% 51%, transparent 51% 72%, rgba(120, 120, 120, 0.25) 72% 73%, transparent 73%),
    radial-gradient(circle at 25% 34%, rgba(245, 158, 11, 0.45) 0 10px, transparent 11px),
    radial-gradient(circle at 43% 43%, rgba(239, 68, 68, 0.42) 0 7px, transparent 8px),
    radial-gradient(circle at 72% 53%, rgba(34, 197, 94, 0.28) 0 14px, transparent 15px),
    linear-gradient(180deg, #fff, #eff6ff 56%, #dbeafe);
  box-shadow:
    inset 0 0 0 10px #161616,
    inset 0 -34px 46px rgba(15, 23, 42, 0.12),
    0 30px 58px rgba(15, 23, 42, 0.22);
}

.fridge-visual::before,
.fridge-visual::after {
  border-color: rgba(18, 18, 18, 0.9);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.7), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(226, 232, 240, 0.76)),
    linear-gradient(135deg, rgba(241, 245, 249, 0.92), rgba(186, 230, 253, 0.48));
}

.fridge-visual::before {
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.6),
    inset -18px 0 28px rgba(15, 23, 42, 0.1),
    -4px 12px 22px rgba(15, 23, 42, 0.18);
}

.fridge-visual::after {
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.6),
    inset 18px 0 28px rgba(15, 23, 42, 0.1),
    4px 12px 22px rgba(15, 23, 42, 0.18);
}

/* Stronger built-in 3D refrigerator */
.fridge-visual.furniture-piece {
  width: min(72vw, 310px);
  height: 318px;
  border-radius: 20px 18px 12px 16px;
  transform: perspective(980px) rotateY(-11deg) rotateX(2deg);
  background:
    linear-gradient(90deg, rgba(20, 20, 22, 0.92) 0 5%, transparent 5% 94%, rgba(20, 20, 22, 0.86) 94% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0 7%, transparent 7% 28%, rgba(109, 120, 135, 0.34) 28% 29%, transparent 29% 50%, rgba(109, 120, 135, 0.28) 50% 51%, transparent 51% 72%, rgba(109, 120, 135, 0.25) 72% 73%, transparent 73%),
    radial-gradient(circle at 30% 36%, rgba(245, 158, 11, 0.5) 0 11px, transparent 12px),
    radial-gradient(circle at 47% 45%, rgba(239, 68, 68, 0.45) 0 8px, transparent 9px),
    radial-gradient(circle at 72% 54%, rgba(34, 197, 94, 0.32) 0 15px, transparent 16px),
    linear-gradient(180deg, #ffffff, #eef7ff 58%, #d8e8ff);
  box-shadow:
    18px 12px 0 #111318,
    28px 24px 46px rgba(15, 23, 42, 0.32),
    inset 0 0 0 10px #141414,
    inset 16px 0 26px rgba(255, 255, 255, 0.52),
    inset -22px 0 34px rgba(15, 23, 42, 0.16),
    inset 0 -40px 54px rgba(15, 23, 42, 0.13);
}

.fridge-visual.furniture-piece:hover,
.fridge-visual.furniture-piece:focus-visible {
  transform: perspective(980px) rotateY(-11deg) rotateX(2deg) translateY(-5px);
}

.fridge-visual.furniture-piece::before,
.fridge-visual.furniture-piece::after {
  top: 20px;
  bottom: 26px;
  width: calc(50% - 18px);
  border: 5px solid rgba(17, 17, 18, 0.94);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.16) 28%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(226, 236, 246, 0.86)),
    linear-gradient(135deg, #ffffff, #dceeff 64%, #c8d6ee);
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.55),
    inset 12px 0 22px rgba(255, 255, 255, 0.35),
    inset -16px 0 26px rgba(15, 23, 42, 0.12),
    0 14px 24px rgba(15, 23, 42, 0.22);
}

.fridge-visual.furniture-piece::before {
  left: 20px;
  transform-origin: left center;
}

.fridge-visual.furniture-piece::after {
  right: 20px;
  transform-origin: right center;
}

.fridge-visual.furniture-piece.door-open::before {
  transform: perspective(780px) rotateY(74deg) translateX(-8px);
}

.fridge-visual.furniture-piece.door-open::after {
  transform: perspective(780px) rotateY(-74deg) translateX(8px);
}

.fridge-visual.furniture-piece span {
  top: 116px;
  width: 12px;
  height: 74px;
  z-index: 13;
  background: linear-gradient(180deg, #fff9df, #d6a12c 58%, #6d3a12);
}

.fridge-visual.furniture-piece span:first-child {
  left: calc(50% - 26px);
}

.fridge-visual.furniture-piece span:nth-child(2) {
  right: calc(50% - 26px);
}

.fridge-visual.furniture-piece i {
  left: 28px;
  right: 16px;
  bottom: -16px;
  height: 22px;
  z-index: -1;
  border-radius: 0 0 18px 18px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.26) 0 5px, rgba(17, 24, 39, 0.3) 5px 10px),
    linear-gradient(180deg, #2a2d35, #101216);
  box-shadow: 16px 8px 0 #0d0f12;
}

.fridge-contents {
  position: absolute;
  left: 48px;
  right: 38px;
  top: 50px;
  bottom: 42px;
  z-index: 3;
  border-radius: 14px;
  background:
    linear-gradient(180deg, transparent 27%, rgba(110, 125, 145, 0.32) 27% 28.5%, transparent 28.5% 53%, rgba(110, 125, 145, 0.28) 53% 54.5%, transparent 54.5% 78%, rgba(110, 125, 145, 0.22) 78% 79.5%, transparent 79.5%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(219, 234, 254, 0.24));
  pointer-events: none;
}

.food-item {
  position: absolute;
  display: block;
  filter: drop-shadow(0 6px 7px rgba(15, 23, 42, 0.16));
}

.food-fruit {
  left: 18px;
  top: 30px;
  width: 50px;
  height: 32px;
  background:
    radial-gradient(circle at 18px 18px, #f97316 0 13px, transparent 14px),
    radial-gradient(circle at 34px 17px, #ef4444 0 12px, transparent 13px),
    radial-gradient(ellipse at 37px 5px, #22c55e 0 7px, transparent 8px);
}

.food-veg {
  right: 18px;
  top: 30px;
  width: 58px;
  height: 34px;
  border-radius: 999px 999px 10px 10px;
  background:
    radial-gradient(ellipse at 18px 18px, #22c55e 0 14px, transparent 15px),
    radial-gradient(ellipse at 32px 14px, #16a34a 0 15px, transparent 16px),
    radial-gradient(ellipse at 44px 20px, #86efac 0 13px, transparent 14px);
}

.food-meat {
  left: 88px;
  top: 103px;
  width: 64px;
  height: 34px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 22px 16px, rgba(255, 255, 255, 0.58) 0 6px, transparent 7px),
    linear-gradient(135deg, #fecaca, #ef4444 58%, #b91c1c);
  box-shadow:
    inset 0 -5px 0 rgba(127, 29, 29, 0.18),
    0 7px 10px rgba(127, 29, 29, 0.16);
}

.food-milk {
  left: 28px;
  bottom: 18px;
  width: 34px;
  height: 72px;
  border-radius: 8px 8px 6px 6px;
  background:
    linear-gradient(180deg, #93c5fd 0 18px, #ffffff 18px 52px, #bfdbfe 52px),
    linear-gradient(135deg, #ffffff, #dbeafe);
  box-shadow:
    inset 0 0 0 2px rgba(59, 130, 246, 0.18),
    0 8px 12px rgba(37, 99, 235, 0.14);
}

.food-milk::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: -12px;
  height: 16px;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  background: #bfdbfe;
}

.food-soda {
  right: 32px;
  bottom: 18px;
  width: 32px;
  height: 76px;
  border-radius: 12px 12px 9px 9px;
  background:
    radial-gradient(circle at 19px 28px, rgba(255, 255, 255, 0.86) 0 3px, transparent 4px),
    radial-gradient(circle at 13px 42px, rgba(255, 255, 255, 0.7) 0 2px, transparent 3px),
    linear-gradient(180deg, #e0f2fe 0 12px, #67e8f9 12px 48px, #0ea5e9 48px);
  box-shadow:
    inset 0 0 0 2px rgba(14, 165, 233, 0.22),
    0 8px 12px rgba(14, 165, 233, 0.16);
}

.food-soda::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: -9px;
  height: 12px;
  border-radius: 4px 4px 0 0;
  background: #94a3b8;
}

.closet-visual,
.cabinet-visual,
.pantry-visual {
  border-radius: 18px 18px 10px 10px;
  background:
    linear-gradient(180deg, transparent 24%, rgba(255, 229, 177, 0.18) 24% 25%, transparent 25% 52%, rgba(255, 229, 177, 0.15) 52% 53%, transparent 53%),
    linear-gradient(145deg, #21130f, #5c2f1f 42%, #2a1712);
  box-shadow:
    inset 0 0 0 10px rgba(18, 18, 18, 0.88),
    inset 0 0 0 18px rgba(255, 226, 174, 0.08),
    0 30px 60px rgba(31, 17, 12, 0.27);
}

.closet-visual::before,
.closet-visual::after {
  border-color: #161211;
  background:
    radial-gradient(ellipse at 62% 42%, rgba(255, 245, 220, 0.62) 0 18%, transparent 19%),
    radial-gradient(circle at 45% 48%, rgba(255, 245, 220, 0.45) 0 7%, transparent 8%),
    linear-gradient(90deg, transparent 0 14%, rgba(255, 231, 184, 0.12) 14% 16%, transparent 16%),
    linear-gradient(145deg, #321b17, #b66a47 36%, #7b3f34 70%, #2a1714);
}

.closet-visual::before {
  background:
    repeating-linear-gradient(135deg, rgba(255, 214, 128, 0.18) 0 2px, transparent 2px 16px),
    linear-gradient(145deg, #231916, #6f4932 42%, #2a1714);
}

.cabinet-visual::before,
.cabinet-visual::after,
.pantry-visual::before,
.pantry-visual::after {
  border-color: #161211;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 235, 205, 0.72) 0 8px, transparent 9px),
    radial-gradient(circle at 60% 48%, rgba(255, 235, 205, 0.62) 0 12px, transparent 13px),
    radial-gradient(circle at 36% 72%, rgba(255, 235, 205, 0.52) 0 10px, transparent 11px),
    linear-gradient(180deg, transparent 24%, rgba(20, 15, 15, 0.5) 24% 26%, transparent 26% 50%, rgba(20, 15, 15, 0.42) 50% 52%, transparent 52% 75%, rgba(20, 15, 15, 0.36) 75% 77%, transparent 77%),
    linear-gradient(145deg, #261918, #b56f51 46%, #2a1714);
}

.pantry-visual::before,
.pantry-visual::after {
  background:
    radial-gradient(circle at 42% 22%, rgba(255, 244, 204, 0.7) 0 9px, transparent 10px),
    radial-gradient(circle at 58% 55%, rgba(216, 180, 254, 0.58) 0 13px, transparent 14px),
    linear-gradient(180deg, transparent 24%, rgba(20, 15, 15, 0.42) 24% 26%, transparent 26% 52%, rgba(20, 15, 15, 0.36) 52% 54%, transparent 54%),
    linear-gradient(145deg, #2a1714, #7c3aed 42%, #9a5a14);
}

.reminder-visual {
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 249, 223, 0.96) 0 42px, transparent 44px),
    linear-gradient(180deg, transparent 43%, rgba(255, 229, 177, 0.18) 43% 44%, transparent 44%),
    linear-gradient(145deg, #21130f, #9a673c 48%, #3a2018);
}

.reminder-visual::before,
.reminder-visual::after {
  top: 128px;
  bottom: 20px;
  width: calc(50% - 16px);
  border-color: #161211;
  border-radius: 16px;
  background:
    radial-gradient(circle at 45% 30%, rgba(255, 235, 205, 0.62) 0 8px, transparent 9px),
    linear-gradient(180deg, transparent 47%, rgba(20, 15, 15, 0.44) 47% 50%, transparent 50%),
    linear-gradient(145deg, #2a1714, #b98245 48%, #4a2418);
}

.clock-3d-button {
  width: min(78vw, 330px);
  height: 330px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
  animation: clockFloat 4.8s ease-in-out infinite;
}

.clock-3d-button::before,
.clock-3d-button::after,
.clock-3d-button.door-open::before,
.clock-3d-button.door-open::after {
  display: none;
}

.clock-3d-button:hover,
.clock-3d-button:focus-visible {
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg) translateY(-4px);
}

.vintage-clock-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter:
    drop-shadow(0 28px 32px rgba(63, 31, 104, 0.18))
    drop-shadow(0 10px 18px rgba(74, 38, 18, 0.12));
}

.vintage-clock-svg .hour-hand-svg,
.vintage-clock-svg .minute-hand-svg,
.vintage-clock-svg .second-hand-svg {
  transform-box: view-box;
  transform-origin: 160px 166px;
  stroke-linecap: round;
}

.vintage-clock-svg .hour-hand-svg {
  stroke: #213130;
  stroke-width: 10;
  animation: elegantHourRun 43200s linear infinite;
}

.vintage-clock-svg .minute-hand-svg {
  stroke: #1f766f;
  stroke-width: 7;
  animation: elegantMinuteRun 3600s linear infinite;
}

.vintage-clock-svg .second-hand-svg {
  stroke: #7c3aed;
  stroke-width: 3;
  animation: elegantSecondRun 60s steps(60) infinite;
  filter: drop-shadow(0 0 5px rgba(124, 58, 237, 0.26));
}

.vintage-clock-svg .clock-ticks-svg,
.vintage-clock-svg .clock-numbers-svg {
  pointer-events: none;
}

.clock-3d-button::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 70px;
  width: 230px;
  height: 230px;
  display: block;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.8), transparent 18%),
    radial-gradient(circle at 62% 64%, rgba(26, 15, 10, 0.16), transparent 38%),
    conic-gradient(from 220deg, #7a4a20, #f5d08a, #9a5a26, #fff0b8, #6f411f, #c98b42, #7a4a20);
  box-shadow:
    inset 0 0 0 8px rgba(58, 32, 15, 0.38),
    inset 0 0 0 16px rgba(255, 246, 207, 0.22),
    0 24px 45px rgba(63, 31, 104, 0.24),
    0 0 34px rgba(192, 132, 0, 0.14);
}

.clock-3d-button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 0;
  width: 230px;
  height: 42px;
  display: block;
  border-radius: 50%;
  background: rgba(62, 32, 16, 0.18);
  filter: blur(3px);
  transform: translateX(-50%);
}

.clock-3d-button.door-open::before {
  transform: translateX(-50%);
  box-shadow:
    inset 0 0 0 8px rgba(58, 32, 15, 0.38),
    inset 0 0 0 16px rgba(255, 246, 207, 0.22),
    0 24px 45px rgba(63, 31, 104, 0.24),
    0 0 34px rgba(192, 132, 0, 0.14);
}

.clock-3d-button.door-open::after {
  content: "";
}

.clock-3d-button span,
.clock-3d-button i,
.clock-3d-button em,
.clock-3d-button b {
  position: absolute;
  display: block;
}

.clock-3d-button span.clock-handle {
  left: 50%;
  top: 18px;
  z-index: 1;
  width: 148px;
  height: 76px;
  border: 8px solid #a7682f;
  border-bottom: 0;
  border-radius: 100px 100px 0 0;
  background: transparent;
  box-shadow:
    inset 0 8px 8px rgba(255, 235, 176, 0.2),
    0 8px 18px rgba(65, 33, 18, 0.16);
  transform: translateX(-50%);
}

.clock-3d-button span.clock-bell {
  top: 46px;
  z-index: 3;
  width: 86px;
  height: 50px;
  border: 5px solid rgba(96, 58, 25, 0.58);
  border-radius: 80px 80px 18px 18px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.86), transparent 26%),
    linear-gradient(135deg, #dff9f3, #8bd8d1 48%, #3d9c95);
  box-shadow:
    inset 0 -12px 16px rgba(35, 87, 85, 0.18),
    0 12px 22px rgba(65, 33, 18, 0.16);
}

.clock-3d-button span.clock-bell::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 56px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #71411d, #f2c879, #71411d);
  transform: translateX(-50%);
}

.clock-3d-button span.clock-bell-left {
  left: 50px;
  transform: rotate(-18deg);
}

.clock-3d-button span.clock-bell-right {
  right: 50px;
  transform: rotate(18deg);
}

.clock-3d-button.door-open span.clock-handle {
  transform: translateX(-50%);
}

.clock-3d-button.door-open span.clock-bell-left {
  transform: rotate(-18deg);
}

.clock-3d-button.door-open span.clock-bell-right {
  transform: rotate(18deg);
}

.clock-3d-button span.clock-face {
  left: 50%;
  top: 88px;
  z-index: 4;
  width: 196px;
  height: 196px;
  border: 8px solid rgba(95, 55, 24, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.92), transparent 18%),
    radial-gradient(circle at 24% 67%, rgba(139, 202, 190, 0.28) 0 8px, transparent 9px),
    radial-gradient(circle at 72% 32%, rgba(245, 196, 111, 0.34) 0 7px, transparent 8px),
    radial-gradient(circle at 74% 72%, rgba(141, 211, 199, 0.26) 0 10px, transparent 11px),
    linear-gradient(145deg, #fff7d9, #f7e1ac 54%, #e6bd77);
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.52),
    inset 0 0 32px rgba(108, 64, 28, 0.2),
    0 18px 28px rgba(53, 30, 16, 0.18);
  transform: translateX(-50%);
}

.clock-3d-button span.clock-face::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(87, 55, 31, 0.34);
  border-radius: 50%;
}

.clock-3d-button span.clock-face::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: 34px;
  width: 50px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 24% 58%, rgba(83, 151, 134, 0.5) 0 3px, transparent 4px),
    radial-gradient(circle at 54% 36%, rgba(201, 151, 66, 0.42) 0 3px, transparent 4px),
    linear-gradient(135deg, transparent 42%, rgba(70, 129, 112, 0.24) 43% 48%, transparent 49%);
  opacity: 0.75;
  transform: rotate(-18deg);
}

.clock-3d-button .clock-mark {
  z-index: 6;
  color: #2f2018;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 247, 222, 0.7);
}

.mark-12 {
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
}

.mark-3 {
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.mark-6 {
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
}

.mark-9 {
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.clock-3d-button i.clock-hand {
  left: 50%;
  top: auto;
  right: auto;
  bottom: 50%;
  z-index: 7;
  border-radius: 999px;
  transform-origin: 50% 100%;
}

.clock-3d-button i.hour-hand {
  width: 7px;
  height: 52px;
  background: linear-gradient(180deg, #182f31, #2f2018);
  animation: hourRun 43200s linear infinite;
}

.clock-3d-button i.minute-hand {
  width: 5px;
  height: 72px;
  background: linear-gradient(180deg, #2f8f87, #2f2018);
  animation: minuteRun 3600s linear infinite;
}

.clock-3d-button i.second-hand {
  width: 2px;
  height: 82px;
  background: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.34);
  animation: secondRun 60s steps(60) infinite;
}

.clock-3d-button b.clock-center {
  left: 50%;
  top: 50%;
  z-index: 8;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8dd, #b98245 58%, #3c2115);
  box-shadow: 0 2px 8px rgba(49, 27, 15, 0.24);
  transform: translate(-50%, -50%);
}

.clock-3d-button span.clock-leg {
  bottom: 44px;
  z-index: 1;
  width: 54px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5c3418, #f1c477, #5c3418);
  box-shadow: 0 8px 14px rgba(52, 29, 16, 0.18);
}

.clock-3d-button span.clock-leg-left {
  left: 74px;
  transform: rotate(-18deg);
}

.clock-3d-button span.clock-leg-right {
  right: 74px;
  transform: rotate(18deg);
}

.clock-3d-button::before,
.clock-3d-button::after,
.clock-3d-button.door-open::before,
.clock-3d-button.door-open::after {
  content: "";
  display: none;
}

.reminder-scene .scene-visual::after {
  content: "时钟在走";
  display: none;
}

.scene-visual::after {
  content: "点击双开门";
  position: absolute;
  left: 50%;
  bottom: -4px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 22px rgba(63, 31, 104, 0.12);
  font-size: 0.8rem;
  font-weight: 900;
  transform: translateX(-50%);
  pointer-events: none;
}

.scene-items .scene-empty {
  color: var(--muted);
  border-style: dashed;
  background: rgba(255, 255, 255, 0.58);
}

@keyframes sceneFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-0.4deg);
  }

  50% {
    transform: translateY(-6px) rotate(0.4deg);
  }
}

@keyframes clockFloat {
  0%,
  100% {
    transform: perspective(900px) rotateY(-6deg) rotateX(2deg) translateY(0);
  }

  50% {
    transform: perspective(900px) rotateY(-4deg) rotateX(3deg) translateY(-5px);
  }
}

@keyframes hourRun {
  from {
    transform: translateX(-50%) rotate(312deg);
  }

  to {
    transform: translateX(-50%) rotate(672deg);
  }
}

@keyframes minuteRun {
  from {
    transform: translateX(-50%) rotate(24deg);
  }

  to {
    transform: translateX(-50%) rotate(384deg);
  }
}

@keyframes secondRun {
  from {
    transform: translateX(-50%) rotate(0deg);
  }

  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@keyframes elegantHourRun {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes elegantMinuteRun {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes elegantSecondRun {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes itemPop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardFocus {
  0%,
  100% {
    transform: translateY(0);
  }

  45% {
    transform: translateY(-4px);
  }
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  width: min(560px, calc(100vw - 12px));
  margin: 0 auto;
}

.editor-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 252, 255, 0.9), rgba(242, 232, 255, 0.78));
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 252, 255, 0.9);
  outline: 0;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.photo-preview {
  min-height: 140px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  background-position: center;
  background-size: cover;
}

.photo-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.photo-choice {
  min-height: 44px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--accent-dark);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 232, 255, 0.88));
  font-weight: 800;
}

.photo-choice:hover,
.photo-choice:focus-visible {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.13);
}

.photo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.list-head span {
  color: var(--muted);
  font-weight: 700;
}

.item-grid,
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 9px;
}

.item-card,
.photo-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 255, 0.9);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(79, 23, 68, 0.06);
}

.item-card {
  padding: 12px;
}

.item-card.item-focus,
.photo-card.item-focus {
  border-color: rgba(139, 92, 246, 0.72);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.16),
    0 18px 38px rgba(63, 31, 104, 0.16);
  animation: cardFocus 900ms ease both;
}

.item-card h4,
.photo-card h4 {
  margin: 0;
  font-size: 1rem;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: #f8eef8;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tag.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.tag.warn {
  color: var(--warn);
  background: var(--warn-soft);
}

.tag.good {
  color: var(--good);
  background: var(--good-soft);
}

.tag.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.tag:nth-child(odd) {
  border: 1px solid rgba(124, 58, 237, 0.08);
}

.quick-items {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: -4px 0 18px;
}

.quick-items button {
  min-height: 36px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--accent-dark);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 232, 255, 0.86));
  font-weight: 800;
}

.quick-items button:hover {
  border-color: var(--accent);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--plum));
}

.detail-list {
  display: grid;
  gap: 7px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 0.93rem;
}

.detail-list b {
  color: var(--text);
}

.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.compact-meta span {
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(241, 232, 255, 0.66);
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
}

.note {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
  word-break: break-word;
}

.card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.text-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 11px;
  color: var(--text);
  background: rgba(255, 252, 255, 0.9);
  font-weight: 700;
  font-size: 0.9rem;
}

.text-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.text-button.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.text-button.confirming {
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
}

.photo-card button.photo-open {
  display: block;
  width: 100%;
  height: 190px;
  border: 0;
  padding: 0;
  background: #eef2f1;
}

.photo-card img,
.photo-card .photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card .photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.photo-body {
  padding: 12px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 252, 255, 0.8), rgba(240, 228, 255, 0.78));
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.image-dialog {
  width: min(92vw, 900px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  box-shadow: 0 30px 90px rgba(20, 33, 31, 0.28);
}

.image-dialog::backdrop {
  background: rgba(10, 20, 18, 0.68);
}

.image-dialog img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #0e1715;
}

.image-dialog p {
  margin: 0;
  padding: 12px 16px 16px;
  color: var(--muted);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  font-size: 1.5rem;
  line-height: 1;
}

.hidden {
  display: none !important;
}

@media (max-width: 920px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    padding-bottom: 18px;
  }

  .hero-art {
    min-height: 320px;
  }

  .qisi-corner {
    right: 50%;
    bottom: 10px;
    width: min(62vw, 360px);
    transform: translateX(50%) rotate(1deg);
  }

  .qisi-label {
    right: 50%;
    bottom: 22px;
    transform: translateX(50%);
  }

  .qisi-fallback {
    right: 50%;
    bottom: 62px;
    width: min(58vw, 260px);
    transform: translateX(50%);
  }

  .work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-main {
    width: min(100% - 20px, 1220px);
    max-width: 100%;
    padding-top: 12px;
  }

  .app-header {
    padding: 14px 12px;
  }

  .header-actions,
  .heading-actions {
    width: 100%;
  }

  .header-actions > *,
  .heading-actions > * {
    flex: 1 1 auto;
  }

  .hero-panel {
    min-height: auto;
    padding: 20px 14px 14px;
    gap: 8px;
  }

  .hero-copy h2 {
    font-size: clamp(1.9rem, 10vw, 2.65rem);
  }

  .hero-art {
    min-height: 265px;
  }

  .music-note {
    width: 38px;
    height: 38px;
    font-size: 1.12rem;
  }

  .qisi-corner {
    right: 50%;
    bottom: 12px;
    width: min(74vw, 260px);
    transform: translateX(50%) rotate(1deg);
  }

  .qisi-label {
    right: 50%;
    bottom: 18px;
    min-height: 34px;
    padding: 7px 15px;
    transform: translateX(50%);
    font-size: 0.92rem;
  }

  .hero-art::after {
    right: 50%;
    bottom: 22px;
    width: min(250px, 78vw);
    transform: translateX(50%);
  }

  .qisi-fallback {
    right: 50%;
    bottom: 56px;
    width: min(62vw, 220px);
    transform: translateX(50%);
  }

  .tabs {
    width: calc(100vw - 8px);
    bottom: max(4px, env(safe-area-inset-bottom, 4px));
    padding: 5px 2px;
    gap: 0;
    border-radius: 20px;
  }

  .tab-button {
    min-width: auto;
    flex: 1;
    min-height: 50px;
    padding: 2px 2px;
    border-radius: 14px;
  }

  .tab-icon {
    width: 26px;
    height: 26px;
    font-size: 1.15rem;
  }

  .tab-label {
    font-size: 0.58rem;
  }

  .tab-section {
    padding: 16px;
  }

  .scene-card {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 380px;
    padding: 16px;
  }

  .scene-visual {
    min-height: 270px;
  }

  .appliance {
    width: min(76vw, 280px);
    max-width: none;
    height: 255px;
  }

  .fridge-visual {
    width: min(72vw, 260px);
    height: 270px;
  }

  .fridge-contents {
    left: 42px;
    right: 30px;
    top: 44px;
    bottom: 36px;
  }

  .food-fruit {
    left: 12px;
    top: 24px;
    transform: scale(0.86);
    transform-origin: left top;
  }

  .food-veg {
    right: 8px;
    top: 24px;
    transform: scale(0.84);
    transform-origin: right top;
  }

  .food-meat {
    left: 72px;
    top: 88px;
    transform: scale(0.84);
    transform-origin: left top;
  }

  .food-milk {
    left: 18px;
    bottom: 14px;
    transform: scale(0.84);
    transform-origin: left bottom;
  }

  .food-soda {
    right: 22px;
    bottom: 14px;
    transform: scale(0.84);
    transform-origin: right bottom;
  }

  .reminder-visual {
    width: min(62vw, 220px);
    height: 280px;
  }

  .clock-3d-button {
    width: min(76vw, 292px);
    height: 292px;
  }

  .clock-3d-button::before {
    top: 64px;
    width: 202px;
    height: 202px;
  }

  .clock-3d-button span.clock-handle {
    top: 16px;
    width: 128px;
    height: 64px;
    border-width: 7px;
  }

  .clock-3d-button span.clock-bell {
    top: 42px;
    width: 72px;
    height: 44px;
    border-width: 4px;
  }

  .clock-3d-button span.clock-bell-left {
    left: 42px;
  }

  .clock-3d-button span.clock-bell-right {
    right: 42px;
  }

  .clock-3d-button span.clock-face {
    top: 80px;
    width: 174px;
    height: 174px;
    border-width: 7px;
  }

  .clock-3d-button .clock-mark {
    font-size: 1rem;
  }

  .clock-3d-button i.hour-hand {
    height: 46px;
  }

  .clock-3d-button i.minute-hand {
    height: 62px;
  }

  .clock-3d-button i.second-hand {
    height: 72px;
  }

  .clock-3d-button span.clock-leg {
    bottom: 38px;
    width: 46px;
  }

  .clock-3d-button span.clock-leg-left {
    left: 66px;
  }

  .clock-3d-button span.clock-leg-right {
    right: 66px;
  }

  .scene-copy strong {
    font-size: 1.26rem;
  }

  .scene-copy p {
    margin-top: 6px;
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .scene-items {
    gap: 5px;
    margin-top: 8px;
  }

  .scene-items span,
  .scene-items button {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 0.78rem;
  }

  .card-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
  }

  .text-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .item-grid,
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .work-grid > form {
    order: 2;
  }

  .work-grid > div {
    order: 1;
  }

  .list-head {
    margin-bottom: 8px;
  }

  .item-card {
    padding: 10px;
  }

  .photo-card button.photo-open {
    height: 118px;
  }

  .photo-body {
    padding: 10px;
  }

  .card-top {
    margin-bottom: 6px;
  }

  .compact-meta {
    gap: 5px;
    margin-bottom: 8px;
  }

  .compact-meta span {
    padding: 3px 7px;
    font-size: 0.78rem;
  }

  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .two-fields {
    grid-template-columns: 1fr;
  }
}

@media print {
  .app-header,
  .toolbar,
  .tabs,
  .editor-panel,
  .quick-items,
  .card-actions,
  .section-heading button,
  .notice-line {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .app-main {
    width: 100%;
    padding: 0;
  }

  .tab-section {
    display: block !important;
    box-shadow: none;
    border: 0;
    break-after: page;
  }
}

.reminder-scene .scene-visual {
  min-height: min(92vw, 520px);
  display: grid;
  place-items: center;
  overflow: visible;
}

.cheese-clock-button {
  width: min(86vw, 480px);
  height: min(86vw, 480px);
  max-width: 480px;
  max-height: 480px;
  border: 0;
  padding: 0;
  border-radius: 34px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  cursor: pointer;
  transform: none;
  animation: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    filter 0.22s ease,
    transform 0.22s ease;
}

.cheese-clock-button:hover,
.cheese-clock-button:focus-visible {
  outline: 0;
  filter: saturate(1.04) brightness(1.01);
  transform: translateY(-3px);
}

.cheese-clock-button::before,
.cheese-clock-button::after,
.cheese-clock-button.door-open::before,
.cheese-clock-button.door-open::after {
  content: "" !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
}

.cheese-clock-button .cheese-clock-wrap,
.cheese-clock-button.door-open .cheese-clock-wrap {
  position: absolute;
  inset: 0 !important;
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 34px;
  overflow: visible;
  transform: none !important;
}

.cheese-clock-button .cheese-clock-wrap::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 4%;
  z-index: 0;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(92, 51, 24, 0.2), transparent 68%);
  filter: blur(7px);
  pointer-events: none;
}

.cheese-clock-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  object-fit: contain;
  background: transparent;
  transform: none;
  filter:
    drop-shadow(0 26px 30px rgba(91, 58, 103, 0.16))
    drop-shadow(0 10px 16px rgba(112, 68, 24, 0.13));
}

.cheese-clock-button .cheese-clock-second {
  left: 47.7% !important;
  top: 40.1% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 4;
  width: 2px !important;
  height: 19% !important;
  border-radius: 999px;
  background: linear-gradient(180deg, #4b2b1b, #9a6135);
  box-shadow: 0 1px 4px rgba(66, 39, 22, 0.26);
  transform-origin: 50% 100%;
  animation: cheeseSecondRun 60s steps(60) infinite;
  pointer-events: none;
}

.cheese-clock-button .cheese-clock-center {
  left: calc(47.7% - 5px) !important;
  top: calc(59.1% - 5px) !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 5;
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 28%, #a87342, #5a351f 68%);
  box-shadow: 0 2px 5px rgba(52, 31, 18, 0.24);
  transform: none !important;
  pointer-events: none;
}

.cheese-clock-button.door-open .cheese-clock-second {
  transform-origin: 50% 100%;
}

@keyframes cheeseSecondRun {
  from {
    transform: rotate(198deg);
  }

  to {
    transform: rotate(558deg);
  }
}

@media (max-width: 760px) {
  .reminder-scene .scene-visual {
    min-height: min(94vw, 420px);
    place-items: center;
  }

  .cheese-clock-button {
    width: min(86vw, 400px);
    height: min(86vw, 400px);
  }

  .cheese-clock-image {
    border-radius: 28px;
  }
}

.photo-fridge-button.fridge-visual.furniture-piece {
  width: min(82vw, 420px);
  height: min(120vw, 580px);
  max-height: 580px;
  border: 0;
  border-radius: 30px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: perspective(1100px) rotateX(1deg);
  animation: none;
  transition:
    transform 260ms ease,
    filter 260ms ease;
}

.photo-fridge-button.fridge-visual.furniture-piece:hover,
.photo-fridge-button.fridge-visual.furniture-piece:focus-visible {
  outline: 0;
  filter: saturate(1.02) brightness(1.01);
  transform: perspective(1100px) rotateX(1deg) translateY(-4px);
}

.photo-fridge-button.fridge-visual.furniture-piece::before,
.photo-fridge-button.fridge-visual.furniture-piece::after,
.photo-fridge-button.fridge-visual.furniture-piece.door-open::before,
.photo-fridge-button.fridge-visual.furniture-piece.door-open::after {
  content: "";
  display: none;
}

.photo-fridge-button .fridge-photo-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 238, 196, 0.7), transparent 22%),
    linear-gradient(180deg, rgba(255, 245, 229, 0.86), rgba(255, 255, 255, 0.72));
  box-shadow:
    0 30px 44px rgba(111, 70, 38, 0.16),
    0 10px 18px rgba(67, 41, 24, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.76);
  transform-style: preserve-3d;
}

.photo-fridge-button .fridge-photo-stage::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -2%;
  height: 22%;
  z-index: 0;
  background: linear-gradient(180deg, transparent, rgba(224, 180, 118, 0.18));
  pointer-events: none;
}

.photo-fridge-button .fridge-photo-stage::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 5%;
  z-index: 1;
  height: 15%;
  border-radius: 50%;
  background: rgba(92, 56, 28, 0.15);
  filter: blur(12px);
  transform: translateY(28%);
  pointer-events: none;
}

.photo-fridge-button .fridge-photo {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  filter:
    drop-shadow(0 22px 22px rgba(93, 52, 25, 0.16))
    saturate(1.02);
  transition:
    opacity 520ms ease,
    transform 760ms cubic-bezier(0.2, 0.78, 0.18, 1),
    filter 520ms ease;
  will-change: opacity, transform;
}

.photo-fridge-button .fridge-photo-closed {
  opacity: 1;
  transform: none;
}

.photo-fridge-button .fridge-photo-open {
  opacity: 0;
  transform: rotateY(-7deg) translateY(10px);
}

.photo-fridge-button.door-open .fridge-photo-closed {
  opacity: 0;
  transform: rotateY(7deg) translateY(12px);
  filter: blur(1px) saturate(0.96);
}

.photo-fridge-button.door-open .fridge-photo-open {
  opacity: 1;
  transform: none;
}

.photo-fridge-button .fridge-state-badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 5;
  min-width: 108px;
  border-radius: 999px;
  padding: 8px 16px;
  color: #735139;
  background: rgba(255, 248, 237, 0.94);
  box-shadow:
    0 12px 24px rgba(95, 59, 29, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.photo-fridge-button .fridge-state-badge b {
  display: block;
  font: inherit;
  white-space: nowrap;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.photo-fridge-button .fridge-state-badge .badge-open {
  position: absolute;
  inset: 8px 16px;
  opacity: 0;
  transform: translateY(6px);
}

.photo-fridge-button.door-open .badge-closed {
  opacity: 0;
  transform: translateY(-6px);
}

.photo-fridge-button.door-open .badge-open {
  opacity: 1;
  transform: translateY(0);
}

.fridge-scene .scene-visual::after {
  content: "";
  display: none;
}

@media (max-width: 760px) {
  .fridge-scene .scene-visual {
    min-height: min(124vw, 550px);
    place-items: center;
  }

  .photo-fridge-button.fridge-visual.furniture-piece {
    width: min(82vw, 380px);
    height: min(120vw, 520px);
  }

  .photo-fridge-button .fridge-photo-stage {
    border-radius: 24px;
  }

  .photo-fridge-button .fridge-state-badge {
    bottom: 8px;
    padding: 7px 14px;
    font-size: 0.86rem;
  }
}

.photo-closet-button.closet-visual.furniture-piece {
  width: min(82vw, 420px);
  height: min(120vw, 600px);
  max-height: none;
  border: 0;
  border-radius: 30px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: perspective(1100px) rotateX(1deg);
  animation: none;
  transition:
    transform 260ms ease,
    filter 260ms ease;
}

.photo-closet-button.closet-visual.furniture-piece:hover,
.photo-closet-button.closet-visual.furniture-piece:focus-visible {
  outline: 0;
  filter: saturate(1.02) brightness(1.01);
  transform: perspective(1100px) rotateX(1deg) translateY(-4px);
}

.photo-closet-button.closet-visual.furniture-piece::before,
.photo-closet-button.closet-visual.furniture-piece::after,
.photo-closet-button.closet-visual.furniture-piece.door-open::before,
.photo-closet-button.closet-visual.furniture-piece.door-open::after {
  content: "";
  display: none;
}

.photo-closet-button .closet-photo-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 235, 210, 0.72), transparent 22%),
    linear-gradient(180deg, rgba(255, 245, 230, 0.88), rgba(255, 255, 255, 0.72));
  box-shadow:
    0 30px 44px rgba(106, 72, 42, 0.16),
    0 10px 18px rgba(68, 44, 27, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.76);
  transform-style: preserve-3d;
}

.photo-closet-button .closet-photo-stage::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 4%;
  z-index: 1;
  height: 14%;
  border-radius: 50%;
  background: rgba(92, 62, 34, 0.14);
  filter: blur(12px);
  transform: translateY(30%);
  pointer-events: none;
}

.photo-closet-button .closet-photo {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  filter:
    drop-shadow(0 22px 22px rgba(91, 58, 31, 0.15))
    saturate(1.02);
  transition:
    opacity 520ms ease,
    transform 760ms cubic-bezier(0.2, 0.78, 0.18, 1),
    filter 520ms ease;
  will-change: opacity, transform;
}

.photo-closet-button .closet-photo-closed {
  opacity: 1;
  transform: none;
}

.photo-closet-button .closet-photo-open {
  opacity: 0;
  transform: rotateY(-7deg) translateY(10px);
}

.photo-closet-button.door-open .closet-photo-closed {
  opacity: 0;
  transform: rotateY(7deg) translateY(12px);
  filter: blur(1px) saturate(0.96);
}

.photo-closet-button.door-open .closet-photo-open {
  opacity: 1;
  transform: none;
}

.photo-closet-button .closet-state-badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 5;
  min-width: 108px;
  border-radius: 999px;
  padding: 8px 16px;
  color: #72513c;
  background: rgba(255, 248, 238, 0.94);
  box-shadow:
    0 12px 24px rgba(95, 61, 34, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.photo-closet-button .closet-state-badge b {
  display: block;
  font: inherit;
  white-space: nowrap;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.photo-closet-button .closet-state-badge .badge-open {
  position: absolute;
  inset: 8px 16px;
  opacity: 0;
  transform: translateY(6px);
}

.photo-closet-button.door-open .badge-closed {
  opacity: 0;
  transform: translateY(-6px);
}

.photo-closet-button.door-open .badge-open {
  opacity: 1;
  transform: translateY(0);
}

.closet-scene .scene-visual::after {
  content: "";
  display: none;
}

@media (max-width: 760px) {
  .closet-scene .scene-visual {
    min-height: min(124vw, 570px);
    place-items: center;
  }

  .photo-closet-button.closet-visual.furniture-piece {
    width: min(82vw, 380px);
    height: min(120vw, 530px);
  }

  .photo-closet-button .closet-photo-stage {
    border-radius: 24px;
  }

  .photo-closet-button .closet-state-badge {
    bottom: 8px;
    padding: 7px 14px;
    font-size: 0.86rem;
  }
}

.fridge-scene,
.closet-scene {
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fridge-scene::before,
.fridge-scene::after,
.closet-scene::before,
.closet-scene::after {
  content: "";
  display: none;
}

.fridge-scene .scene-visual,
.closet-scene .scene-visual {
  width: min(560px, 100vw);
  min-height: min(600px, calc(100vh - 120px));
  margin: 0 auto;
  overflow: visible;
  display: grid;
  place-items: center;
}

.photo-fridge-button.fridge-visual.furniture-piece,
.photo-closet-button.closet-visual.furniture-piece {
  width: min(520px, calc(100vw - 12px));
  height: min(620px, calc(100vh - 140px));
  max-height: none;
  border-radius: 0;
}

.photo-fridge-button .fridge-photo-stage,
.photo-closet-button .closet-photo-stage {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.photo-fridge-button .fridge-photo-stage::before,
.photo-fridge-button .fridge-photo-stage::after,
.photo-closet-button .closet-photo-stage::after {
  content: "";
  display: none;
}

.photo-fridge-button .fridge-photo,
.photo-closet-button .closet-photo {
  border-radius: 0;
  filter: drop-shadow(0 24px 26px rgba(92, 55, 31, 0.15)) saturate(1.02);
}

.fridge-scene .scene-copy,
.closet-scene .scene-copy {
  width: min(520px, calc(100vw - 12px));
  margin: 10px auto 0;
  text-align: center;
}

@media (max-width: 760px) {
  .fridge-scene .scene-visual,
  .closet-scene .scene-visual {
    width: 100vw;
    min-height: calc(100vh - 140px);
  }

  .photo-fridge-button.fridge-visual.furniture-piece,
  .photo-closet-button.closet-visual.furniture-piece {
    width: calc(100vw - 12px);
    height: calc(100vh - 130px);
  }

  .fridge-scene .scene-copy,
  .closet-scene .scene-copy {
    width: calc(100vw - 16px);
  }
}

.reminder-scene {
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.reminder-scene::before,
.reminder-scene::after {
  content: "";
  display: none;
}

.reminder-scene .scene-visual {
  width: min(560px, 100vw);
  min-height: min(520px, calc(100vh - 120px));
  margin: 0 auto;
  overflow: visible;
  display: grid;
  place-items: center;
}

.cheese-clock-button {
  width: min(520px, calc(100vw - 12px));
  height: min(520px, calc(100vw - 12px));
  max-width: none;
  max-height: none;
  border-radius: 0;
}

.cheese-clock-button .cheese-clock-wrap {
  border-radius: 0;
}

.cheese-clock-button .cheese-clock-wrap::before {
  content: "";
  display: none;
}

.cheese-clock-image {
  border-radius: 0;
  filter: drop-shadow(0 22px 24px rgba(91, 58, 103, 0.12));
}

.reminder-scene .scene-copy {
  width: min(520px, calc(100vw - 12px));
  margin: 10px auto 0;
  text-align: center;
}

.cabinet-scene {
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cabinet-scene::before,
.cabinet-scene::after {
  content: "";
  display: none;
}

.cabinet-scene .scene-visual {
  width: min(560px, 100vw);
  min-height: min(600px, calc(100vh - 120px));
  margin: 0 auto;
  overflow: visible;
  display: grid;
  place-items: center;
}

.photo-cabinet-button.cabinet-visual.furniture-piece {
  width: min(520px, calc(100vw - 12px));
  height: min(620px, calc(100vh - 140px));
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: perspective(1100px) rotateX(1deg);
  animation: none;
  transition:
    transform 260ms ease,
    filter 260ms ease;
}

.photo-cabinet-button.cabinet-visual.furniture-piece:hover,
.photo-cabinet-button.cabinet-visual.furniture-piece:focus-visible {
  outline: 0;
  filter: saturate(1.02) brightness(1.01);
  transform: perspective(1100px) rotateX(1deg) translateY(-4px);
}

.photo-cabinet-button.cabinet-visual.furniture-piece::before,
.photo-cabinet-button.cabinet-visual.furniture-piece::after,
.photo-cabinet-button.cabinet-visual.furniture-piece.door-open::before,
.photo-cabinet-button.cabinet-visual.furniture-piece.door-open::after {
  content: "";
  display: none;
}

.photo-cabinet-button .cabinet-photo-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform-style: preserve-3d;
}

.photo-cabinet-button .cabinet-photo-stage::before,
.photo-cabinet-button .cabinet-photo-stage::after {
  content: "";
  display: none;
}

.photo-cabinet-button .cabinet-photo {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  filter: drop-shadow(0 24px 26px rgba(100, 55, 69, 0.14)) saturate(1.02);
  transition:
    opacity 520ms ease,
    transform 760ms cubic-bezier(0.2, 0.78, 0.18, 1),
    filter 520ms ease;
  will-change: opacity, transform;
}

.photo-cabinet-button .cabinet-photo-closed {
  opacity: 1;
  transform: none;
}

.photo-cabinet-button .cabinet-photo-open {
  opacity: 0;
  transform: rotateY(-5deg) translateY(8px);
}

.photo-cabinet-button.door-open .cabinet-photo-closed {
  opacity: 0;
  transform: rotateY(5deg) translateY(12px);
  filter: blur(1px) saturate(0.96);
}

.photo-cabinet-button.door-open .cabinet-photo-open {
  opacity: 1;
  transform: none;
}

.photo-cabinet-button .cabinet-state-badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 5;
  min-width: 108px;
  border-radius: 999px;
  padding: 8px 16px;
  color: #8a4d5e;
  background: rgba(255, 248, 250, 0.94);
  box-shadow:
    0 12px 24px rgba(105, 52, 68, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.photo-cabinet-button .cabinet-state-badge b {
  display: block;
  font: inherit;
  white-space: nowrap;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.photo-cabinet-button .cabinet-state-badge .badge-open {
  position: absolute;
  inset: 8px 16px;
  opacity: 0;
  transform: translateY(6px);
}

.photo-cabinet-button.door-open .badge-closed {
  opacity: 0;
  transform: translateY(-6px);
}

.photo-cabinet-button.door-open .badge-open {
  opacity: 1;
  transform: translateY(0);
}

.cabinet-scene .scene-visual::after {
  content: "";
  display: none;
}

.cabinet-scene .scene-copy {
  width: min(520px, calc(100vw - 12px));
  margin: 10px auto 0;
  text-align: center;
}

@media (max-width: 760px) {
  .reminder-scene .scene-visual {
    width: 100vw;
    min-height: calc(100vh - 140px);
  }

  .cheese-clock-button {
    width: calc(100vw - 12px);
    height: calc(100vw - 12px);
  }

  .cabinet-scene .scene-visual {
    width: 100vw;
    min-height: calc(100vh - 140px);
  }

  .photo-cabinet-button.cabinet-visual.furniture-piece {
    width: calc(100vw - 12px);
    height: calc(100vh - 130px);
  }

  .photo-cabinet-button .cabinet-state-badge {
    bottom: 8px;
    padding: 7px 14px;
    font-size: 0.86rem;
  }

  .reminder-scene .scene-copy,
  .cabinet-scene .scene-copy {
    width: calc(100vw - 32px);
  }
}

.pantry-scene {
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pantry-scene::before,
.pantry-scene::after {
  content: "";
  display: none;
}

.pantry-scene .scene-visual {
  width: min(560px, 100vw);
  min-height: min(600px, calc(100vh - 120px));
  margin: 0 auto;
  overflow: visible;
  display: grid;
  place-items: center;
}

.photo-pantry-button.pantry-visual.furniture-piece {
  width: min(520px, calc(100vw - 12px));
  height: min(620px, calc(100vh - 140px));
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: perspective(1100px) rotateX(1deg);
  animation: none;
  transition:
    transform 260ms ease,
    filter 260ms ease;
}

.photo-pantry-button.pantry-visual.furniture-piece:hover,
.photo-pantry-button.pantry-visual.furniture-piece:focus-visible {
  outline: 0;
  filter: saturate(1.02) brightness(1.01);
  transform: perspective(1100px) rotateX(1deg) translateY(-4px);
}

.photo-pantry-button.pantry-visual.furniture-piece::before,
.photo-pantry-button.pantry-visual.furniture-piece::after,
.photo-pantry-button.pantry-visual.furniture-piece.door-open::before,
.photo-pantry-button.pantry-visual.furniture-piece.door-open::after {
  content: "";
  display: none;
}

.photo-pantry-button .pantry-photo-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform-style: preserve-3d;
}

.photo-pantry-button .pantry-photo-stage::before,
.photo-pantry-button .pantry-photo-stage::after {
  content: "";
  display: none;
}

.photo-pantry-button .pantry-photo {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  filter: drop-shadow(0 24px 26px rgba(103, 56, 70, 0.14)) saturate(1.02);
  transition:
    opacity 520ms ease,
    transform 760ms cubic-bezier(0.2, 0.78, 0.18, 1),
    filter 520ms ease;
  will-change: opacity, transform;
}

.photo-pantry-button .pantry-photo-closed {
  opacity: 1;
  transform: none;
}

.photo-pantry-button .pantry-photo-open {
  opacity: 0;
  transform: rotateY(-5deg) translateY(8px);
}

.photo-pantry-button.door-open .pantry-photo-closed {
  opacity: 0;
  transform: rotateY(5deg) translateY(12px);
  filter: blur(1px) saturate(0.96);
}

.photo-pantry-button.door-open .pantry-photo-open {
  opacity: 1;
  transform: none;
}

.photo-pantry-button .pantry-state-badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 5;
  min-width: 108px;
  border-radius: 999px;
  padding: 8px 16px;
  color: #9a5068;
  background: rgba(255, 248, 250, 0.94);
  box-shadow:
    0 12px 24px rgba(105, 52, 68, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.photo-pantry-button .pantry-state-badge b {
  display: block;
  font: inherit;
  white-space: nowrap;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.photo-pantry-button .pantry-state-badge .badge-open {
  position: absolute;
  inset: 8px 16px;
  opacity: 0;
  transform: translateY(6px);
}

.photo-pantry-button.door-open .badge-closed {
  opacity: 0;
  transform: translateY(-6px);
}

.photo-pantry-button.door-open .badge-open {
  opacity: 1;
  transform: translateY(0);
}

.pantry-scene .scene-visual::after {
  content: "";
  display: none;
}

.pantry-scene .scene-copy {
  width: min(520px, calc(100vw - 12px));
  margin: 10px auto 0;
  text-align: center;
}

.scene-clear-button {
  align-self: center;
  min-width: 132px;
  margin-top: 12px;
  border-color: rgba(124, 58, 237, 0.24);
  background: rgba(255, 255, 255, 0.9);
  color: #6d28d9;
  box-shadow: 0 10px 22px rgba(107, 33, 168, 0.08);
}

.scene-clear-button:active {
  transform: translateY(1px);
}

@media (max-width: 760px) {
  .scene-copy .scene-clear-button {
    width: min(64vw, 260px);
    margin: 12px auto 0;
  }

  .pantry-scene .scene-visual {
    width: 100vw;
    min-height: calc(100vh - 140px);
  }

  .photo-pantry-button.pantry-visual.furniture-piece {
    width: calc(100vw - 12px);
    height: calc(100vh - 130px);
  }

  .photo-pantry-button .pantry-state-badge {
    bottom: 8px;
    padding: 7px 14px;
    font-size: 0.86rem;
  }

  .pantry-scene .scene-copy {
    width: calc(100vw - 32px);
  }
}

/* Final centering layer: keep every main module on the same mobile center line. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  --page-stage: min(560px, calc(100vw - 24px));
}

.app-main {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 0;
  align-items: center;
  overflow-x: hidden;
}

.hero-panel,
.alert-panel,
.toolbar,
.tab-section,
.tabs {
  width: var(--page-stage);
  max-width: var(--page-stage);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.hero-panel {
  overflow: hidden;
}

.hero-panel::before,
.hero-panel::after,
.scene-card::before,
.scene-card::after {
  display: none;
}

.hero-copy h2 {
  width: 100%;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.hero-art,
.scene-card,
.scene-visual,
.scene-copy,
.section-heading,
.notice-line,
.quick-items,
.work-grid,
.list-head,
.item-grid,
.photo-grid {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.scene-card {
  align-items: center;
}

.scene-visual {
  justify-items: center;
  overflow: hidden;
}

.tabs {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.photo-fridge-button.fridge-visual.furniture-piece,
.photo-closet-button.closet-visual.furniture-piece,
.photo-cabinet-button.cabinet-visual.furniture-piece,
.photo-pantry-button.pantry-visual.furniture-piece {
  width: min(100%, 420px);
  margin-left: auto;
  margin-right: auto;
}

.cheese-clock-button {
  width: min(100%, 420px);
  height: min(var(--page-stage), 420px);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  body {
    --page-stage: calc(100vw - 24px);
  }

  .app-main {
    width: 100%;
    max-width: 100%;
  }

  .hero-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-copy h2 {
    font-size: clamp(1.7rem, 8.2vw, 2.28rem);
    line-height: 1.16;
  }

  .tab-section {
    padding-left: 0;
    padding-right: 0;
  }

  .section-heading {
    align-items: center;
    text-align: center;
  }

  .tabs {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .pantry-scene .scene-visual {
    width: 100%;
  }

  .photo-pantry-button.pantry-visual.furniture-piece {
    width: min(100%, 420px);
  }

  .pantry-scene .scene-copy {
    width: 100%;
  }
}
