@font-face {
  font-family: "JianMian Serif";
  src: url("./fonts/JianMianSerif.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Zhaomian Display";
  src: url("./fonts/ZhaomianDisplay.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #e4dece;
  --paper-deep: #d8d2c2;
  --ink: #2a2926;
  --ink-soft: #4a4741;
  --mute: #6d6860;
  --line: #c4bdae;
  --cinnabar: #b04a32;
  --cinnabar-ink: #f4efe6;
  --shadow: none;
  --r2: 4px;
  --r3: 10px;
  --r4: 18px;
  --space: 18px;
  --font-serif: "JianMian Serif", "Songti SC", "STSong", "Noto Serif SC", serif;
  --font-display: "Zhaomian Display", "Kaiti SC", "STKaiti", "KaiTi", var(--font-serif);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); }
button, input, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
img { max-width: 100%; display: block; }

.font-warm {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  font-family: var(--font-serif);
  font-weight: 600;
}
.skip {
  position: absolute;
  left: 12px;
  top: 8px;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { transform: none; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

main {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 28px) 22px calc(env(safe-area-inset-bottom) + 28px);
}

.screen { animation: rise 420ms cubic-bezier(0.16, 1, 0.3, 1); }
.screen[hidden] { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.22;
  text-wrap: balance;
}

.lede, .who {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.mast { margin-bottom: 34px; }

.studio-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.studio-top .who {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  line-height: 1.25;
}

.stack { display: flex; flex-direction: column; gap: 16px; }
.meet { margin-top: 18px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field span {
  color: var(--mute);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.field input, .field textarea, .extra-row input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 10px 0 11px;
  outline: none;
}
.field textarea { resize: none; line-height: 1.5; }
.field input:focus, .field textarea:focus, .extra-row input:focus {
  border-bottom-color: var(--cinnabar);
}
.err {
  color: var(--cinnabar);
  font-style: normal;
  font-size: 12px;
}

.extras {
  border: 0;
  margin: 8px 0 4px;
  padding: 0;
}
.extras legend {
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mute);
}
.extras legend i {
  font-style: normal;
  margin-left: 8px;
  color: oklch(0.62 0.02 70);
}
.hint {
  margin: 8px 0 12px;
  color: var(--mute);
  font-size: 13px;
}
.extra-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  margin-bottom: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 2px;
  text-decoration: none;
  font-size: 14px;
  font-family: var(--font-mono);
  transition: transform 140ms cubic-bezier(0.16, 1, 0.3, 1), background 140ms ease;
}
.btn:active { transform: scale(0.96); }
.btn.primary {
  background: #b04a32;
  color: #f4efe6;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.text-btn {
  border: 0;
  background: none;
  color: var(--mute);
  padding: 8px 0;
  font-size: 13px;
}
.text-btn:active { transform: scale(0.96); }

.well {
  position: relative;
  display: block;
  height: 46vh;
  min-height: 280px;
  max-height: 420px;
  border-radius: var(--r4);
  background: var(--paper-deep);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.well-file {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  font-size: 80px;
  cursor: pointer;
}
.well.is-filled {
  background-size: cover;
  background-position: center;
}
.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.photo-actions .btn { min-height: 46px; }
.file-btn {
  position: relative;
  overflow: hidden;
}
.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  font-size: 64px;
  cursor: pointer;
}
.ver {
  margin: 8px 0 0;
  color: var(--mute);
  font-size: 11px;
}
.well img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.well.is-filled .well-idle { display: none !important; }
.well-idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
  background:
    linear-gradient(var(--paper-deep), var(--paper-deep)) padding-box,
    repeating-linear-gradient(90deg, var(--cinnabar) 0 8px, transparent 8px 16px) border-box;
  border: 1px dashed transparent;
}
.well-idle b {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
}
.well-idle small { color: var(--mute); font-size: 13px; }

.ticket-screen .who { font-family: var(--font-sans); font-size: 13px; color: var(--ink-soft); }

.stage {
  position: relative;
  margin: 8px 0 22px;
}
#ticket-img {
  width: 100%;
  border-radius: 2px;
  box-shadow: var(--shadow);
  background: #1f1a14;
}
.stamp {
  position: absolute;
  right: 18px;
  top: 58%;
  z-index: 2;
  width: 84px;
  height: 84px;
  border: 2px solid var(--cinnabar);
  color: var(--cinnabar);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 16px;
  transform: rotate(-14deg) scale(0.6);
  opacity: 0;
  pointer-events: none;
}
.stamp.on {
  animation: stamp 720ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-14deg) scale(1.3); }
  35% { opacity: 1; transform: rotate(-14deg) scale(0.92); }
  100% { opacity: 0.85; transform: rotate(-14deg) scale(1); }
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-link {
  color: inherit;
  text-decoration: none;
}
.home {
  min-height: 100dvh;
  background: #e8dfd0 url("./assets/paper.jpg") center / cover no-repeat;
}
.home-main {
  width: min(520px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 36px) 22px calc(env(safe-area-inset-bottom) + 48px);
}
.home-mark {
  margin: 0 0 40px;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 12px;
}
.home h1 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 22px;
}
.home-line {
  display: block;
  white-space: nowrap;
}
.home-lead {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.home-cta {
  margin-top: 24px;
  width: 100%;
}
.home-note {
  margin: 12px 0 36px;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 12px;
}
.home-samples-kicker {
  margin: 0 0 16px;
  color: var(--mute);
  font-family: var(--font-display);
  font-size: 15px;
  white-space: nowrap;
}
.home-card {
  margin: 0 0 22px;
  padding: 22px 18px 26px;
  background: rgba(243, 238, 227, 0.58);
}
.home-card-meta {
  margin: 0 0 12px;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 12px;
}
.home-card-cluster {
  display: block;
  margin-bottom: 16px;
}
.home-card-photo {
  height: 214px;
  padding: 12px 12px 12px 12px;
  overflow: hidden;
  background: #f3eee3;
  box-shadow: inset 0 0 0 1px #c9c0b0;
  border-right: 16px solid var(--cinnabar);
}
.home-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  box-shadow: inset 0 0 0 1px #d8d0c2;
}
.home-card-bar { display: none; }
.home-card-name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
}
.home-card-offer,
.home-card-extra,
.home-card-talk {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink-soft);
}
.home-card-extra {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: var(--ink);
}
.soc {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: var(--ink);
}
.soc svg {
  width: 22px;
  height: 22px;
}
.home-card-talk {
  margin-top: 10px;
  color: var(--cinnabar);
}
.home-signup {
  margin-top: 28px;
  padding-top: 8px;
}
.home-signup-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
}
.signup-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 0;
}
.signup-field {
  min-width: 0;
}
.signup-row .btn {
  width: 100%;
}
.signup-field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 10px 0 11px;
  outline: none;
}
.signup-field input:focus {
  border-bottom-color: var(--cinnabar);
}
#signup-hint[data-kind="ok"] { color: var(--ink-soft); }
#signup-hint[data-kind="err"] { color: var(--cinnabar); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .screen, .btn, .stamp { animation: none; transition: none; }
  .stamp.on { opacity: 0.85; transform: rotate(-14deg); }
}
