/* Huali — editorial gallery system. Tokens, foundation, gallery, operations, responsive. */
:root {
  --paper: #f4f1e9;
  --ink: #243c32;
  --muted: #626b60;
  --line: #cdd0c4;
  --red: #984332;
  --surface: #faf8f2;
  --accent: #dce6ab;
  --serif:
    "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, "Songti SC",
    serif;
  --sans: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --gutter: clamp(22px, 5vw, 88px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--accent);
  color: var(--ink);
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(46px, 6vw, 90px);
}
h2 {
  font-size: clamp(36px, 4.5vw, 68px);
}
h3 {
  font-size: 29px;
}
em {
  font-weight: 400;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: none;
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a,
button {
  transition:
    color 0.22s,
    background 0.22s,
    border-color 0.22s,
    transform 0.35s var(--ease);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 5px;
}
main:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
img {
  max-width: 100%;
}
input,
textarea,
select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0;
  min-width: 0;
}
input:hover,
textarea:hover,
select:hover {
  border-color: var(--muted);
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 130px;
}
label {
  display: block;
  font-size: 14px;
  line-height: 1.6;
}
label input,
label textarea,
label select {
  display: block;
  margin-top: 8px;
}
label .small {
  display: block;
  margin-top: 8px;
}
summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  min-height: 44px;
}
summary::-webkit-details-marker {
  display: none;
}
summary:after {
  content: "+";
  font: 24px var(--sans);
  color: var(--red);
}
details[open] > summary:after {
  content: "−";
}
ul,
ol {
  padding-left: 22px;
}
li {
  margin: 6px 0;
}
progress {
  width: 100%;
  height: 6px;
  accent-color: var(--ink);
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 12px 20px;
}
.skip-link:focus {
  transform: translateY(0);
}
/* Masthead & recurring elements */
header {
  margin: 0 var(--gutter);
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.brand-name {
  font: 49px/0.9 var(--serif);
  letter-spacing: -0.065em;
}
.brand-period {
  color: var(--red);
}
.brand-caption {
  font-size: 10px;
  letter-spacing: 0.26em;
  writing-mode: vertical-rl;
  height: 64px;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 48px);
  font-size: 12px;
}
.nav a {
  padding: 10px 0;
  position: relative;
}
.nav a:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.nav a:hover:after,
.nav a[aria-current]:after {
  transform: scaleX(1);
}
.menu-toggle {
  display: none;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.6;
  font-weight: 500;
}
.small {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.lead {
  font-size: 17px;
  line-height: 1.8;
  max-width: 520px;
  color: var(--muted);
}
.wrap {
  max-width: 1680px;
  margin: auto;
  padding: 0 var(--gutter);
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 48px;
  padding: 14px 24px;
  font-size: 12px;
  line-height: 1.5;
}
.primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.primary:hover:not(:disabled) {
  background: var(--red);
  border-color: var(--red);
}
.secondary {
  border: 1px solid var(--line);
}
.secondary:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.text-link {
  display: inline-block;
  font-size: 12px;
  border-bottom: 1px solid currentColor;
  padding: 7px 0;
}
.text-link:hover {
  color: var(--red);
}
.back {
  display: inline-block;
  margin: 35px 0 0;
  font-size: 12px;
}
.notice {
  padding: 18px 22px;
  background: #e8ebdf;
  border-left: 2px solid #9ca88a;
  font-size: 12px;
  line-height: 1.8;
  margin: 24px 0;
}
.empty {
  padding: 65px 0;
  color: var(--muted);
}
.badge {
  display: inline-block;
  padding: 4px 9px;
  background: #e3e9d7;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.badge.draft {
  background: #eee0d5;
}
.page-enter {
  animation: page-in 0.5s var(--ease) both;
}
@keyframes page-in {
  from {
    opacity: 0.3;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Cover — type, contour drawing and a featured plate */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  column-gap: 5%;
  position: relative;
  padding: 26px 0 32px;
}
.hero-kicker {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  margin-bottom: 52px;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 20px 0 26px;
}
.hero h1 {
  font-size: clamp(65px, 7.8vw, 122px);
  line-height: 0.94;
  letter-spacing: -0.065em;
  white-space: nowrap;
  margin: 0 0 44px;
}
.hero h1 em {
  color: var(--red);
}
.hero-intro {
  display: flex;
  gap: 23px;
  max-width: 470px;
  align-items: center;
}
.hero-intro .lead {
  font-size: 13px;
  line-height: 1.9;
}
.hero-seal {
  color: var(--red);
  font:
    13px/1.4 "Songti SC",
    serif;
  border: 1px solid var(--red);
  padding: 8px 4px;
  flex-shrink: 0;
}
.round-link {
  border: 1px solid var(--line);
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 25px;
}
.round-link:hover {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(45deg);
}
.hero-art {
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  padding: 24px;
  min-height: 420px;
  margin-top: 15px;
}
.hero-art .art-placeholder {
  flex: 1;
  min-height: 300px;
  background-color: #243c32;
  color: #e2e6cf;
  border: 1px solid #ffffff24;
}
.hero-art .placeholder-title {
  font-size: 40px;
}
.hero-art .caption {
  color: #d7ddce;
  font-size: 10px;
  margin-top: 18px;
}
.hero-bottom {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding-top: 40px;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.hero-bottom > a {
  font-size: 12px;
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
}
.hero-bottom > span:last-child {
  font-size: 9px;
  color: var(--muted);
}
/* Actual artwork always uses contain; contour drawing is explicitly a placeholder. */
.art-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  overflow: hidden;
  background: #dce0d2;
  color: #334735;
}
.art-placeholder:not(:has(img)) {
  background-image: url("/contours.svg");
  background-size: cover;
  background-position: center;
}
.art-placeholder[data-art="2"] {
  background-color: #e7ded1;
  color: #694e3b;
}
.art-placeholder[data-art="3"] {
  background-color: #d7dedb;
  color: #385853;
}
.art-placeholder[data-art="0"] {
  background-color: #e0dfcb;
  color: #525b37;
}
.specimen-index {
  position: absolute;
  top: 22px;
  left: 22px;
  font-size: 9px;
  letter-spacing: 0.14em;
}
.placeholder-title {
  font:
    38px/1.8 "Songti SC",
    "STSong",
    serif;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
  opacity: 0.85;
}
.placeholder-label {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  font-size: 9px;
  letter-spacing: 0.08em;
}
.art-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 680px;
  transition: transform 0.7s var(--ease);
}
.card:hover .art-image {
  transform: scale(1.025);
}
.caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  font-size: 11px;
  color: var(--muted);
}
/* Editorial sections & collection */
.section {
  padding: 90px 0;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 35px;
  align-items: end;
  margin-bottom: 48px;
}
.section-head h2 {
  margin-top: 22px;
}
.section-aside {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin-left: auto;
}
.section-head > .text-link {
  margin-left: 30px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 55px 30px;
}
.card {
  display: block;
  min-width: 0;
}
.card .art-placeholder {
  height: 350px;
  margin-bottom: 23px;
}
.card:nth-child(3n + 2) .art-placeholder {
  height: 420px;
}
.card h3 {
  font-size: clamp(25px, 2.4vw, 36px);
  margin: 12px 0;
}
.card .theme {
  color: var(--red);
}
.card > .small {
  font-size: 10px;
}
.card > p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin: 16px 0 22px;
  max-width: 380px;
}
.card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 10px;
}
.card:hover h3 {
  color: var(--red);
}
.selected-grid {
  align-items: start;
}
.selected-grid .card:nth-child(2) {
  margin-top: 60px;
}
.selected-grid .card:nth-child(3) {
  margin-top: 120px;
}
.statement {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14%;
  background: var(--ink);
  color: var(--paper);
  margin: 45px calc(-1 * var(--gutter)) 0;
  padding: 90px var(--gutter);
}
.statement h2 {
  font-size: clamp(48px, 6.5vw, 100px);
  margin-top: 35px;
}
.statement h2 em {
  color: var(--accent);
}
.statement-copy {
  position: relative;
  padding-top: 75px;
  max-width: 490px;
}
.statement-copy > p {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 25px;
  color: #d1d7c8;
}
.statement-mark {
  position: absolute;
  top: 0;
  right: 0;
  color: #cedab8;
  font:
    42px "Songti SC",
    serif;
}
.statement .text-link {
  margin-top: 18px;
}
.meaning-section {
  border-top: 0;
  padding-bottom: 110px;
}
.themes {
  counter-reset: meaning;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 60px;
}
.theme-link {
  position: relative;
  counter-increment: meaning;
  padding: 28px 40px;
  border-top: 1px solid var(--line);
  font: 30px/1.2 var(--serif);
  transition:
    padding 0.3s var(--ease),
    color 0.3s;
}
.theme-link:before {
  content: "0" counter(meaning);
  position: absolute;
  top: 35px;
  left: 0;
  font: 10px var(--sans);
  color: var(--red);
}
.theme-link:after {
  content: "↗";
  position: absolute;
  right: 5px;
  top: 30px;
  font: 22px var(--sans);
}
.theme-link span {
  display: block;
  font: 11px/1.7 var(--sans);
  color: var(--muted);
  margin-top: 10px;
}
.theme-link:hover {
  padding-left: 49px;
  color: var(--red);
}
.page-title {
  padding: 72px 0 30px;
  max-width: 1020px;
}
.page-title h1 {
  margin: 25px 0;
}
.filters {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 25px 0;
  border-block: 1px solid var(--line);
  margin: 15px 0 48px;
}
.filters input {
  max-width: 370px;
}
.filters select {
  max-width: 240px;
}
.filters > .small {
  margin-left: auto;
  white-space: nowrap;
}
.page-title + .filters + .grid .art-placeholder {
  height: 360px;
}
.page-title + .filters + .grid .card:nth-child(3n + 2) {
  margin-top: 35px;
}
/* Artwork detail & narrative pages */
.detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 8%;
  padding: 40px 0 80px;
  align-items: start;
}
.detail > div:last-child {
  padding-top: 15px;
}
.detail h1 {
  font-size: clamp(39px, 4.2vw, 66px);
  margin: 24px 0;
}
.detail .art-placeholder {
  min-height: 570px;
}
.detail p {
  font-size: 13px;
  line-height: 1.9;
}
.product-summary {
  margin: 25px 0 !important;
  font-size: 15px !important;
  color: var(--muted);
}
.choices {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 25px 0;
}
.choice {
  border: 1px solid var(--line);
  padding: 12px;
  font-size: 11px;
  min-height: 44px;
}
.choice.active {
  background: var(--ink);
  color: var(--paper);
}
.price {
  font: 39px var(--serif);
  margin: 25px 0;
}
.price .small {
  font: 10px var(--sans);
  margin-left: 10px;
}
.detail .primary {
  width: 100%;
  margin: 22px 0 12px;
}
.product-help {
  display: flex;
  gap: 22px;
  margin-top: 22px;
  font-size: 11px;
}
.detail > div, .art-gallery { min-width: 0; }
.image-kind { position: absolute; bottom: 12px; left: 12px; padding: 6px 10px; background: #173d31; color: #fff; font-size: 11px; letter-spacing: .04em; z-index: 1; }
.gallery-stage.is-panorama { display: block; overflow-x: auto; min-height: 0; overscroll-behavior-x: contain; }
.gallery-stage.is-panorama img { height: clamp(200px, 30vw, 340px); width: auto; max-width: none; max-height: none; }
.gallery-stage {
  background: #e6e7db;
  min-height: 330px;
  display: grid;
  place-items: center;
}
.gallery-stage img {
  display: block;
  width: 100%;
  max-height: 700px;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 16px 0;
}
.gallery-thumbs button {
  padding: 4px;
  border: 1px solid var(--line);
  flex: 0 0 68px;
  height: 68px;
}
.gallery-thumbs button[aria-pressed="true"] {
  border: 2px solid var(--red);
}
.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#gallery-caption {
  padding-top: 12px;
}
.story {
  max-width: 800px;
  margin: auto;
  padding: 40px 0 110px;
  border-top: 1px solid var(--line);
}
.story h2 {
  font-size: 44px;
  margin: 28px 0;
}
.story p {
  font-size: 16px;
  line-height: 2;
  margin-bottom: 22px;
  color: #526052;
  white-space: pre-line;
}
.reflection {
  margin: 48px 0;
  padding: 38px;
  border-block: 1px solid var(--line);
  background: #e8ebdf;
}
.quote {
  font: clamp(30px, 3.3vw, 46px) / 1.2 var(--serif);
  letter-spacing: -0.035em;
  margin: 25px 0;
}
.room-note {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.about {
  max-width: 930px;
  margin: 85px auto;
  padding: 0 var(--gutter) 80px;
}
.about h1 {
  margin: 25px 0 45px;
}
.about h2 {
  font-size: 35px;
  margin: 40px 0 20px;
}
.about p {
  line-height: 1.95;
  color: var(--muted);
}
.help-page {
  max-width: 1200px;
  padding: 75px var(--gutter) 110px;
  margin: auto;
}
.help-page h1 {
  max-width: 850px;
  margin: 25px 0;
}
.help-page > .lead {
  max-width: 650px;
}
.support-nav {
  display: flex;
  gap: 15px 28px;
  flex-wrap: wrap;
  padding: 25px 0;
  border-block: 1px solid var(--line);
  margin: 40px 0;
  font-size: 12px;
}
.support-nav a[aria-current] {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.help-sections {
  margin: 45px 0;
}
.help-sections section {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 12px 25px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.help-sections section h2 {
  font-size: 32px;
}
.help-sections section p {
  grid-column: 2;
}
.help-sections p {
  line-height: 1.9;
  color: var(--muted);
  max-width: 760px;
  font-size: 15px;
}
.help-sections details {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.help-sections summary {
  font: 26px/1.3 var(--serif);
}
.help-sections details p {
  margin-top: 20px;
}
/* Closing page */
.site-footer {
  background: #e8eadf;
  padding: 58px var(--gutter) 40px;
}
.footer-top {
  padding-bottom: 50px;
  border-bottom: 1px solid #bdc4b6;
}
.footer-invitation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  font: clamp(38px, 5.4vw, 80px) / 1.12 var(--serif);
  letter-spacing: -0.045em;
  margin-top: 25px;
}
.footer-invitation > span {
  font: 45px var(--sans);
}
.footer-invitation:hover {
  color: var(--red);
}
.footer-bottom {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.4fr;
  gap: 40px;
  align-items: start;
  padding-top: 35px;
  font-size: 11px;
}
.footer-wordmark {
  font: 65px/0.9 var(--serif);
  letter-spacing: -0.065em;
}
.footer-bottom p {
  margin-bottom: 10px;
}
.footer-help {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.footer-help a:hover {
  color: var(--red);
}
/* Accounts and operating workspace */
.account-wrap {
  max-width: 1140px;
  margin: 65px auto 100px;
  padding: 0 var(--gutter);
  min-height: 60vh;
}
.account-wrap h1 {
  font-size: clamp(42px, 5vw, 68px);
  margin: 22px 0 30px;
}
.account-wrap h2 {
  font-size: 34px;
  margin: 28px 0 20px;
}
.account-wrap h3 {
  font-size: 26px;
}
.account-wrap p {
  margin: 12px 0;
  line-height: 1.85;
}
.account-nav {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  flex-wrap: wrap;
  font-size: 12px;
}
.account-nav a[aria-current] {
  color: var(--red);
}
.account-nav button {
  margin-left: auto;
}
.login-panel {
  max-width: 480px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 30px 0;
}
.login-panel p {
  margin: 16px 0;
}
.account-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 30px 0;
}
.overview-links a {
  border-top: 1px solid var(--ink);
  padding: 25px 0;
  font-size: 12px;
}
.overview-links strong {
  font: 64px/1.5 var(--serif);
  display: block;
}
.order-card,
.address-card {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  padding: 25px 0;
  min-width: 0;
}
.order-card:hover h3 {
  color: var(--red);
}
.order-card p {
  font-size: 13px;
}
.order-card button {
  align-self: start;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 12px;
}
.order-id {
  overflow-wrap: anywhere;
}
.account-wrap h2.order-id {
  font-size: 25px;
  letter-spacing: 0;
}
.order-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}
.order-item {
  padding: 25px 0;
  border-block: 1px solid var(--line);
  margin: 25px 0;
}
.address-actions {
  display: flex;
  gap: 16px;
  flex-direction: column;
  align-items: start;
  font-size: 12px;
}
.support {
  margin-top: 45px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.admin-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  max-width: 1680px;
  margin: auto;
  padding: 0 var(--gutter);
  min-height: 75vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 40px 24px 40px 0;
  font-size: 12px;
}
.sidebar .eyebrow {
  margin-bottom: 25px;
}
.sidebar a {
  display: block;
  padding: 13px 10px;
}
.sidebar a[aria-current] {
  background: #e4e9db;
}
.sidebar a:hover {
  color: var(--red);
}
.admin-main {
  padding: 40px 0 60px 40px;
  min-width: 0;
}
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.admin-top h1 {
  font: 42px/1.3 var(--sans);
  letter-spacing: -0.045em;
  margin-top: 10px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px 50px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.stats > div {
  min-width: 110px;
}
.stats strong {
  display: block;
  font: 48px/1.2 var(--serif);
}
.stats span {
  font-size: 11px;
  color: var(--muted);
}
.admin-filters input {
  max-width: 420px;
}
.amount-summary {
  display: flex;
  align-items: center;
  gap: 20px 40px;
  flex-wrap: wrap;
  padding: 18px 22px;
  margin: 16px 0;
  background: var(--surface);
  border: 1px solid var(--line);
}
.amount-summary h3 {
  flex-basis: 100%;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
}
.amount-primary {
  display: flex;
  flex-direction: column;
}
.amount-primary strong {
  font: 32px/1.2 var(--serif);
}
.amount-primary span {
  font-size: 11px;
  color: var(--muted);
}
.amount-breakdown {
  display: flex;
  gap: 18px 28px;
  flex-wrap: wrap;
  margin-left: auto;
}
.amount-breakdown div {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}
.amount-breakdown span {
  color: var(--muted);
  font-size: 11px;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
}
.table-scroll table {
  border-collapse: collapse;
  width: 100%;
  min-width: max-content;
  font-size: 12px;
}
.table-scroll th,
.table-scroll td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table-scroll thead th {
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  position: sticky;
  top: 0;
}
.table-scroll tbody tr:hover {
  background: var(--surface);
}
.table-scroll td:first-child,
.table-scroll th:first-child {
  position: sticky;
  left: 0;
  background: var(--paper);
  white-space: normal;
  min-width: 160px;
  max-width: 260px;
}
.table-scroll thead th:first-child {
  background: var(--surface);
  z-index: 1;
}
.table-scroll tbody tr:hover td:first-child {
  background: var(--surface);
}
.catalog-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
.catalog-table th,
.catalog-table td {
  text-align: left;
  padding: 23px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.catalog-table th {
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
}
.catalog-table td:first-child {
  font-size: 15px;
}
.catalog-table .small {
  font-size: 10px;
  max-width: 260px;
  white-space: normal;
}
.row-actions button {
  font-size: 11px;
  padding: 10px 6px;
  color: var(--red);
}
.row-actions button:hover {
  text-decoration: underline;
}
.order-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
  margin: 30px 0;
}
.order-filters label {
  font-size: 12px;
}
.order-filters .form-actions {
  position: static;
  padding: 0;
  margin: 0;
  border: 0;
  align-self: end;
}
.detail-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 25px 0;
}
.detail-cards section {
  border: 1px solid var(--line);
  padding: 26px;
  background: var(--surface);
  min-width: 0;
}
.detail-cards h2 {
  font-size: 26px;
  margin: 0 0 24px;
}
.detail-cards dl {
  display: grid;
  grid-template-columns: 85px minmax(0, 1fr);
  gap: 15px;
  font-size: 13px;
}
.detail-cards dt {
  color: var(--muted);
}
.detail-cards dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-cards p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.connection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 30px 0;
}
.connection-card {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.connection-card h2 {
  font-size: 28px;
}
.connection-card p {
  font-size: 13px;
  color: var(--muted);
}
body[data-area="admin"] > #app > footer {
  border-top: 1px solid var(--line);
  padding: 25px var(--gutter);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
body[data-area="admin"] h1,
body[data-area="admin"] h2,
body[data-area="admin"] h3 {
  font-family: var(--sans);
  letter-spacing: -0.025em;
}
body[data-area="admin"] .account-wrap h1 {
  font-size: 40px;
}
body[data-area="admin"] .brand-caption {
  writing-mode: horizontal-tb;
  height: auto;
  max-width: 130px;
  letter-spacing: 0.08em;
  font-size: 11px;
}
/* Dialogs & editing */
dialog {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  width: min(850px, 94vw);
  max-height: 90dvh;
  padding: 30px;
  overflow: auto;
  box-shadow: 0 30px 100px #13291b33;
}
dialog::backdrop {
  background: #172c2373;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 30px;
}
dialog .dialog-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
dialog #editor-close,
dialog [data-close] {
  min-width: 44px;
  min-height: 44px;
}
.editor-tabs {
  display: flex;
  gap: 16px;
  overflow: auto;
  flex-wrap: nowrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 15px;
}
.editor-tabs button {
  white-space: nowrap;
  min-height: 48px;
  font-size: 13px;
  padding: 12px 4px;
  border-bottom: 2px solid transparent;
}
.editor-tabs button[aria-selected="true"] {
  border-color: var(--red);
  color: var(--red);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.wide {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 12px 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.form-actions label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.form-actions label select {
  margin-top: 0;
  width: auto;
}
.form-actions .secondary,
.form-actions .primary {
  min-height: 40px;
  padding: 10px 18px;
}
dialog .form-actions {
  position: sticky;
  bottom: -30px;
  background: var(--paper);
  z-index: 2;
}
.edit-status {
  padding: 16px 0;
}
.media-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.media-row > img {
  width: 120px;
  height: 145px;
  object-fit: contain;
  background: #e3e5d9;
}
.media-row label {
  margin-top: 12px;
}
.media-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.media-actions button {
  border: 1px solid var(--line);
  font-size: 11px;
  padding: 9px 12px;
  min-height: 40px;
}
.upload-box {
  border: 1px dashed #899680;
  padding: 22px;
  background: #e9ede2;
  margin: 22px 0;
}
.upload-box input {
  font-size: 12px;
  border: 0;
  background: transparent;
  padding: 8px 0;
}
#editor [data-panel] {
  padding: 20px 0;
}
#editor input[type="checkbox"] {
  display: inline-block;
  margin-right: 8px;
}
#delivery-current,
#upload-status {
  overflow-wrap: anywhere;
  font-size: 13px;
}
#upload-status {
  padding: 12px 0;
}
#retry-upload {
  color: var(--red);
  text-decoration: underline;
  min-height: 44px;
}
.discard-warning {
  border: 1px solid var(--red);
  padding: 20px;
  background: var(--paper);
  position: sticky;
  bottom: 0;
  z-index: 3;
}
.discard-warning p {
  font-size: 13px;
}
#formerror,
#login-error,
#checkout-error,
#address-error,
#backup-message {
  color: var(--red);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}
#readiness-result h4 {
  margin: 20px 0 10px;
}
#readiness-result ul {
  font-size: 13px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  padding: 16px 25px;
  display: none;
}
/* Homepage chapter rhythm: ink cover / paper collection / ink story / paper themes. */
body[data-page="home"] #app > header,
body[data-page="home"] .hero {
  background: #20392f;
  color: #f4f1e9;
  box-shadow: 0 0 0 100vmax #20392f;
  clip-path: inset(0 -100vmax);
}
body[data-page="home"] #app > header { border-color: #ffffff29; }
body[data-page="home"] header .brand-period { color: #dce6ab; }
body[data-page="home"] header .nav a:after { background: #dce6ab; }
body[data-page="home"] header .nav { border-color: #ffffff29; }
body[data-page="home"] .hero { padding-bottom: 48px; }
body[data-page="home"] .hero h1 em { color: #dce6ab; }
body[data-page="home"] .hero .lead,
body[data-page="home"] .hero-kicker .small,
body[data-page="home"] .hero-bottom > span:last-child { color: #c4cebd; }
body[data-page="home"] .hero-seal { border-color: #dce6ab; color: #dce6ab; }
body[data-page="home"] .round-link { border-color: #ffffff50; }
body[data-page="home"] .round-link:hover { background: #dce6ab; color: #20392f; }
body[data-page="home"] .hero-bottom > a { border-color: #b6c4a5; }
body[data-page="home"] .hero-art { background: #e4e6d7; color: #243c32; }
body[data-page="home"] .hero-art .art-placeholder { background-color: #d4dbca; color: #314d3b; border-color: #566c493d; }
body[data-page="home"] .hero-art .caption { color: #425644; }
body[data-page="home"] .selected-section { margin-top: 0; border-top: 0; }
body[data-page="home"] .site-footer { background: #20392f; color: #f4f1e9; }
body[data-page="home"] .site-footer .small { color: #c4cebd; }
body[data-page="home"] .footer-top { border-color: #ffffff30; }
body[data-page="home"] .footer-invitation:hover,
body[data-page="home"] .footer-help a:hover { color: #dce6ab; }
body[data-page="home"] a:focus-visible,
body[data-page="home"] button:focus-visible { outline-color: #984332; }
body[data-page="home"] header a:focus-visible,
body[data-page="home"] header button:focus-visible,
body[data-page="home"] .hero a:focus-visible,
body[data-page="home"] .site-footer a:focus-visible { outline-color: #dce6ab; }

/* Compact screens — intentional reflow rather than scaled-down desktop */
@media (min-width: 1600px) {
  .hero-art {
    min-height: 480px;
  }
}
@media (max-width: 1100px) {
  .hero h1 {
    font-size: 8.3vw;
  }
  .hero-intro {
    gap: 15px;
  }
  .hero-intro .lead {
    font-size: 12px;
  }
  .hero-art {
    padding: 18px;
    min-height: 370px;
  }
  .hero-art .placeholder-title {
    font-size: 34px;
  }
  .hero-art .placeholder-label {
    font-size: 8px;
  }
  .grid {
    gap: 40px 22px;
  }
  .card .art-placeholder,
  .page-title + .filters + .grid .art-placeholder {
    height: 300px;
    min-height: 300px;
  }
  .card:nth-child(3n + 2) .art-placeholder {
    height: 350px;
  }
  .section-aside {
    display: none;
  }
  .admin-shell {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .admin-main {
    padding-left: 25px;
  }
  .admin-top h1 {
    font-size: 32px;
  }
  .stats {
    gap: 40px;
  }
  .detail {
    gap: 5%;
  }
  .detail .art-placeholder {
    min-height: 450px;
  }
}
@media (max-width: 760px) {
  header {
    min-height: 86px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 0;
  }
  .brand-name {
    font-size: 41px;
  }
  .brand-caption {
    font-size: 9px;
    height: 52px;
  }
  .menu-toggle {
    display: block;
    font-size: 12px;
    min-height: 44px;
    padding: 8px;
  }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
  }
  .nav.is-open {
    display: flex;
  }
  .nav a {
    padding: 13px 0;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }
  .hero-kicker {
    margin-bottom: 25px;
  }
  .hero-kicker .small {
    display: none;
  }
  .hero h1 {
    font-size: clamp(58px, 12vw, 90px);
    margin-bottom: 28px;
    white-space: normal;
  }
  .hero-copy {
    padding: 10px 0 25px;
  }
  .hero-intro {
    max-width: 520px;
  }
  .hero-intro .lead {
    font-size: 13px;
  }
  .round-link {
    margin-left: auto;
  }
  .hero-art {
    margin-top: 12px;
    min-height: 390px;
    padding: 20px;
  }
  .hero-art .art-placeholder {
    min-height: 320px;
  }
  .hero-bottom {
    padding: 28px 0 5px;
  }
  .hero-bottom > span:last-child {
    display: none;
  }
  .hero-art .placeholder-title {
    font-size: 32px;
  }
  .hero-art .placeholder-label {
    font-size: 9px;
  }
  .section {
    padding: 60px 0;
  }
  .section-head {
    margin-bottom: 30px;
    gap: 20px;
  }
  .section-head > .text-link {
    margin-left: 0;
    white-space: nowrap;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 22px;
  }
  .selected-grid {
    grid-template-columns: 1fr;
  }
  .selected-grid .card:nth-child(2),
  .selected-grid .card:nth-child(3) {
    margin-top: 0;
  }
  .selected-grid .card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 25px;
  }
  .selected-grid .card .art-placeholder {
    grid-row: 1/7;
    height: 340px;
    margin: 0;
  }
  .selected-grid .card .theme {
    padding-top: 15px;
  }
  .selected-grid .card > p {
    margin: 10px 0;
  }
  .card:nth-child(3n + 2) .art-placeholder {
    height: 300px;
  }
  .statement {
    padding-top: 60px;
    padding-bottom: 60px;
    gap: 40px;
    grid-template-columns: 1fr;
  }
  .statement h2 {
    font-size: 64px;
  }
  .statement-copy {
    padding-top: 0;
    max-width: 100%;
  }
  .statement-copy > p {
    font-size: 14px;
    max-width: 510px;
  }
  .statement-mark {
    display: none;
  }
  .themes {
    gap: 0 25px;
  }
  .theme-link {
    font-size: 25px;
    padding: 25px 30px;
  }
  .theme-link:before {
    top: 30px;
  }
  .theme-link:after {
    font-size: 18px;
  }
  .footer-bottom {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .footer-wordmark {
    grid-column: 1/-1;
  }
  .detail {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-bottom: 50px;
  }
  .detail .art-placeholder {
    min-height: 420px;
  }
  .detail h1 {
    max-width: 600px;
  }
  .detail .primary {
    max-width: 500px;
  }
  .story {
    padding-bottom: 65px;
  }
  .story h2 {
    font-size: 36px;
  }
  .story p {
    font-size: 15px;
  }
  .page-title {
    padding-top: 48px;
  }
  .filters {
    flex-wrap: wrap;
    gap: 12px;
  }
  .filters input {
    max-width: none;
    flex: 1 1 100%;
  }
  .filters select {
    flex: 1;
    max-width: none;
  }
  .filters > .small {
    font-size: 10px;
  }
  .page-title + .filters + .grid .card:nth-child(3n + 2) {
    margin-top: 0;
  }
  .account-wrap {
    margin-top: 40px;
  }
  .account-columns,
  .detail-cards,
  .connection-grid {
    grid-template-columns: 1fr;
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: flex;
    gap: 8px 18px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .eyebrow {
    display: none;
  }
  .sidebar a {
    padding: 10px 0;
  }
  .sidebar a[aria-current] {
    background: none;
    color: var(--red);
  }
  .admin-main {
    padding: 28px 0 50px;
  }
  .admin-top {
    gap: 12px;
  }
  .admin-top h1 {
    font-size: 29px;
  }
  .admin-top .primary {
    padding: 12px;
    font-size: 11px;
  }
  .catalog-table thead {
    display: none;
  }
  .catalog-table,
  .catalog-table tbody,
  .catalog-table tr,
  .catalog-table td {
    display: block;
    width: 100%;
  }
  .catalog-table tr {
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
  }
  .catalog-table td {
    border: 0;
    white-space: normal;
    padding: 6px 0;
  }
  .catalog-table td:first-child {
    font-size: 22px;
    margin-bottom: 8px;
  }
  .catalog-table td[data-label]:not(:first-child) {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }
  .catalog-table td[data-label]:not(:first-child):before {
    content: attr(data-label);
    font-size: 11px;
    min-width: 55px;
    color: var(--muted);
  }
  .row-actions {
    display: flex;
    gap: 14px;
  }
  .row-actions button {
    min-height: 44px;
  }
  .order-filters {
    grid-template-columns: 1fr 1fr;
  }
  .order-filters label:first-child,
  .order-filters .form-actions {
    grid-column: 1/-1;
  }
  .help-page {
    padding-top: 45px;
  }
  .help-sections section {
    grid-template-columns: 25px 1fr;
    gap: 10px 15px;
  }
  .help-sections section h2 {
    font-size: 28px;
  }
  .about {
    margin-top: 45px;
  }
  .footer-invitation {
    font-size: 44px;
  }
}
@media (max-width: 480px) {
  .hero h1 {
    font-size: 14vw;
  }
  .hero-intro {
    gap: 14px;
  }
  .round-link {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 22px;
  }
  .hero-seal {
    display: none;
  }
  .hero-art {
    min-height: 350px;
    padding: 16px;
  }
  .hero-art .art-placeholder {
    min-height: 280px;
  }
  .hero-bottom {
    font-size: 9px;
  }
  .hero-bottom > a {
    font-size: 11px;
  }
  .section-head {
    align-items: start;
    flex-wrap: wrap;
  }
  .section-head > .text-link {
    margin-top: 8px;
  }
  .selected-grid .card {
    display: block;
  }
  .selected-grid .card .art-placeholder {
    height: 380px;
    margin-bottom: 24px;
  }
  .selected-grid .card .theme {
    padding-top: 0;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card .art-placeholder,
  .page-title + .filters + .grid .art-placeholder {
    height: 380px;
  }
  .card h3 {
    font-size: 33px;
  }
  .themes {
    grid-template-columns: 1fr;
  }
  .theme-link {
    font-size: 29px;
  }
  .footer-bottom {
    grid-template-columns: 1fr;
  }
  .footer-invitation {
    font-size: 37px;
  }
  .footer-invitation > span {
    font-size: 30px;
  }
  .footer-bottom > div {
    max-width: 340px;
  }
  .footer-help {
    gap: 14px 28px;
  }
  .story .reflection {
    padding: 25px;
  }
  .account-wrap h1 {
    font-size: 43px;
  }
  .account-nav {
    gap: 18px;
    font-size: 11px;
  }
  .order-card,
  .address-card {
    flex-direction: column;
    gap: 12px;
  }
  .address-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .stats {
    gap: 32px;
  }
  .stats strong {
    font-size: 42px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  dialog {
    padding: 20px;
    width: 95vw;
  }
  dialog .form-actions {
    bottom: -20px;
  }
  .form-actions button {
    flex: 1 1 130px;
  }
  .media-row {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
  }
  .media-row > img {
    width: 70px;
    height: 110px;
  }
  .editor-tabs {
    gap: 14px;
  }
  .editor-tabs button {
    font-size: 12px;
  }
  .login-panel {
    padding: 22px;
  }
  .detail-cards section {
    padding: 20px;
  }
  .help-sections summary {
    font-size: 23px;
  }
  .support-nav {
    gap: 16px 22px;
  }
  .account-wrap .section-head {
    flex-wrap: wrap;
  }
  body[data-area="admin"] > #app > footer {
    flex-direction: column;
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .page-enter {
    opacity: 1;
    transform: none;
  }
}

.edition-panel { display: grid; gap: 16px; margin: 24px 0; }
.edition-panel .primary { text-align: center; }
#contact-form input, #contact-form textarea { width: 100%; min-width: 0; }


/* Section spacing must preserve the shared horizontal page gutter. */
.wrap.section { padding-inline: var(--gutter); }

.admin-navigation {display:flex;flex-wrap:wrap;gap:6px 2px;padding:20px var(--gutter);border-bottom:1px solid var(--line);align-items:center;} .admin-navigation span{font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:0 2px 0 16px;} .admin-navigation span:first-child{margin-left:0;} .admin-navigation a{font-size:13px;padding:8px 11px;border-radius:3px;color:var(--ink);font-weight:500;} .admin-navigation a:hover{background:#e4e9db;} .admin-navigation a[aria-current]{background:var(--ink);color:var(--paper);} .admin-shell{display:block;} .admin-main{min-width:0;} .monitor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;} .monitor-grid td{overflow-wrap:anywhere;} .analytics-choice{position:fixed;bottom:20px;right:20px;max-width:380px;padding:24px;background:var(--paper);border:1px solid var(--line);z-index:100;box-shadow:0 6px 30px #0002;} .analytics-choice button{margin:12px 16px 0 0;text-decoration:underline;} @media(max-width:700px){.monitor-grid{grid-template-columns:1fr;}.analytics-choice{left:20px;}}
