:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f1e7;
  color: #24382c;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  --muted: #526153;
  --green: #254b3b;
  --paper: #faf6e9;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid #9c512f; outline-offset: 4px; }

.masthead {
  max-width: 1192px;
  margin: 0 auto;
  padding: 18px max(24px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #254b3b26;
}
.brand { display: inline-flex; align-items: baseline; gap: 11px; text-decoration: none; }
.brand-cn { font: 700 21px/1 "Songti SC", "Noto Serif CJK SC", SimSun, serif; }
.brand-en { font-size: .66rem; font-weight: 700; letter-spacing: .14em; }
.language { display: flex; gap: 2px; }
.language a {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
  font-size: .82rem;
}
.language [aria-current="true"] { background: #e6e8da; border-radius: 5px; font-weight: 700; }

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 7vw, 104px);
  width: min(1040px, 100% - 48px);
  margin: clamp(38px, 7vw, 100px) auto 0;
}
.intro { padding-top: clamp(16px, 5vw, 72px); }
.theme { margin: 0 0 13px; color: #93472d; font-weight: 700; font-size: .88rem; letter-spacing: .11em; }
h1 { font: 700 clamp(2.05rem, 4vw, 3.82rem)/1.2 "Songti SC", "Noto Serif CJK SC", SimSun, Georgia, serif; margin: 0; }
html[lang="en"] h1 { font-family: Georgia, serif; line-height: 1.04; }
.lede { margin: 16px 0 26px; font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.6; color: var(--muted); }
.choose { position: relative; display: inline-block; max-width: 100%; }
.choose input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.choose input:focus-visible + label { outline: 2px solid #9c512f; outline-offset: 4px; }
.button {
  min-height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 650;
  font-size: .94rem;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.button-primary { color: #fffdf6; background: var(--green); }
.button-primary:not(:disabled):hover { background: #1c3e30; }
.button-secondary { color: #254b3b; border-color: #79897b; background: transparent; }
.button-secondary:not(:disabled):hover { background: #e9eadf; }
.button:disabled { opacity: .49; cursor: default; }
.choose .button { padding-inline: 20px; }
.photo-icon { height: 15px; width: 18px; border: 1.5px solid; border-radius: 3px; position: relative; flex: none; }
.photo-icon::before { content: ""; position: absolute; top: 3px; left: 3px; width: 3px; height: 3px; background: currentColor; border-radius: 50%; }
.photo-icon::after { content: ""; position: absolute; width: 7px; height: 7px; border: solid currentColor; border-width: 1.5px 0 0 1.5px; transform: rotate(45deg); bottom: -1px; right: 2px; }
.small, .status { color: var(--muted); font-size: .82rem; line-height: 1.55; margin: 8px 0 0; }
.status[data-kind="error"] { color: #8d3527; }
.status:empty, #share-status:empty { margin: 0; }
.privacy { margin-top: 10px; }

.preview { min-width: 0; }
.preview-figure { margin: 0; }
.preview-caption { color: var(--muted); font-size: .83rem; margin-bottom: 9px; }
.postcard-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid #28362524;
  border-radius: 4px;
  box-shadow: 0 11px 26px #30281419, 3px 4px 0 #a4967d35;
}
.postcard-frame img { display: block; width: 100%; height: auto; }
.postcard-frame img:not([src]) { visibility: hidden; }
.result-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 15px; }
.result-actions .button { padding-inline: 8px; }
.share-link { width: 100%; min-height: 44px; margin-top: 8px; padding: 9px; border: 1px solid #79897b; border-radius: 6px; background: #fffdf6; color: var(--green); font-size: 1rem; }
.related-route { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: .88rem; text-underline-offset: 4px; }

@media (max-width: 676px) {
  .masthead { padding: 9px max(18px, env(safe-area-inset-left)); }
  .studio { display: block; width: min(100% - 36px, 438px); margin-top: 20px; }
  .intro { padding-top: 0; }
  .theme { margin-bottom: 5px; font-size: .79rem; }
  .lede { margin: 7px 0 13px; }
  .privacy { margin-top: 5px; }
  .preview { margin: 15px auto 0; max-width: 342px; }
  .preview-caption { margin-bottom: 5px; }
  .postcard-frame { width: min(100%, 300px); margin-inline: auto; }
  .result-actions { margin-top: 11px; }
}
