:root {
  --ink: #1c1915;
  --muted: #5e564c;
  --line: #e3d5c2;
  --paper: #f6f0e6;
  --card: #fffdf8;
  --sea: #245560;
  --gold: #8a6230;
  --shadow: 0 16px 40px rgba(36, 28, 18, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 17px/1.6 "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, #f3e0c4 0%, transparent 55%),
    radial-gradient(800px 380px at 100% 0%, #d5e6e4 0%, transparent 50%),
    var(--paper);
}
html[lang="zh"] body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}
a { color: var(--sea); }
.wrap { width: min(860px, calc(100% - 32px)); margin-inline: auto; }
header.top { padding: 1.4rem 0 0; }
.kicker {
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--gold);
  margin: 0 0 .35rem;
}
html[lang="zh"] .kicker { letter-spacing: .08em; text-transform: none; }
h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 .45rem;
}
html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] h3 {
  font-family: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
}
.lede { margin: 0 0 1rem; max-width: 44rem; color: var(--muted); }
.bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "back back"
    "nav lang";
  column-gap: 1rem;
  row-gap: .45rem;
  align-items: center;
  padding-bottom: .4rem;
}
.back {
  grid-area: back;
  justify-self: start;
  font-size: .92rem;
  text-decoration: none;
}
.back:hover { text-decoration: underline; }
.lang-switch {
  grid-area: lang;
  display: flex;
  gap: .35rem;
  justify-content: flex-end;
}
.lang-switch button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: .3rem .8rem;
  font: inherit;
  cursor: pointer;
}
.lang-switch button:hover { border-color: var(--sea); }
.lang-switch button.active { background: var(--sea); color: #f6f1e8; border-color: var(--sea); }
.products {
  grid-area: nav;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: .4rem;
  margin: 0;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.products a {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .45rem;
  text-decoration: none;
  color: inherit;
  padding: .3rem .7rem .3rem .3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  white-space: nowrap;
}
.products a:hover { border-color: var(--sea); }
.products a[aria-current="page"] {
  background: var(--sea);
  color: #f6f1e8;
  border-color: var(--sea);
}
.products img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  background: #efe6d6;
  flex: 0 0 auto;
}
.products strong {
  display: block;
  font-weight: 650;
  font-size: .92rem;
}
.products em { display: none; }
article[hidden] { display: none; }
h2.name { font-size: 1.55rem; margin-bottom: .35rem; }
main { padding: 1.2rem 0 3rem; }
article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
  background: #efe6d6;
  padding: .4rem;
}
.shots img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  background: #f7f1e6;
  border-radius: 12px;
}
.body { padding: 1rem 1.15rem 1.2rem; }
.meta {
  margin: 0 0 .35rem;
  color: var(--gold);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
html[lang="zh"] .meta { letter-spacing: 0; text-transform: none; font-size: .86rem; }
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 .45rem;
}
.latin { margin: -.2rem 0 .55rem; color: var(--muted); font-style: italic; }
article p { margin: 0 0 .75rem; }
.guide {
  background: #f4eee4;
  border-radius: 14px;
  padding: .85rem 1rem .95rem;
  margin: 0 0 .85rem;
}
.guide h2 { font-size: 1.2rem; }
.guide ol { margin: 0; padding-left: 1.25rem; }
.guide li { margin: .35rem 0; }
.guide .src { margin: .7rem 0 0; color: var(--muted); font-size: .9rem; }
details { margin: 0 0 .75rem; color: var(--muted); font-size: .92rem; }
summary { cursor: pointer; color: var(--sea); }
.inci { margin: .45rem 0 0; }
.more { font-weight: 650; text-decoration: none; }
.more:hover { text-decoration: underline; }
footer { padding: 0 0 2.4rem; color: var(--muted); font-size: .88rem; }
@media (max-width: 640px) {
  .shots { grid-template-columns: 1fr; }
  .shots img { height: 300px; }
}

/* A layout used only after the page sees an iPhone. */
html.iphone {
  -webkit-text-size-adjust: 100%;
}
html.iphone body {
  font-size: 18px;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
html.iphone .wrap { width: min(640px, calc(100% - 20px)); }
html.iphone header.top {
  position: sticky;
  top: 0;
  z-index: 4;
  padding-top: max(.7rem, env(safe-area-inset-top));
  background: rgba(246, 240, 230, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
html.iphone h1 { font-size: 1.65rem; margin-bottom: .3rem; }
html.iphone .lede { font-size: .98rem; }
html.iphone .bar {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "back back"
    "nav lang";
  align-items: center;
  padding-bottom: .7rem;
}
html.iphone .lang-switch button {
  min-height: 44px;
  padding: .4rem .85rem;
}
html.iphone .back { min-height: 44px; display: inline-flex; align-items: center; }
html.iphone .products a {
  min-height: 44px;
  padding: .25rem .8rem .25rem .25rem;
}
html.iphone .products img { width: 36px; height: 36px; }
html.iphone .products strong { font-size: 1rem; }
html.iphone .shots { grid-template-columns: 1fr; }
html.iphone .shots img { height: auto; max-height: 72vh; }
html.iphone .guide li { margin: .7rem 0; }
html.iphone footer { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
