﻿/* ============================================================
   拾光 · LIFE IN FRAMES
   A quiet little album, made of paper, light and small memories.
   ============================================================ */

:root {
  --paper: #f4efe6;
  --paper-soft: #f8f4ec;
  --paper-deep: #ebe3d6;
  --card: #fffdf8;
  --ink: #2e2b26;
  --ink-soft: #5c564d;
  --muted: #8b8174;
  --muted-light: #b4aa9c;
  --line: rgba(46, 43, 38, 0.12);
  --line-strong: rgba(46, 43, 38, 0.22);
  --accent: #b96745;
  --accent-deep: #8f4a2e;
  --accent-soft: #ead5c7;
  --sage: #7d8a75;
  --butter: #e8bc6d;
  --danger: #a54538;
  --white: #fffdf9;
  --serif: "ZCOOL XiaoWei", "Songti SC", "STSong", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --latin: "Cormorant Garamond", "Times New Roman", serif;
  --shadow-sm: 0 8px 24px rgba(72, 55, 35, 0.07);
  --shadow-md: 0 20px 50px rgba(72, 55, 35, 0.12);
  --shadow-lg: 0 32px 90px rgba(60, 45, 28, 0.18);
  --radius: 16px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% -5%, rgba(255, 252, 244, 0.95) 0%, transparent 46%),
    radial-gradient(ellipse at 100% 0%, rgba(219, 199, 175, 0.34) 0%, transparent 42%),
    var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

input,
textarea {
  border: 0;
  outline: 0;
  background: transparent;
}

textarea {
  resize: vertical;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 10000;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  background: var(--ink);
  color: var(--paper);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

/* Paper grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 10px;
  background-clip: content-box;
  background-color: rgba(83, 68, 50, 0.24);
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(83, 68, 50, 0.38);
}

/* ============================================================
   Typography & shared elements
   ============================================================ */

.eyebrow {
  color: var(--muted);
  font-family: var(--latin);
  font-size: 11px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.5;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.28s var(--ease),
    background 0.28s var(--ease),
    color 0.28s var(--ease),
    border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: var(--ink);
  color: var(--paper-soft);
  box-shadow: 0 10px 22px rgba(47, 43, 36, 0.16);
}

.btn.primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 14px 30px rgba(143, 74, 46, 0.22);
}

.btn.ghost {
  border-color: var(--line-strong);
  background: rgba(255, 253, 248, 0.35);
  color: var(--ink-soft);
}

.btn.ghost:hover {
  border-color: var(--ink-soft);
  background: var(--card);
  color: var(--ink);
}

.btn.danger {
  background: var(--danger);
  color: #fff9f4;
}

.btn.text-danger {
  min-height: auto;
  padding: 6px 0;
  color: var(--danger);
  font-size: 12.5px;
}

.btn.text-danger:hover {
  color: #7e2d23;
}

.btn.large {
  min-height: 54px;
  padding: 0 28px 0 30px;
  font-size: 14px;
}

.btn.full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  display: inline-flex;
  margin-left: 6px;
  transition: transform 0.28s var(--ease);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink-soft);
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.icon-btn:hover {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink);
}

.icon-btn.tiny {
  width: 28px;
  height: 28px;
}

.icon-btn.danger-ghost:hover {
  border-color: rgba(165, 69, 56, 0.2);
  background: rgba(165, 69, 56, 0.07);
  color: var(--danger);
}

/* ============================================================
   Navigation & footer
   ============================================================ */

.site-shell {
  position: relative;
  min-height: 100vh;
}

.site-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 24px 48px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--accent);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-8deg);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--latin);
  font-size: 8px;
  font-style: italic;
  letter-spacing: 0.24em;
}

.nav-date {
  color: var(--muted);
  font-family: var(--latin);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.16em;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.nav-link:hover {
  color: var(--accent-deep);
  border-color: rgba(143, 74, 46, 0.4);
}

.nav-link.quiet {
  color: var(--muted);
  font-size: 11.5px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.back-link:hover {
  color: var(--accent-deep);
  transform: translateX(-3px);
}

.site-footer {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 20px 48px 34px;
}

.footer-line {
  height: 1px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.footer-brand {
  font-family: var(--latin);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.18em;
}

.footer-inner p {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.footer-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ============================================================
   Landing
   ============================================================ */

.landing-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 79% 42%, rgba(213, 190, 166, 0.28) 0%, transparent 34%),
    radial-gradient(ellipse at 14% 70%, rgba(255, 253, 246, 0.7) 0%, transparent 40%);
}

.landing-main {
  flex: 1;
  width: min(100%, 1380px);
  margin: 0 auto;
  padding: 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  align-items: center;
  gap: 3.5vw;
  min-height: calc(100vh - 226px);
  padding: 22px 0 54px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-left: clamp(0px, 4vw, 58px);
  animation: rise-in 0.9s var(--ease) both;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: clamp(20px, 3.2vh, 36px);
  color: var(--muted);
  font-family: var(--latin);
  font-size: 10.5px;
  font-style: italic;
  letter-spacing: 0.2em;
}

.kicker-line {
  display: block;
  width: 34px;
  height: 1px;
  background: var(--accent);
  opacity: 0.64;
}

.hero-title {
  font-size: clamp(72px, 9.5vw, 146px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.005em;
}

.hero-title a {
  position: relative;
  display: inline-block;
  padding-bottom: 0.08em;
  transition: color 0.35s var(--ease);
}

.hero-title a::after {
  content: "";
  position: absolute;
  right: 2%;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.hero-title a:hover {
  color: var(--accent-deep);
}

.hero-title a:hover::after {
  transform: scaleX(1);
}

.title-accent {
  position: relative;
  display: inline-block;
}

.title-accent::after {
  content: "";
  position: absolute;
  right: -0.04em;
  bottom: 0.03em;
  left: 0.02em;
  height: 0.1em;
  border-radius: 999px;
  background: rgba(185, 103, 69, 0.2);
  transform: rotate(-0.7deg);
  z-index: -1;
}

.title-dot {
  display: inline-block;
  margin-left: 0.03em;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.64em;
  line-height: 0;
  vertical-align: 0.24em;
}

.hero-lede {
  margin-top: clamp(26px, 4.2vh, 44px);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(14px, 1.2vw, 16.5px);
  letter-spacing: 0.06em;
  line-height: 2.12;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: clamp(28px, 4.4vh, 48px);
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.hero-art {
  position: relative;
  min-height: clamp(520px, 63vh, 650px);
  animation: rise-in 1s 0.1s var(--ease) both;
}

.art-aura {
  position: absolute;
  top: 8%;
  left: 12%;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(221, 190, 160, 0.46) 0%, rgba(221, 190, 160, 0) 68%);
  filter: blur(14px);
}

.art-botanical {
  position: absolute;
  bottom: -2%;
  left: -3%;
  width: 190px;
  color: rgba(125, 138, 117, 0.46);
  transform: rotate(-4deg);
}

.polaroid {
  position: absolute;
  z-index: 1;
  padding: 9px 9px 0;
  background: #fffdf8;
  box-shadow:
    0 20px 44px rgba(74, 55, 34, 0.16),
    0 2px 6px rgba(74, 55, 34, 0.08);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
  will-change: transform;
}

.polaroid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(77, 58, 37, 0.05);
}

.polaroid-photo {
  overflow: hidden;
  background: var(--paper-deep);
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.polaroid:hover {
  z-index: 5;
  box-shadow: 0 30px 70px rgba(74, 55, 34, 0.22);
}

.polaroid:hover .polaroid-photo img {
  transform: scale(1.035);
}

.polaroid figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 3px;
  gap: 10px;
}

.polaroid figcaption span {
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.polaroid figcaption em {
  color: var(--muted);
  font-family: var(--latin);
  font-size: 8px;
  font-style: italic;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.polaroid-one {
  top: 6%;
  left: 2%;
  width: clamp(220px, 20vw, 286px);
  transform: rotate(-6.5deg);
}

.polaroid-one .polaroid-photo {
  aspect-ratio: 0.8;
}

.polaroid-two {
  top: 33%;
  right: 0;
  width: clamp(188px, 17.4vw, 248px);
  transform: rotate(5.6deg);
}

.polaroid-two .polaroid-photo {
  aspect-ratio: 0.82;
}

.polaroid-three {
  bottom: -2%;
  left: 24%;
  width: clamp(152px, 14vw, 198px);
  transform: rotate(-2.6deg);
}

.polaroid-three .polaroid-photo {
  aspect-ratio: 0.78;
}

.polaroid-three figcaption {
  height: 44px;
}

.polaroid-three figcaption span {
  font-size: 12px;
}

.tape {
  position: absolute;
  z-index: 2;
  width: 64px;
  height: 20px;
  background: rgba(236, 221, 192, 0.72);
  box-shadow: 0 1px 3px rgba(95, 76, 50, 0.06);
  backdrop-filter: blur(1px);
}

.tape-one {
  top: -9px;
  left: 38%;
  transform: rotate(-4deg);
}

.tape-two {
  top: -9px;
  right: 28%;
  transform: rotate(3deg);
}

.tape-three {
  top: -7px;
  left: 34%;
  width: 48px;
  height: 16px;
  transform: rotate(2deg);
}

.hero-sticker {
  position: absolute;
  z-index: 6;
  right: -2%;
  bottom: -8%;
  width: clamp(100px, 9vw, 126px);
  filter: drop-shadow(0 16px 18px rgba(77, 52, 28, 0.16));
  animation: float-soft 6s ease-in-out infinite;
  pointer-events: none;
}

.floating-note {
  position: absolute;
  top: 9%;
  right: -5px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 116px;
  padding: 12px 16px 10px;
  border: 1px solid rgba(125, 138, 117, 0.28);
  background: rgba(250, 247, 239, 0.78);
  color: var(--sage);
  font-family: var(--serif);
  transform: rotate(6.5deg);
  box-shadow: var(--shadow-sm);
}

.floating-note span {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.floating-note strong {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.floating-note svg {
  width: 68px;
  margin-top: 2px;
}

.art-caption {
  position: absolute;
  right: 34%;
  bottom: 0;
  color: var(--muted-light);
  font-family: var(--latin);
  font-size: 9px;
  font-style: italic;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
}

.landing-strips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 18px;
  padding: 32px 0 32px;
  border-top: 1px solid var(--line);
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.strip-item > span {
  color: var(--accent);
  font-family: var(--latin);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.strip-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.strip-item p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.strip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.strip-link:hover {
  color: var(--accent-deep);
  border-color: var(--accent);
}

/* ============================================================
   Album list page
   ============================================================ */

.page {
  width: min(100%, 1380px);
  margin: 0 auto;
  padding: 52px 48px 80px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 44px;
}

.page-heading h1 {
  margin-top: 8px;
  font-size: clamp(48px, 5.8vw, 72px);
  line-height: 1.1;
}

.heading-dot {
  color: var(--accent);
  font-family: var(--serif);
}

.page-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

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

/* Browser storage meter */
.storage-strip {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: -8px 0 36px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.45);
}

.storage-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--accent);
}

.storage-copy {
  min-width: 0;
  flex: 1;
}

.storage-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.storage-line strong {
  color: var(--ink);
  font-family: var(--latin);
  font-size: 16px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.storage-quota {
  color: var(--muted-light);
  font-family: var(--latin);
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.04em;
}

.storage-track {
  overflow: hidden;
  height: 3px;
  margin: 6px 0 5px;
  border-radius: 999px;
  background: var(--paper-deep);
}

.storage-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--accent));
  transition: width 0.55s var(--ease);
}

.storage-track span.is-high {
  background: linear-gradient(90deg, var(--butter), var(--danger));
}

.storage-copy p {
  overflow: hidden;
  color: var(--muted-light);
  font-size: 9px;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-persist {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.03em;
  transition:
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.storage-persist:hover {
  border-color: var(--sage);
  background: rgba(125, 138, 117, 0.07);
  color: var(--sage);
}

.intro-note {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.album-card {
  display: block;
  min-width: 0;
  animation: rise-in 0.65s var(--ease) both;
}

.album-cover {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1.28;
  border-radius: 16px;
  background: var(--paper-deep);
  box-shadow: 0 12px 30px rgba(74, 55, 34, 0.08);
  transition:
    transform 0.55s var(--ease),
    box-shadow 0.55s var(--ease);
}

.album-card:hover .album-cover {
  transform: translateY(-5px) rotate(-0.3deg);
  box-shadow: 0 26px 54px rgba(74, 55, 34, 0.15);
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.album-card:hover .album-cover img {
  transform: scale(1.035);
}

.album-cover.count-1 {
  grid-template-columns: 1fr;
}

.album-cover.count-2 {
  grid-template-columns: 1fr 1fr;
}

.album-cover.count-3 {
  grid-template-columns: 1.22fr 0.78fr;
  grid-template-rows: 1fr 1fr;
}

.album-cover.count-3 img:first-child {
  grid-row: span 2;
}

.album-cover.count-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.album-cover .album-cover-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 253, 246, 0.9) 0%, transparent 40%),
    linear-gradient(145deg, #eadfd1, #d9c4ae 55%, #c9a98d);
  color: rgba(91, 68, 46, 0.64);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.empty-flower {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(91, 68, 46, 0.2);
  border-radius: 50%;
}

.album-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 22, 16, 0.12) 0%, transparent 26%, transparent 66%, rgba(28, 22, 16, 0.28) 100%);
  pointer-events: none;
}

.album-cover-top {
  position: absolute;
  top: 13px;
  right: 13px;
  left: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.album-count,
.album-demo {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 999px;
  background: rgba(35, 28, 20, 0.24);
  color: rgba(255, 253, 248, 0.9);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.album-demo {
  border-color: rgba(255, 253, 248, 0.3);
  background: rgba(185, 103, 69, 0.5);
}

.album-card-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 3px 0;
}

.album-card-copy h3 {
  font-size: 23px;
  line-height: 1.3;
  transition: color 0.25s var(--ease);
}

.album-card:hover .album-card-copy h3 {
  color: var(--accent-deep);
}

.album-card-copy p {
  margin-top: 4px;
  overflow: hidden;
  max-width: 320px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-arrow {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transform: rotate(0deg);
  transition:
    transform 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.album-card:hover .album-arrow {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
  transform: rotate(45deg);
}

.album-add-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 1.28;
  border: 1px dashed rgba(91, 72, 52, 0.26);
  border-radius: 16px;
  color: var(--muted);
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease);
}

.album-add-card:hover {
  border-color: var(--accent);
  background: rgba(255, 253, 248, 0.45);
  color: var(--accent-deep);
}

.album-add-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 8px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

.album-add-card:hover .album-add-icon {
  background: var(--accent);
  color: var(--white);
  transform: rotate(90deg);
}

.album-add-card strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.album-add-card p {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

/* Recent strip */
.recent-strip {
  margin-top: 76px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-top: 4px;
  font-size: 30px;
}

.section-note {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.recent-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.recent-thumb {
  position: relative;
  width: 148px;
  flex: 0 0 auto;
  overflow: hidden;
  aspect-ratio: 0.78;
  border-radius: 9px;
  background: var(--paper-deep);
}

.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

.recent-thumb:hover img {
  filter: brightness(0.86);
  transform: scale(1.04);
}

.recent-thumb span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  color: rgba(255, 253, 248, 0.92);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   Album detail
   ============================================================ */

.album-page-shell {
  background:
    radial-gradient(ellipse at 88% 10%, color-mix(in srgb, var(--album-accent) 10%, transparent) 0%, transparent 38%),
    transparent;
}

.album-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(38px, 5.5vw, 88px);
  padding: 26px 0 74px;
}

.album-hero-art {
  position: relative;
  animation: rise-in 0.8s var(--ease) both;
}

.hero-cover {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1.2;
  max-height: 460px;
  border-radius: 4px 28px 4px 28px;
  background: var(--paper-deep);
  box-shadow: var(--shadow-md);
}

.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cover.count-1 {
  grid-template-columns: 1fr;
}

.hero-cover.count-2 {
  grid-template-columns: 1fr 1fr;
}

.hero-cover.count-3 {
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 1fr 1fr;
}

.hero-cover.count-3 img:first-child {
  grid-row: span 2;
}

.hero-cover.count-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: inherit;
  pointer-events: none;
}

.hero-cover-empty {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(145deg, #e6d9ca, #ceb69f);
  color: rgba(92, 70, 48, 0.58);
  font-family: var(--serif);
  letter-spacing: 0.08em;
}

.hero-cover-no {
  position: absolute;
  right: 16px;
  bottom: 8px;
  color: rgba(255, 253, 248, 0.92);
  font-family: var(--latin);
  font-size: 42px;
  font-style: italic;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.hero-cover-caption {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  font-family: var(--latin);
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.18em;
  text-align: right;
}

.album-hero-copy {
  animation: rise-in 0.85s 0.08s var(--ease) both;
}

.album-hero-copy h1 {
  margin: 10px 0 12px;
  font-size: clamp(52px, 6vw, 82px);
  line-height: 1.13;
}

.album-subtitle {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(15px, 1.4vw, 19px);
  letter-spacing: 0.08em;
}

.album-description {
  max-width: 520px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  line-height: 2;
}

.album-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.album-stats strong {
  margin-right: 4px;
  color: var(--ink);
  font-family: var(--latin);
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
}

.album-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.album-actions .btn {
  min-height: 42px;
  padding: 0 19px;
  font-size: 12px;
}

.album-actions .danger-ghost {
  margin-left: 2px;
}

/* Gallery toolbar */
.gallery-section {
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.album-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 12px 0 20px;
}

.group-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px 11px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: color 0.25s var(--ease);
}

.group-tab::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 3px;
  left: 13px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}

.group-tab:hover {
  color: var(--ink-soft);
}

.group-tab.is-active {
  color: var(--ink);
}

.group-tab.is-active::after {
  transform: scaleX(1);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 234px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.45);
  color: var(--muted);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.search-field:focus-within {
  border-color: rgba(185, 103, 69, 0.4);
  background: var(--card);
}

.search-field input {
  width: 100%;
  min-width: 0;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.search-field input::placeholder {
  color: var(--muted-light);
}

.toolbar-upload {
  border-color: var(--line);
  width: 38px;
  height: 38px;
}

/* Masonry */
.masonry {
  column-count: 3;
  column-gap: 26px;
}

.photo-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 34px;
  break-inside: avoid;
  cursor: pointer;
  animation: rise-in 0.55s var(--ease) both;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 10px;
  background: var(--paper-deep);
  box-shadow: 0 8px 22px rgba(74, 55, 34, 0.07);
  transition:
    box-shadow 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.photo-card:hover .photo-frame {
  box-shadow: 0 20px 46px rgba(74, 55, 34, 0.16);
  transform: translateY(-3px);
}

.photo-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s var(--ease);
}

.photo-card:hover .photo-frame > img {
  transform: scale(1.025);
}

.photo-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(30, 24, 18, 0.28) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.photo-card:hover .photo-glow {
  opacity: 1;
}

.photo-edit-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 253, 248, 0.32);
  border-radius: 999px;
  background: rgba(39, 31, 23, 0.48);
  color: #fffaf2;
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(5px);
  backdrop-filter: blur(10px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease),
    background 0.3s var(--ease);
}

.photo-card:hover .photo-edit-hint {
  opacity: 1;
  transform: translateY(0);
}

.photo-edit-hint:hover {
  background: var(--accent-deep);
}

.photo-edited {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--accent-deep);
  font-size: 9px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.photo-copy {
  padding: 13px 2px 0;
}

.photo-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.photo-meta time {
  font-family: var(--latin);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.12em;
}

.photo-meta .pin {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  max-width: 150px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-description {
  margin-top: 7px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.75;
  transition: color 0.25s var(--ease);
}

.photo-card:hover .photo-description {
  color: var(--ink);
}

.photo-description.is-placeholder {
  color: var(--muted-light);
  font-family: var(--sans);
  font-size: 11px;
}

.photo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.photo-tags span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

/* Grouped photos */
.photo-group {
  margin-bottom: 58px;
}

.group-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}

.group-kicker {
  color: var(--accent);
  font-family: var(--latin);
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.group-heading h2 {
  font-size: 30px;
  line-height: 1.2;
}

.group-count {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.group-rule {
  height: 1px;
  flex: 1;
  margin-left: 8px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* Empty states */
.empty-album {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 80px;
  text-align: center;
}

.empty-album-art {
  position: relative;
  width: 280px;
  height: 220px;
  margin-bottom: 26px;
}

.empty-frame {
  position: absolute;
  width: 150px;
  height: 190px;
  border: 1px solid rgba(91, 72, 52, 0.18);
  background: rgba(255, 253, 248, 0.42);
  box-shadow: var(--shadow-sm);
}

.frame-a {
  top: 10px;
  left: 38px;
  transform: rotate(-7deg);
}

.frame-b {
  top: 18px;
  right: 34px;
  transform: rotate(6deg);
}

.empty-sticker {
  position: absolute;
  right: 14px;
  bottom: 0;
  width: 120px;
  filter: drop-shadow(0 12px 14px rgba(70, 48, 28, 0.14));
  animation: float-soft 5.5s ease-in-out infinite;
}

.empty-spark {
  position: absolute;
  color: var(--accent);
  opacity: 0.55;
}

.empty-spark.s1 {
  top: 30px;
  left: 8px;
}

.empty-spark.s2 {
  top: 70px;
  right: 0;
}

.empty-album h3 {
  margin-top: 8px;
  font-size: 34px;
}

.empty-album > p:not(.eyebrow) {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
}

.empty-album .btn {
  margin-top: 24px;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 76px 20px;
  color: var(--muted);
  text-align: center;
}

.search-empty > span {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
}

.search-empty h3 {
  color: var(--ink);
  font-size: 27px;
}

.search-empty p {
  margin: 8px 0 20px;
  font-size: 11.5px;
}

/* ============================================================
   Modals & forms
   ============================================================ */

#modal-root {
  position: relative;
  z-index: 1000;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(34, 28, 21, 0.46);
  opacity: 0;
  backdrop-filter: blur(9px) saturate(0.9);
  transition: opacity 0.28s var(--ease);
}

.modal {
  position: relative;
  z-index: 1;
  overflow: auto;
  width: min(100%, 620px);
  max-height: calc(100dvh - 48px);
  border: 1px solid rgba(255, 253, 248, 0.56);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(224, 205, 184, 0.28) 0%, transparent 38%),
    var(--paper-soft);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease);
}

.modal-layer.is-open .modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-layer.is-closing .modal {
  opacity: 0;
  transform: translateY(10px) scale(0.99);
}

.modal-layer.is-closing .modal-scrim {
  opacity: 0;
}

.modal-layer.is-open .modal-scrim {
  opacity: 1;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-head h2 {
  margin-top: 5px;
  font-size: 34px;
  line-height: 1.3;
}

.form-intro {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.9;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  color: var(--ink-soft);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.field > span em {
  margin-left: 4px;
  color: var(--accent);
  font-size: 9px;
  font-style: normal;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.66);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-light);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(185, 103, 69, 0.48);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(185, 103, 69, 0.08);
  outline: 0;
}

.field textarea {
  min-height: 94px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Album form */
.album-form {
  padding: 34px;
}

.album-form .field {
  margin-top: 20px;
}

.accent-swatches {
  display: flex;
  gap: 12px;
  margin-top: 2px;
}

.accent-swatch {
  position: relative;
  cursor: pointer;
}

.accent-swatch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.accent-swatch span {
  display: block;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 253, 248, 0.6);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.accent-swatch:hover span {
  transform: scale(1.08);
}

.accent-swatch input:checked + span {
  box-shadow: 0 0 0 2px var(--paper-soft), 0 0 0 3px var(--swatch);
}

/* Photo detail */
.photo-detail-modal {
  width: min(100%, 1120px);
  overflow: hidden;
  padding: 0;
}

.photo-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-height: min(74vh, 760px);
}

.detail-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 420px;
  padding: 30px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 45%),
    #28251f;
}

.detail-visual img {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.detail-visual-caption {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 252, 246, 0.62);
  font-family: var(--latin);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.14em;
}

.detail-edited {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f0c9a5;
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: 0.05em;
}

.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 50%;
  background: rgba(34, 28, 21, 0.32);
  color: #fffaf2;
  backdrop-filter: blur(8px);
  transition: background 0.25s var(--ease);
}

.detail-close:hover {
  background: rgba(34, 28, 21, 0.6);
}

.detail-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: min(74vh, 760px);
  overflow-y: auto;
  padding: 36px 34px 30px;
}

.detail-head h2 {
  margin-top: 5px;
  font-size: 38px;
}

.detail-head > p:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-actions-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-actions .btn {
  min-height: 40px;
  padding: 0 17px;
  font-size: 11.5px;
}

.detail-footnote {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-light);
  font-size: 9.5px;
}

/* Organizer */
.organizer-modal {
  width: min(100%, 760px);
}

.organizer {
  padding: 32px;
}

.organizer-common {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.organizer-list {
  max-height: 40vh;
  margin-top: 20px;
  overflow-y: auto;
  padding-right: 5px;
}

.organizer-row {
  display: flex;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.organizer-row:first-child {
  border-top: 0;
}

.organizer-row > img {
  width: 58px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: cover;
}

.organizer-row-main {
  flex: 1;
  min-width: 0;
}

.organizer-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.organizer-row-top time {
  font-family: var(--latin);
  font-size: 10.5px;
  font-style: italic;
  letter-spacing: 0.1em;
}

.organizer-row textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.55);
  font-size: 12px;
  line-height: 1.6;
}

.organizer-row textarea:focus {
  border-color: rgba(185, 103, 69, 0.4);
  background: var(--card);
  outline: 0;
}

/* Confirm */
.confirm-modal {
  width: min(100%, 420px);
}

.confirm-dialog {
  padding: 30px;
  text-align: center;
}

.confirm-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: rgba(185, 103, 69, 0.1);
  color: var(--accent);
}

.confirm-icon.is-danger {
  background: rgba(165, 69, 56, 0.1);
  color: var(--danger);
}

.confirm-dialog h2 {
  font-size: 27px;
}

.confirm-dialog p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.9;
}

.confirm-dialog .modal-actions {
  justify-content: center;
  margin-top: 24px;
}

/* Upload overlay */
.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(34, 28, 21, 0.48);
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: opacity 0.25s var(--ease);
}

.upload-overlay.is-visible {
  opacity: 1;
}

.upload-card {
  width: min(100%, 360px);
  padding: 38px 34px 30px;
  border-radius: 20px;
  background: var(--paper-soft);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.upload-orbit {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: spin 8s linear infinite;
}

.upload-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.upload-orbit span:nth-child(1) {
  top: -5px;
  left: 27px;
}

.upload-orbit span:nth-child(2) {
  right: 2px;
  bottom: 9px;
  background: var(--sage);
}

.upload-orbit span:nth-child(3) {
  bottom: 7px;
  left: 4px;
  background: var(--butter);
}

.upload-card h3 {
  margin-top: 7px;
  font-size: 28px;
}

.upload-count {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--latin);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.1em;
}

.upload-progress {
  overflow: hidden;
  height: 3px;
  margin: 18px 0;
  border-radius: 999px;
  background: var(--paper-deep);
}

.upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--accent));
  transition: width 0.3s var(--ease);
}

.upload-card small {
  color: var(--muted-light);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

/* Toasts */
.toast-root {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 11px 12px 11px 14px;
  border: 1px solid rgba(255, 253, 248, 0.28);
  border-radius: 11px;
  background: rgba(43, 36, 28, 0.92);
  color: #fffaf2;
  box-shadow: 0 14px 38px rgba(30, 24, 18, 0.22);
  opacity: 0;
  transform: translateY(10px);
  backdrop-filter: blur(12px);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.1);
  color: #f5c79e;
}

.toast-success .toast-icon {
  color: #b9d8af;
}

.toast-error .toast-icon {
  color: #f0a89d;
}

.toast-sparkle .toast-icon {
  color: #f3cb83;
}

.toast-text {
  font-size: 11.5px;
  line-height: 1.5;
}

.toast-action {
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(255, 253, 248, 0.12);
  color: #f5c79e;
  font-size: 10.5px;
  white-space: nowrap;
}

.toast-action:hover {
  background: rgba(255, 253, 248, 0.2);
}

.toast-close {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: rgba(255, 253, 248, 0.4);
}

.toast-close:hover {
  color: #fffaf2;
}

/* Boot & fatal */
.boot-screen,
.fatal-screen {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
  text-align: center;
}

.boot-mark,
.fatal-mark {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: 0.24em;
}

.boot-line {
  width: 64px;
  height: 1px;
  background: var(--line-strong);
  animation: breathe 1.8s ease-in-out infinite;
}

.boot-text,
.fatal-hint {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.fatal-screen h1 {
  font-size: 40px;
}

.fatal-screen p {
  color: var(--muted);
  font-size: 12px;
}

/* ============================================================
   Editor
   ============================================================ */

.editor-layer {
  padding: 0;
}

.editor-layer .modal-scrim {
  display: none;
}

.editor-modal {
  width: 100vw;
  height: 100dvh;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--paper-soft);
  opacity: 1;
  transform: none;
  box-shadow: none;
}

.modal-layer.is-open .editor-modal {
  opacity: 1;
  transform: none;
}

.editor-shell {
  display: flex;
  height: 100%;
  flex-direction: column;
  background: var(--paper-soft);
}

.editor-topbar {
  position: relative;
  z-index: 4;
  display: flex;
  height: 66px;
  flex: 0 0 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(249, 246, 239, 0.92);
  backdrop-filter: blur(14px);
}

.editor-title-group {
  display: flex;
  align-items: center;
  gap: 13px;
}

.editor-back {
  border-color: var(--line);
}

.editor-title-copy .eyebrow {
  font-size: 8px;
  letter-spacing: 0.18em;
}

.editor-title-copy h2 {
  margin-top: 1px;
  font-size: 21px;
  line-height: 1.1;
}

.editor-top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.editor-top-actions .btn {
  min-height: 38px;
  padding: 0 17px;
  font-size: 11.5px;
}

.editor-dirty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.editor-dirty.is-visible {
  opacity: 1;
}

.editor-dirty i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.mobile-only {
  display: none;
}

.editor-body {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: 292px minmax(0, 1fr) 318px;
}

.editor-panel {
  min-width: 0;
  overflow: hidden;
  background: rgba(251, 248, 242, 0.86);
}

.tools-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.tool-tabs {
  display: flex;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.38);
}

.tool-tab {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px 4px 14px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  transition: color 0.25s var(--ease);
}

.tool-tab::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}

.tool-tab.is-active {
  color: var(--ink);
}

.tool-tab.is-active::after {
  transform: scaleX(1);
}

.tool-content {
  flex: 1;
  overflow-y: auto;
  padding: 22px 20px 30px;
}

.tool-heading h3 {
  font-size: 25px;
  line-height: 1.25;
}

.tool-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.8;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

/* My stickers */
.my-stickers {
  margin-top: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.my-stickers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.my-stickers-head em {
  margin-left: 3px;
  color: var(--accent);
  font-family: var(--latin);
  font-size: 12px;
  font-style: italic;
}

.mini-upload {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8.5px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.mini-upload:hover {
  border-color: var(--accent);
  background: rgba(185, 103, 69, 0.05);
  color: var(--accent-deep);
}

.user-sticker-grid {
  margin-top: 10px;
}

.user-sticker-cell {
  position: relative;
  min-width: 0;
}

.user-sticker-cell .sticker-item {
  width: 100%;
}

.user-sticker-remove {
  position: absolute;
  top: -3px;
  right: -3px;
  z-index: 2;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(255, 253, 248, 0.8);
  border-radius: 50%;
  background: rgba(46, 43, 38, 0.78);
  color: #fffaf2;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.user-sticker-cell:hover .user-sticker-remove {
  opacity: 1;
  transform: scale(1);
}

.user-upload-empty {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  text-align: left;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.user-upload-empty:hover {
  border-color: var(--accent);
  background: rgba(185, 103, 69, 0.045);
  color: var(--accent-deep);
}

.upload-ring {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--accent);
}

.user-upload-empty > span:last-child {
  display: flex;
  flex-direction: column;
}

.user-upload-empty strong {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.user-upload-empty small {
  color: var(--muted-light);
  font-size: 8px;
  line-height: 1.5;
}

.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.catalog-heading small {
  color: var(--muted-light);
  font-family: var(--latin);
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.sticker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 3px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.sticker-item:hover {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.8);
  transform: translateY(-2px);
}

.sticker-item-art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 7px;
  background:
    linear-gradient(45deg, rgba(226, 218, 205, 0.45) 25%, transparent 25%, transparent 75%, rgba(226, 218, 205, 0.45) 75%),
    linear-gradient(45deg, rgba(226, 218, 205, 0.45) 25%, transparent 25%, transparent 75%, rgba(226, 218, 205, 0.45) 75%);
  background-position: 0 0, 6px 6px;
  background-size: 12px 12px;
}

.sticker-item-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sticker-item-name {
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.sticker-item:hover .sticker-item-name {
  color: var(--ink-soft);
}

.custom-sticker-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.custom-sticker-btn:hover {
  border-color: var(--accent);
  background: rgba(185, 103, 69, 0.04);
  color: var(--accent-deep);
}

.tool-tip {
  display: flex;
  gap: 9px;
  margin-top: 20px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.45);
}

.tool-tip.warm {
  border-color: rgba(185, 103, 69, 0.18);
  background: rgba(185, 103, 69, 0.045);
}

.tip-number {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--accent-deep);
  font-family: var(--latin);
  font-size: 10px;
  font-style: italic;
}

.tool-tip p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.75;
}

/* Mask tool */
.auto-mask-btn {
  margin-top: 18px;
  flex-wrap: wrap;
  height: auto;
  min-height: 48px;
  padding: 8px 14px;
}

.auto-mask-btn small {
  display: block;
  width: 100%;
  color: rgba(244, 239, 230, 0.55);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 17px 0;
  color: var(--muted-light);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.or-divider::before,
.or-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.4);
}

.segmented-control button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 10px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.segmented-control button.is-active {
  background: var(--ink);
  color: var(--paper-soft);
}

.range-field {
  display: block;
  margin-top: 16px;
}

.range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.range-field output {
  color: var(--ink-soft);
  font-family: var(--latin);
  font-size: 11px;
  font-style: italic;
}

.range-field input[type="range"] {
  width: 100%;
  height: 16px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: var(--paper-deep);
}

.range-field input[type="range"]::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -5.5px;
  appearance: none;
  border: 2px solid var(--paper-soft);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(70, 45, 25, 0.24);
}

.switch-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.switch-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-field i {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: var(--paper-deep);
  transition: background 0.2s var(--ease);
}

.switch-field i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted-light);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.switch-field input:checked + i {
  background: rgba(185, 103, 69, 0.22);
}

.switch-field input:checked + i::after {
  background: var(--accent);
  transform: translateX(12px);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  padding: 3px 0;
  color: var(--muted);
  font-size: 9.5px;
  border-bottom: 1px solid transparent;
}

.text-button:hover {
  color: var(--danger);
  border-color: rgba(165, 69, 56, 0.3);
}

.mask-legend {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.6;
}

.legend-swatch {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
  border: 1px solid rgba(185, 103, 69, 0.3);
  border-radius: 3px;
  background: rgba(185, 103, 69, 0.2);
}

/* Filter tool */
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.filter-item {
  padding: 5px 5px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 9.5px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.filter-item:hover {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.6);
}

.filter-item.is-active {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.filter-preview {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.2;
  margin-bottom: 5px;
  border-radius: 5px;
  background: var(--paper-deep);
}

.filter-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stage */
.editor-stage-wrap {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 253, 248, 0.52) 0%, transparent 54%),
    #e8e1d6;
}

.stage-topline {
  display: flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: rgba(74, 62, 48, 0.58);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.stage-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stage-size {
  font-family: var(--latin);
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.1em;
}

.canvas-shell {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 8px 30px 18px;
}

#editor-canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  background: #2b2822;
  box-shadow:
    0 26px 60px rgba(58, 43, 27, 0.23),
    0 2px 8px rgba(58, 43, 27, 0.1);
  touch-action: none;
  user-select: none;
}

.editor-processing {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: rgba(237, 230, 219, 0.78);
  opacity: 0;
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}

.editor-processing.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.editor-processing p {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.orbit-loader {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(91, 72, 52, 0.2);
  border-radius: 50%;
  animation: spin 2.4s linear infinite;
}

.orbit-loader i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.orbit-loader i:nth-child(1) {
  top: -4px;
  left: 18px;
}

.orbit-loader i:nth-child(2) {
  right: 0;
  bottom: 8px;
  background: var(--sage);
}

.orbit-loader i:nth-child(3) {
  bottom: 6px;
  left: 3px;
  background: var(--butter);
}

.stage-warning {
  position: absolute;
  right: 38px;
  bottom: 26px;
  left: 38px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(185, 103, 69, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 238, 0.92);
  color: var(--accent-deep);
  font-size: 10px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.stage-warning button {
  color: var(--accent-deep);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stage-footer {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: rgba(74, 62, 48, 0.48);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.stage-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Layers */
.layers-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.layers-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.layers-heading .eyebrow {
  font-size: 8px;
}

.layers-heading h3 {
  margin-top: 1px;
  font-size: 23px;
  line-height: 1.2;
}

.layers-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 28px;
}

.layer-section {
  margin-bottom: 15px;
}

.layer-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px 7px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.layer-section-head small {
  color: var(--muted-light);
  font-size: 9px;
}

.layer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  padding: 5px 5px 5px 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.35);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.layer-row:hover {
  background: rgba(255, 253, 248, 0.7);
}

.layer-row.is-selected {
  border-color: rgba(185, 103, 69, 0.34);
  background: rgba(185, 103, 69, 0.06);
}

.layer-eye {
  display: grid;
  width: 22px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
}

.layer-eye.is-off {
  color: var(--muted-light);
}

.layer-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.layer-main img {
  width: 27px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(65, 46, 28, 0.12));
}

.layer-main span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.layer-main strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-main small {
  color: var(--muted-light);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.layer-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.layer-row:hover .layer-row-actions,
.layer-row.is-selected .layer-row-actions {
  opacity: 1;
}

.layer-row-actions button {
  display: grid;
  width: 19px;
  height: 24px;
  place-items: center;
  border-radius: 4px;
  color: var(--muted);
}

.layer-row-actions button:hover {
  background: rgba(46, 43, 38, 0.07);
  color: var(--ink);
}

.layer-empty {
  padding: 12px 10px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted-light);
  font-size: 9.5px;
  line-height: 1.6;
  text-align: center;
}

.foreground-layer {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 8px;
  border: 1px dashed rgba(46, 43, 38, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.28);
  text-align: left;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.foreground-layer:hover {
  border-color: var(--accent);
  background: rgba(185, 103, 69, 0.05);
}

.foreground-layer.is-ready {
  border-style: solid;
  border-color: rgba(125, 138, 117, 0.36);
  background: rgba(125, 138, 117, 0.08);
}

.foreground-art {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: var(--paper-deep);
  color: var(--sage);
}

.foreground-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.foreground-copy strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.foreground-copy small {
  color: var(--muted-light);
  font-size: 8.8px;
  line-height: 1.4;
}

.foreground-state {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.foreground-layer.is-ready .foreground-state {
  color: var(--sage);
}

.behind-section {
  padding-top: 2px;
}

.background-layer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.background-art {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: var(--paper-deep);
}

.background-layer > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.background-layer strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 400;
}

.background-layer small {
  color: var(--muted-light);
  font-size: 9px;
}

.inspector {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.46);
}

.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.inspector-head > div {
  display: flex;
  flex-direction: column;
}

.inspector-head span {
  color: var(--muted-light);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.inspector-head strong {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
}

.inspector-actions button {
  display: inline-flex;
  flex: 1;
  min-width: 60px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.inspector-actions button:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.inspector-actions button.is-on {
  border-color: rgba(185, 103, 69, 0.34);
  background: rgba(185, 103, 69, 0.07);
  color: var(--accent-deep);
}

.inspector-empty {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted-light);
}

.inspector-empty p {
  font-size: 8.5px;
  line-height: 1.65;
}

/* Editor responsive */
@media (max-width: 1240px) {
  .editor-body {
    grid-template-columns: 260px minmax(0, 1fr) 286px;
  }

  .canvas-shell {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (max-width: 980px) {
  .editor-body {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .layers-panel {
    position: fixed;
    top: 66px;
    right: 0;
    bottom: 0;
    z-index: 6;
    width: min(86vw, 340px);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 50px rgba(50, 38, 25, 0.12);
    transform: translateX(108%);
    transition: transform 0.3s var(--ease);
  }

  .layers-panel.is-mobile-open {
    transform: translateX(0);
  }

  .mobile-only {
    display: inline-flex;
  }

  .editor-dirty {
    display: none;
  }
}

@media (max-width: 760px) {
  .editor-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 268px;
  }

  .tools-panel {
    grid-row: 2;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .editor-stage-wrap {
    grid-row: 1;
  }

  .tool-tabs {
    flex: 0 0 44px;
  }

  .tool-tab {
    padding: 10px 4px;
  }

  .tool-content {
    padding: 15px 16px 24px;
  }

  .tool-heading h3 {
    font-size: 21px;
  }

  .sticker-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin-top: 12px;
  }

  .sticker-item {
    padding: 3px 2px;
  }

  .sticker-item-name {
    display: none;
  }

  .user-sticker-remove {
    opacity: 1;
    transform: scale(1);
  }

  .custom-sticker-btn {
    margin-top: 6px;
  }

  .tool-tip {
    display: none;
  }

  .stage-topline {
    flex-basis: 30px;
    padding: 0 12px;
  }

  .canvas-shell {
    padding: 4px 12px 12px;
  }

  .stage-footer {
    flex-basis: 26px;
    padding: 0 12px;
    font-size: 7.5px;
  }

  .stage-footer > span:first-child {
    display: none;
  }

  .editor-topbar {
    height: 58px;
    flex-basis: 58px;
    padding: 0 11px;
  }

  .editor-title-copy .eyebrow {
    display: none;
  }

  .editor-title-copy h2 {
    font-size: 18px;
  }

  .editor-back {
    width: 34px;
    height: 34px;
  }

  .editor-top-actions {
    gap: 5px;
  }

  .editor-top-actions .btn {
    min-height: 34px;
    padding: 0 12px;
    font-size: 10px;
  }

  .editor-reset {
    display: none;
  }

  .layers-panel {
    top: 58px;
  }

  .filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .filter-item {
    padding: 2px;
    font-size: 8px;
  }

  .filter-item span:last-child {
    display: none;
  }

  .filter-preview {
    margin-bottom: 0;
  }

  .range-field {
    margin-top: 10px;
  }

  .mask-legend,
  .or-divider {
    display: none;
  }
}

/* ============================================================
   Responsive pages
   ============================================================ */

@media (max-width: 1180px) {
  .site-nav,
  .landing-main,
  .page,
  .site-footer {
    padding-right: 34px;
    padding-left: 34px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
    gap: 24px;
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero-title {
    font-size: clamp(72px, 10vw, 124px);
  }

  .album-grid {
    gap: 38px 24px;
  }

  .masonry {
    column-gap: 22px;
  }
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 10px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-title {
    font-size: clamp(72px, 15vw, 132px);
  }

  .hero-art {
    width: min(100%, 650px);
    min-height: 570px;
    margin: 0 auto;
  }

  .landing-strips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .strip-link {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 4px;
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-bottom: 50px;
  }

  .album-hero-art {
    max-width: 660px;
  }

  .hero-cover {
    aspect-ratio: 1.45;
  }

  .album-hero-copy {
    max-width: 660px;
  }

  .masonry {
    column-count: 2;
  }

  .photo-detail {
    grid-template-columns: 1fr;
  }

  .photo-detail-modal {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }

  .detail-visual {
    min-height: 320px;
    max-height: 48vh;
  }

  .detail-form {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .site-nav {
    padding: 17px 20px;
  }

  .landing-main,
  .page,
  .site-footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .nav-date {
    display: none;
  }

  .nav-right {
    gap: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 20px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 58px;
  }

  .kicker {
    margin-bottom: 20px;
    font-size: 8px;
    letter-spacing: 0.13em;
  }

  .hero-title {
    font-size: clamp(62px, 20vw, 96px);
    line-height: 0.94;
  }

  .hero-lede {
    margin-top: 25px;
    font-size: 13px;
    line-height: 2;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
    margin-top: 26px;
  }

  .hero-actions .btn {
    min-height: 48px;
  }

  .hero-art {
    min-height: 460px;
    margin-top: 12px;
  }

  .polaroid-one {
    top: 4%;
    left: 0;
    width: min(56vw, 220px);
  }

  .polaroid-two {
    top: 30%;
    right: 0;
    width: min(46vw, 188px);
  }

  .polaroid-three {
    bottom: 0;
    left: 15%;
    width: min(39vw, 154px);
  }

  .polaroid {
    padding: 9px 9px 20px;
  }

  .polaroid figcaption {
    display: none;
  }

  .polaroid figcaption span {
    font-size: 10.5px;
  }

  .polaroid figcaption em {
    font-size: 6.5px;
  }

  .hero-sticker {
    right: -3%;
    bottom: -10%;
    width: 86px;
  }

  .floating-note {
    top: 2%;
    right: 2%;
    width: 92px;
    padding: 9px 11px 7px;
  }

  .floating-note strong {
    font-size: 12px;
  }

  .art-botanical {
    left: -8%;
    width: 120px;
    opacity: 0.7;
  }

  .art-caption {
    display: none;
  }

  .landing-strips {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 0;
  }

  .strip-item {
    gap: 12px;
  }

  .strip-link {
    grid-column: auto;
  }

  .site-footer {
    padding-top: 14px;
    padding-bottom: 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.6;
  }

  .footer-inner p {
    display: none;
  }

  .page {
    padding-top: 34px;
    padding-bottom: 56px;
  }

  .page-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 30px;
  }

  .storage-strip {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    padding: 12px;
  }

  .storage-copy {
    flex: 1 1 calc(100% - 56px);
  }

  .storage-persist {
    width: 100%;
    justify-content: center;
  }

  .page-heading h1 {
    font-size: 48px;
  }

  .page-heading .btn {
    align-self: stretch;
  }

  .album-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .album-add-card {
    min-height: 180px;
    aspect-ratio: auto;
  }

  .album-cover {
    aspect-ratio: 1.38;
  }

  .album-card-copy h3 {
    font-size: 21px;
  }

  .recent-strip {
    margin-top: 48px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .recent-thumb {
    width: 120px;
  }

  .album-hero {
    padding-top: 8px;
  }

  .album-hero-copy h1 {
    font-size: 48px;
  }

  .hero-cover {
    max-height: 300px;
    aspect-ratio: 1.32;
    border-radius: 3px 20px 3px 20px;
  }

  .album-stats {
    gap: 15px;
  }

  .album-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .album-actions .btn {
    width: 100%;
    padding: 0 12px;
  }

  .album-actions .btn.primary {
    grid-column: 1 / -1;
  }

  .album-actions .danger-ghost {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .album-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 12px;
  }

  .group-tabs {
    justify-content: space-between;
    overflow-x: auto;
  }

  .group-tab {
    flex: 0 0 auto;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  .toolbar-right {
    width: 100%;
  }

  .search-field {
    width: auto;
    flex: 1;
  }

  .masonry {
    column-count: 1;
  }

  .photo-card {
    margin-bottom: 28px;
  }

  .photo-edit-hint {
    opacity: 1;
    transform: none;
  }

  .photo-description {
    font-size: 13.5px;
  }

  .photo-group {
    margin-bottom: 42px;
  }

  .group-heading h2 {
    font-size: 25px;
  }

  .empty-album {
    padding: 40px 10px 60px;
  }

  .empty-album-art {
    width: 240px;
    height: 190px;
  }

  .empty-album h3 {
    font-size: 27px;
  }

  .modal-layer {
    padding: 12px;
  }

  .modal {
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }

  .album-form,
  .organizer {
    padding: 24px 20px;
  }

  .modal-head h2 {
    font-size: 27px;
  }

  .field-row,
  .organizer-common {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .photo-detail-modal {
    border-radius: 16px;
  }

  .detail-visual {
    min-height: 270px;
    padding: 16px;
  }

  .detail-form {
    padding: 25px 20px;
  }

  .detail-head h2 {
    font-size: 30px;
  }

  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .detail-actions .text-danger {
    align-self: flex-start;
  }

  .organizer-list {
    max-height: 34vh;
  }

  .organizer-row > img {
    width: 48px;
    height: 60px;
  }

  .upload-card {
    padding: 30px 24px 24px;
  }

  .toast-root {
    right: 12px;
    bottom: 14px;
    left: 12px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }

  .editor-modal {
    border-radius: 0;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: clamp(56px, 19vw, 82px);
  }

  .hero-art {
    min-height: 420px;
  }

  .floating-note {
    display: none;
  }

  .album-actions {
    gap: 8px;
  }

  .photo-detail {
    display: block;
  }
}

/* ============================================================
   Timeline, months, upload setup, AI status
   ============================================================ */

.timeline-section {
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

.timeline-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 38px;
}

.timeline-heading h2 {
  margin-top: 6px;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.2;
}

.timeline-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.year-block {
  margin-bottom: 58px;
}

.year-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}

.year-heading h2 {
  font-family: var(--latin);
  font-size: 52px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.year-heading > span:not(.year-rule) {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.year-rule {
  height: 1px;
  flex: 1;
  margin-left: 8px;
  background: linear-gradient(90deg, var(--line), transparent);
}

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

.month-card {
  display: block;
  min-width: 0;
  animation: rise-in 0.55s var(--ease) both;
}

.month-cover {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1.34;
  border-radius: 12px;
  background: var(--paper-deep);
  box-shadow: 0 10px 26px rgba(74, 55, 34, 0.08);
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.month-card:hover .month-cover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(74, 55, 34, 0.15);
}

.month-cover.count-1 {
  grid-template-columns: 1fr;
}

.month-cover.count-2 {
  grid-template-columns: 1fr 1fr;
}

.month-cover.count-3 {
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 1fr 1fr;
}

.month-cover.count-3 img:first-child {
  grid-row: span 2;
}

.month-cover.count-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.month-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.month-card:hover .month-cover img {
  transform: scale(1.035);
}

.month-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 22, 16, 0.18) 0%, transparent 35%, transparent 65%, rgba(28, 22, 16, 0.32) 100%);
  pointer-events: none;
}

.month-cover-en {
  position: absolute;
  top: 12px;
  left: 13px;
  color: rgba(255, 253, 248, 0.88);
  font-family: var(--latin);
  font-size: 9px;
  font-style: italic;
  letter-spacing: 0.17em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.month-cover-count {
  position: absolute;
  top: 11px;
  right: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(35, 28, 20, 0.3);
  color: rgba(255, 253, 248, 0.92);
  font-size: 9px;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

.month-picked {
  position: absolute;
  bottom: 11px;
  left: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.83);
  color: var(--accent-deep);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.month-card-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px 0;
}

.month-card-copy h3 {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 25px;
  line-height: 1.2;
}

.month-card-copy h3 small {
  color: var(--muted);
  font-family: var(--latin);
  font-size: 13px;
  font-style: italic;
  font-weight: 400;
}

.month-card-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.month-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.month-card:hover .month-arrow {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
  transform: rotate(45deg);
}

/* Month detail */
.month-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
  padding: 18px 0 64px;
}

.month-hero-art {
  position: relative;
}

.month-hero .hero-cover {
  aspect-ratio: 1.3;
  max-height: 440px;
  border-radius: 4px 24px 4px 24px;
}

.cover-edit-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 253, 248, 0.28);
  border-radius: 999px;
  background: rgba(37, 30, 22, 0.44);
  color: #fffaf2;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  backdrop-filter: blur(10px);
  transition: background 0.2s var(--ease);
}

.cover-edit-btn:hover {
  background: rgba(37, 30, 22, 0.68);
}

.month-hero-copy h1 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
  font-size: clamp(54px, 7vw, 86px);
  line-height: 1.1;
}

.month-hero-copy h1 span {
  color: var(--muted);
  font-family: var(--latin);
  font-size: 16px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.month-date-range {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.05em;
}

.month-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.month-stats strong {
  margin-right: 3px;
  color: var(--ink);
  font-family: var(--latin);
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
}

.month-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.month-actions .btn {
  min-height: 40px;
  padding: 0 17px;
  font-size: 11.5px;
}

.event-section {
  padding: 34px 0 14px;
  border-top: 1px solid var(--line);
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-collection {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.35);
}

.event-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px;
  cursor: pointer;
  list-style: none;
}

.event-summary::-webkit-details-marker {
  display: none;
}

.event-cover {
  display: grid;
  overflow: hidden;
  width: 170px;
  height: 96px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--paper-deep);
}

.event-cover.count-2 {
  grid-template-columns: 1fr 1fr;
}

.event-cover.count-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.event-cover.count-3 img:first-child {
  grid-row: span 2;
}

.event-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-summary-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.event-kicker {
  color: var(--accent);
  font-family: var(--latin);
  font-size: 8px;
  font-style: italic;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.event-summary-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-summary-copy small {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.event-chevron {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}

.event-collection[open] .event-chevron {
  transform: rotate(180deg);
}

.event-photos {
  padding: 8px 18px 20px;
  border-top: 1px solid var(--line);
}

.month-daily {
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.month-daily-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.month-daily-head h2 {
  margin-top: 4px;
  font-size: 38px;
}

.month-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.month-toolbar .search-field {
  width: 206px;
}

.month-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 54px 20px 62px;
  color: var(--muted);
  text-align: center;
}

.month-empty > span {
  display: grid;
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
}

.month-empty h3 {
  color: var(--ink);
  font-size: 26px;
}

.month-empty p {
  margin: 6px 0 18px;
  font-size: 10.5px;
}

.photo-type {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(185, 103, 69, 0.88);
  color: #fffaf2;
  font-size: 9px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.detail-event {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--accent);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

/* Upload setup */
.upload-setup-modal {
  width: min(100%, 720px);
}

.upload-setup-form {
  padding: 32px;
}

.upload-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.05em;
}

.upload-section-label span {
  color: var(--accent);
  font-family: var(--latin);
  font-size: 11px;
  font-style: italic;
}

.date-mode-tabs {
  display: flex;
  gap: 6px;
  margin-top: 13px;
}

.date-mode {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.date-mode:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.date-mode.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-soft);
}

.date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.date-reminder {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 9px;
  color: var(--accent-deep);
  font-size: 9.5px;
  line-height: 1.6;
}

.photo-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 13px;
}

.photo-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.42);
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.photo-type-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-type-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(185, 103, 69, 0.06);
}

.type-icon {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--accent);
}

.photo-type-card strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.photo-type-card small {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.event-name-field {
  margin-top: 13px;
}

.upload-reminder {
  display: flex;
  gap: 9px;
  margin-top: 20px;
  padding: 11px 12px;
  border: 1px solid rgba(185, 103, 69, 0.18);
  border-radius: 9px;
  background: rgba(185, 103, 69, 0.045);
}

.upload-reminder p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

/* Month cover picker */
.cover-picker-modal {
  width: min(100%, 860px);
}

.cover-picker-form {
  padding: 30px;
}

.cover-picker-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.cover-picker-count .text-button {
  margin-top: 0;
  padding: 0;
}

.cover-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  max-height: 48vh;
  overflow-y: auto;
  padding: 2px;
}

.cover-pick {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 7px;
  background: var(--paper-deep);
  transition:
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.cover-pick:hover {
  transform: scale(1.015);
}

.cover-pick.is-selected {
  border-color: var(--accent);
}

.cover-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-check {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(255, 253, 248, 0.8);
  border-radius: 50%;
  background: rgba(36, 29, 21, 0.4);
  color: #fffaf2;
  opacity: 0;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
}

.cover-pick.is-selected .cover-check {
  background: var(--accent);
  opacity: 1;
}

/* AI status */
.ai-status {
  position: fixed;
  top: 82px;
  right: 22px;
  z-index: 3900;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 11px;
  background: rgba(43, 36, 28, 0.92);
  color: #fffaf2;
  box-shadow: 0 14px 38px rgba(30, 24, 18, 0.22);
  opacity: 0;
  transform: translateY(-6px);
  backdrop-filter: blur(12px);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.ai-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-status-spinner {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 50%;
  animation: spin 2.4s linear infinite;
}

.ai-status-spinner i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--butter);
}

.ai-status-spinner i:nth-child(1) {
  top: -2px;
  left: 12px;
}

.ai-status-spinner i:nth-child(2) {
  right: 1px;
  bottom: 4px;
  background: var(--sage);
}

.ai-status-spinner i:nth-child(3) {
  bottom: 3px;
  left: 2px;
  background: var(--accent);
}

.ai-status-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.ai-status-copy strong {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.ai-status-copy small {
  overflow: hidden;
  color: rgba(255, 253, 248, 0.58);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .month-hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 42px;
  }

  .month-hero-art {
    max-width: 660px;
  }

  .month-hero-copy {
    max-width: 660px;
  }

  .month-daily-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .month-toolbar {
    justify-content: space-between;
  }

  .cover-picker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .timeline-section {
    padding-top: 28px;
  }

  .timeline-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 28px;
  }

  .timeline-heading .btn {
    align-self: flex-start;
  }

  .year-block {
    margin-bottom: 42px;
  }

  .year-heading h2 {
    font-size: 42px;
  }

  .month-grid {
    gap: 24px 12px;
  }

  .month-cover {
    aspect-ratio: 1.18;
    border-radius: 9px;
  }

  .month-cover-en {
    top: 9px;
    left: 9px;
    font-size: 7px;
  }

  .month-cover-count {
    top: 8px;
    right: 8px;
    font-size: 8px;
  }

  .month-picked {
    bottom: 8px;
    left: 8px;
    font-size: 7.5px;
  }

  .month-card-copy h3 {
    font-size: 21px;
  }

  .month-card-copy h3 small {
    font-size: 11px;
  }

  .month-card-copy p {
    font-size: 8.5px;
  }

  .month-arrow {
    display: none;
  }

  .month-hero {
    padding-top: 4px;
  }

  .month-hero .hero-cover {
    max-height: 300px;
    aspect-ratio: 1.32;
  }

  .month-hero-copy h1 {
    font-size: 52px;
  }

  .month-date-range {
    font-size: 13px;
  }

  .month-stats {
    gap: 12px;
  }

  .month-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .month-actions .btn {
    width: 100%;
  }

  .month-actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .month-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .month-toolbar .search-field {
    width: 100%;
  }

  .event-summary {
    gap: 12px;
    padding: 10px;
  }

  .event-cover {
    width: 112px;
    height: 72px;
  }

  .event-summary-copy strong {
    font-size: 17px;
  }

  .event-chevron {
    width: 30px;
    height: 30px;
  }

  .event-photos {
    padding: 6px 12px 16px;
  }

  .month-daily-head h2 {
    font-size: 30px;
  }

  .upload-setup-form {
    padding: 24px 20px;
  }

  .date-fields,
  .photo-type-grid {
    grid-template-columns: 1fr;
  }

  .cover-picker-form {
    padding: 24px 20px;
  }

  .cover-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 42vh;
  }

  .ai-status {
    top: 68px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .month-cover {
    aspect-ratio: 1.25;
  }

  .month-card-copy h3 {
    font-size: 22px;
  }
}

/* ============================================================
   Motion
   ============================================================ */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1.5deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleX(0.7);
  }
  50% {
    opacity: 0.85;
    transform: scaleX(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.view-enter {
  animation: view-in 0.45s var(--ease) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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












