body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(120% 62% at 50% -12%, rgba(194, 236, 237, 0.62) 0%, rgba(194, 236, 237, 0) 62%),
    radial-gradient(80% 48% at 88% 6%, rgba(239, 234, 231, 0.75) 0%, rgba(239, 234, 231, 0) 60%),
    linear-gradient(180deg, #F4F8F7 0%, var(--paper) 58%, var(--paper) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.06 0 0 0 0 0.08 0 0 0 0 0.18 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

input { font-family: inherit; color: var(--ink); -webkit-user-select: text; user-select: text; }

.rule {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 26px 0;
}
.rule::before, .rule::after {
  content: ""; height: 1px; flex: 1; max-width: 90px;
  background: linear-gradient(90deg, transparent, var(--hair), transparent);
}
.rule span {
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--accent-ink);
  opacity: 0.85;
}

.screen { display: none; }
.screen.active { display: block; animation: rise 0.6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(38px, 7vw, 84px) clamp(20px, 5vw, 40px) 72px;
}

.hero { text-align: center; }
.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(52px, 13vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 18px 0 0;
}
.hero h1 em { font-style: italic; color: var(--accent-ink); font-size: 0.72em; padding: 0 0.06em; }
.hero .kicker {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 4.4vw, 27px);
  color: var(--ink-soft);
  margin-top: 10px;
}
.hero .lead {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto;
  font-size: 15.5px;
}

.card {
  background: var(--glass-firm);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: 26px;
  box-shadow: var(--shadow-md), var(--lip);
  padding: clamp(26px, 5vw, 40px);
  margin-top: 38px;
}

.field { display: block; }
.label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-soft);
  display: block; margin-bottom: 12px;
}
.field input[type=text] {
  width: 100%;
  padding: 17px 20px;
  border: 1px solid var(--glass-edge);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 17px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field input[type=text]:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(62, 142, 150, 0.20);
}

.btn { width: 100%; }

.msg {
  font-size: 13px; font-weight: 500;
  color: var(--error);
  min-height: 20px;
  margin-top: 14px;
  opacity: 0; transition: opacity 0.3s;
}
.msg.show { opacity: 1; }

.code-inputs {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: clamp(4px, 1.4vw, 10px);
  margin-top: 14px;
}
.code-inputs input {
  width: 100%; aspect-ratio: 3 / 4;

  border: 1px solid var(--hair);
  box-shadow: var(--lip);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  text-align: center;
  font-size: clamp(19px, 5vw, 30px);
  font-weight: 500;
  outline: none;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.code-inputs input:focus { border-color: var(--accent); background: rgba(255, 255, 255, 0.92); transform: translateY(-2px); }
.code-inputs input.filled { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#codeArea[hidden] { display: none; }

.room-head { text-align: center; }
.room-head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300; font-style: italic;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1.05;
  margin: 14px 0 0;
}
.room-head .sub { color: var(--ink-soft); font-size: 15px; max-width: 42ch; margin: 12px auto 0; }

.drop {
  display: block;
  margin-top: 32px;
  padding: clamp(34px, 7vw, 58px) 24px;
  text-align: center;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1.5px dashed rgba(38, 102, 109, 0.34);
  border-radius: 26px;
  box-shadow: var(--shadow-sm), var(--lip);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.drop:hover, .drop.over { background: rgba(255, 255, 255, 0.78); border-color: var(--accent); transform: translateY(-2px); }

@media (hover: none) and (pointer: coarse) {
  .drop { display: none; }
}
.drop .bloom {
  width: 62px; height: 62px; margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(62, 142, 150, 0.45), rgba(38, 102, 109, 0.28));
  display: grid; place-items: center;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.drop h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(22px, 4.6vw, 30px);
  margin: 0 0 6px;
}
.drop .hint { font-size: 13.5px; color: var(--ink-muted); max-width: 40ch; margin: 0 auto; }

.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pick .btn { font-size: 11px; letter-spacing: 0.16em; padding: 15px 14px; min-height: 54px; }
@media (max-width: 420px) { .pick { grid-template-columns: 1fr; } }

.tally {
  display: flex; justify-content: center; gap: 34px;
  margin-top: 30px;
  text-align: center;
}
.tally div { min-width: 84px; }
.tally .n {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px; font-weight: 400; line-height: 1;
  display: block;
}
.tally .k {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600;
  margin-top: 6px; display: block;
}

.sent { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 13px; align-items: center;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--glass-edge);
  border-radius: 16px;
  box-shadow: var(--lip);
  transition: border-color 0.25s, background 0.25s;
}
.item .thumb {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(20, 23, 27, 0.06);
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ink-muted);
  overflow: hidden;
}
.item .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .meta { min-width: 0; }
.item .nm {
  font-size: 13.5px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item .st { font-size: 11px; color: var(--ink-muted); letter-spacing: 0.04em; margin-top: 2px; }
.item .track {
  position: relative; height: 4px; border-radius: 100px;
  background: rgba(20, 23, 27, 0.08);
  margin-top: 7px; overflow: hidden;
}
.item .track i {
  position: absolute; inset: 0; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-ink));
  transition: width 0.25s var(--ease);
}
.item .mark {
  width: 24px; height: 24px; border-radius: 50%;
  display: none; place-items: center;
  font-size: 12px; font-weight: 700;
  background: var(--success); color: var(--paper);
}
.item.done { border-color: rgba(95, 122, 82, 0.4); }
.item.done .mark { display: grid; }
.item.done .track { display: none; }
.item.failed { border-color: rgba(167, 80, 63, 0.45); }
.item.failed .st { color: var(--error); }
.item.failed .track { display: none; }
.item .retry {
  display: none;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  padding: 9px 14px; border-radius: 100px;
  border: 1px solid var(--hair); color: var(--ink);
  min-height: 40px;
}
.item.failed .retry { display: inline-flex; align-items: center; }

.wall { margin-top: 30px; }
.wall[hidden] { display: none; }
.wall-head { text-align: center; margin-bottom: 14px; }
.wall-head .eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.wall-head .eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-ink);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.wall-strip {
  position: relative;
  overflow: hidden;
  padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.wall-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: drift 44s linear infinite;
}
@media (hover: hover) {
  .wall-strip:hover .wall-track { animation-play-state: paused; }
}

.wall-strip.still {
  -webkit-mask-image: none; mask-image: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wall-strip.still::-webkit-scrollbar { display: none; }
.wall-track.still {
  animation: none;
  width: 100%;
  justify-content: center;
  min-width: min-content;
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.wall-item {
  position: relative;
  width: 116px; height: 116px;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #EDE6D8;
  box-shadow: var(--shadow-sm), var(--lip);
  border: 1px solid var(--glass-edge);
}
.wall-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.wall-item .who {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 7px 6px;
  font-size: 9.5px; letter-spacing: 0.10em; text-transform: uppercase; font-weight: 600;
  color: #fff;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(180deg, transparent, rgba(20, 23, 27, 0.62));
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
@media (max-width: 480px) {
  .wall-item { width: 96px; height: 96px; border-radius: 15px; }
}

.share {
  display: flex; align-items: flex-start; gap: 13px;
  margin-top: 16px;
  padding: 15px 18px;
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--lip);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.share:hover { background: rgba(255, 255, 255, 0.74); }
.share input { position: absolute; opacity: 0; pointer-events: none; }
.share .box {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 8px;
  border: 1.5px solid rgba(20, 23, 27, 0.24);
  background: rgba(255, 255, 255, 0.8);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; line-height: 1;
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
  margin-top: 1px;
}
.share input:checked + .box {
  background: var(--success); border-color: var(--success); color: #fff;
}
.share input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(98, 115, 90, 0.25); }
.share .txt { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.share .txt b { color: var(--ink); font-weight: 600; display: block; font-size: 14px; margin-bottom: 2px; }

.conf {
  position: fixed;
  pointer-events: none;
  z-index: 95;
  will-change: transform, opacity;
  top: 0; left: 0;
}
.conf.petal  { width: 10px; height: 10px; border-radius: 60% 40% 55% 45%; }
.conf.dot    { width: 7px;  height: 7px;  border-radius: 50%; }
.conf.strip  { width: 5px;  height: 13px; border-radius: 2px; }

.toast {
  position: fixed; left: 50%; bottom: clamp(16px, 4vw, 30px);
  transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 11px;
  padding: 13px 22px;
  border-radius: 100px;
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 100;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .screen.active { animation: none; }
  .drop, .item .track i, .toast { transition: none; }
  .wall-head .eyebrow::before { animation: none; opacity: 0.8; }
  .wall-track { animation: none; }
  .wall-strip { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .conf { display: none; }
}
