:root {
  --bg: oklch(96% 0.012 82);
  --surface: oklch(99% 0.006 82);
  --surface-soft: oklch(94% 0.014 82);
  --fg: oklch(25% 0.016 70);
  --muted: oklch(55% 0.018 72);
  --border: oklch(88% 0.014 78);
  --accent: oklch(61% 0.064 64);
  --accent-soft: oklch(88% 0.04 70);
  --sage: oklch(69% 0.045 138);
  --clay: oklch(67% 0.05 42);
  --ink: oklch(36% 0.02 70);
  --shadow: 0 18px 46px color-mix(in oklab, var(--fg), transparent 90%);
  --hairline: 0 0 0 1px var(--border);
  --font-display: "New York", "Iowan Old Style", "Charter", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in oklab, var(--accent-soft), transparent 40%), transparent 38%),
    var(--bg);
}

.screen {
  height: 100vh;
  padding: 18px 22px 112px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  color: var(--muted);
}

.topbar .title-mini {
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.icon-btn,
.text-btn {
  min-width: 38px;
  min-height: 38px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: color-mix(in oklab, var(--surface), transparent 10%);
  color: var(--fg);
  box-shadow: var(--hairline);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.text-btn {
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.icon-btn:active,
.text-btn:active,
.primary:active,
.stamp:active {
  transform: scale(0.97);
}

.hero {
  display: grid;
  gap: 7px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 10ch;
  font-family: var(--font-display);
  font-size: clamp(38px, 11vw, 50px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.subtle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.collection-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  padding-bottom: 4px;
}

.progress {
  display: grid;
  gap: 8px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.track {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--border), transparent 15%);
  overflow: hidden;
}

.fill {
  width: var(--value, 38%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 13px;
}

.stamp {
  position: relative;
  aspect-ratio: 0.78;
  border-radius: 16px;
  padding: 8px;
  background: var(--surface);
  box-shadow: var(--hairline);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.stamp::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed color-mix(in oklab, var(--muted), transparent 55%);
  border-radius: 12px;
  pointer-events: none;
}

.stamp:hover {
  transform: translateY(-2px);
  box-shadow: var(--hairline), var(--shadow);
}

.stamp-inner {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  place-items: center;
}

.stamp-label {
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.05;
  text-align: center;
  color: var(--ink);
}

.stamp.empty {
  background:
    linear-gradient(145deg, color-mix(in oklab, var(--surface), transparent 20%), color-mix(in oklab, var(--surface-soft), transparent 4%));
}

.stamp.empty .stamp-label {
  color: color-mix(in oklab, var(--muted), transparent 18%);
  font-family: var(--font-body);
}

.stamp.empty .object {
  opacity: 0.2;
}

.object {
  width: 58px;
  height: 58px;
  position: relative;
}

.obj-cup {
  border: 8px solid var(--clay);
  border-top: 0;
  border-radius: 8px 8px 18px 18px;
}
.obj-cup::after {
  content: "";
  position: absolute;
  right: -22px;
  top: 10px;
  width: 22px;
  height: 22px;
  border: 6px solid var(--clay);
  border-left: 0;
  border-radius: 0 14px 14px 0;
}

.obj-ticket {
  width: 62px;
  height: 40px;
  border-radius: 8px;
  background: var(--sage);
  transform: rotate(-7deg);
}
.obj-ticket::before {
  content: "";
  position: absolute;
  inset: 10px 12px;
  border-top: 2px solid color-mix(in oklab, var(--fg), transparent 70%);
  border-bottom: 2px solid color-mix(in oklab, var(--fg), transparent 70%);
}

.obj-notebook,
.obj-book {
  width: 44px;
  height: 58px;
  border-radius: 8px;
  background: var(--ink);
}
.obj-notebook::before,
.obj-book::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  width: 4px;
  height: 100%;
  background: color-mix(in oklab, var(--surface), transparent 25%);
}

.obj-plant {
  width: 50px;
  height: 58px;
}
.obj-plant::before {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 0;
  width: 28px;
  height: 24px;
  border-radius: 4px 4px 12px 12px;
  background: var(--clay);
}
.obj-plant::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 48px;
  height: 40px;
  border-radius: 60% 40% 60% 40%;
  background: var(--sage);
  transform: rotate(-18deg);
}

.obj-camera {
  width: 58px;
  height: 42px;
  border-radius: 11px;
  background: var(--ink);
  margin-top: 12px;
}
.obj-camera::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--surface), transparent 10%);
}

.obj-matchbox,
.obj-perfume {
  width: 40px;
  height: 58px;
  border-radius: 7px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--accent), transparent 34%);
}
.obj-perfume {
  border-radius: 12px 12px 8px 8px;
  width: 42px;
  height: 52px;
  margin-top: 6px;
}
.obj-perfume::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 14px;
  width: 14px;
  height: 10px;
  border-radius: 5px 5px 0 0;
  background: var(--ink);
}

.obj-shell {
  width: 56px;
  height: 44px;
  border-radius: 60% 60% 40% 40%;
  background: var(--clay);
  margin-top: 14px;
}
.obj-shell::before {
  content: "";
  position: absolute;
  inset: 10px 8px 0;
  border-radius: 50% 50% 0 0;
  border-top: 2px solid color-mix(in oklab, var(--surface), transparent 25%);
}

.panel {
  border-radius: 24px;
  background: color-mix(in oklab, var(--surface), transparent 3%);
  box-shadow: var(--hairline);
  padding: 18px;
}

.field {
  display: grid;
  gap: 9px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 18px;
  padding: 15px 16px;
  background: var(--surface-soft);
  color: var(--fg);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--hairline);
  font-size: 13px;
}

.primary {
  width: 100%;
  min-height: 54px;
  border-radius: 18px;
  background: var(--fg);
  color: var(--surface);
  font-weight: 650;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.primary.warm {
  background: var(--accent);
  color: var(--surface);
}

.generation {
  display: grid;
  place-items: center;
  min-height: 306px;
  gap: 20px;
  text-align: center;
}

.generating-stamp {
  width: 150px;
  aspect-ratio: 0.78;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--hairline), var(--shadow);
  position: relative;
  display: grid;
  place-items: center;
  animation: breathe 2.4s var(--ease) infinite;
}

.generating-stamp::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px dashed color-mix(in oklab, var(--muted), transparent 58%);
  border-radius: 16px;
}

.rings {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--accent), transparent 42%);
  position: relative;
}
.rings::before,
.rings::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: inherit;
  animation: orbit 1.7s linear infinite;
}
.rings::after {
  inset: 22px;
  animation-duration: 2.2s;
}

.preview-large {
  width: min(68vw, 232px);
  aspect-ratio: 0.78;
  align-self: center;
  border-radius: 28px;
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--hairline), var(--shadow);
}

.preview-large .object {
  width: 104px;
  height: 104px;
}

.detail-card {
  display: grid;
  gap: 20px;
  justify-items: center;
  padding-top: 8px;
}

.metadata-list,
.settings-list {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--border);
}
.row:last-child {
  border-bottom: 0;
}

.row small {
  color: var(--muted);
  font-size: 12px;
}

.toggle {
  width: 48px;
  height: 30px;
  border-radius: 999px;
  padding: 3px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent), transparent 42%);
}
.toggle span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  transform: translateX(18px);
  transition: transform 180ms var(--ease);
}
.toggle.off {
  background: var(--border);
}
.toggle.off span {
  transform: translateX(0);
}

.empty-state {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-stack {
  display: grid;
  gap: 22px;
  justify-items: center;
  max-width: 290px;
}

.empty-slots {
  display: grid;
  grid-template-columns: repeat(3, 58px);
  gap: 12px;
}

.slot {
  width: 58px;
  height: 76px;
  border-radius: 13px;
  background: color-mix(in oklab, var(--surface), transparent 16%);
  box-shadow: var(--hairline);
  position: relative;
}
.slot::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: color-mix(in oklab, var(--muted), transparent 12%);
  font-size: 20px;
}

.tabbar {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 66px;
  border-radius: 24px;
  background: color-mix(in oklab, var(--surface), transparent 3%);
  box-shadow: var(--hairline), 0 10px 34px color-mix(in oklab, var(--fg), transparent 90%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding: 8px;
}

.tab {
  min-height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.tab.active {
  background: var(--surface-soft);
  color: var(--fg);
}

.variant-b {
  --bg: oklch(95% 0.016 92);
  --surface: oklch(99% 0.007 90);
  --surface-soft: oklch(92% 0.018 92);
  --accent: oklch(58% 0.052 108);
  --accent-soft: oklch(86% 0.04 102);
  --sage: oklch(66% 0.04 154);
  --clay: oklch(64% 0.045 52);
}

.variant-b .stamp {
  border-radius: 12px;
}

.variant-b .stamp::before {
  border-style: solid;
}

.variant-b h1 {
  font-family: var(--font-body);
  font-weight: 680;
  line-height: 1.04;
}

.variant-b .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.variant-b .stamp {
  aspect-ratio: 1;
}

.variant-b .stamp-label {
  font-family: var(--font-body);
  font-weight: 650;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

@keyframes orbit {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.05); }
}

@media (max-height: 760px) {
  .screen { gap: 16px; padding-bottom: 86px; }
  .grid { gap: 12px 10px; }
  h1 { font-size: 36px; }
  .stamp-label { font-size: 11px; }
}
