:root {
  color-scheme: light;
  --ink: #253a33;
  --muted: #718078;
  --green: #42634f;
  --green-dark: #304d3b;
  --sage: #e8eee7;
  --cream: #f7f5ef;
  --paper: #fffefa;
  --line: #e4e5dc;
  --gold: #b99959;
  --error: #9f3e36;
  --shadow: 0 18px 45px rgb(41 62 51 / 8%);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", "Noto Sans TC", sans-serif;
  line-height: 1.7;
}
a { color: var(--green-dark); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(24px, calc((100vw - 1160px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-family: Georgia, serif;
  font-size: 15px;
}
.header-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.container { width: min(1160px, calc(100% - 40px)); min-height: calc(100vh - 145px); margin: 0 auto; }
.site-footer { padding: 24px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 13px; }
.hero {
  min-height: 480px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 44px;
  padding: 54px 6%;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
  background: #e9eee6;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .18em; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin-bottom: 18px; font-family: Georgia, "Noto Sans TC", serif; font-size: clamp(46px, 7vw, 76px); font-weight: 500; line-height: 1.1; letter-spacing: -.04em; }
.hero h1 span { color: var(--green); }
.hero-lead { max-width: 430px; margin-bottom: 28px; color: #58685f; font-size: 18px; }
.hero-art { position: relative; min-height: 400px; }
.hero-art > img { position: absolute; top: 12px; left: 12%; width: 70%; }
.hero-art > .hero-easter { top: 95px; left: 38%; width: 62%; transform: rotate(9deg); }
.anniversary-seal {
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 5%;
  display: grid;
  width: 88px;
  height: 88px;
  place-content: center;
  border: 1px solid #c9b782;
  border-radius: 50%;
  background: #f7f3e8;
  color: #526654;
  text-align: center;
  font-size: 10px;
  line-height: 1.2;
}
.anniversary-seal strong { font-family: Georgia, serif; font-size: 24px; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { border-color: #cdd5ca; background: transparent; color: var(--green-dark); }
.intro-section { max-width: 1000px; margin: 78px auto; }
.intro-section > h2 { margin-bottom: 28px; font-family: Georgia, "Noto Sans TC", serif; font-size: clamp(28px, 4vw, 40px); font-weight: 500; }
.design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.design-card { display: flex; align-items: center; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.design-card img { width: 42%; max-width: 190px; }
.design-card h3 { margin: 8px 0; font-size: 19px; }
.design-card p { margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.design-card strong { font-family: Georgia, serif; font-size: 20px; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 20px; background: #f0e9dc; color: #776542; font-size: 11px; }
.tag.green { background: #e7eee7; color: var(--green); }
.bundle-banner { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 32px; padding: 22px 28px; border-radius: 12px; background: #e9eee6; }
.bundle-banner h3 { margin: 0 0 4px; }
.bundle-banner p { margin: 0; color: var(--muted); font-size: 14px; }
.bundle-banner > strong { font-family: Georgia, serif; font-size: 32px; }
.center { text-align: center; }
.page-heading { padding: 46px 0 20px; }
.page-heading h1, .success-card h1, .login-card h1 { margin-bottom: 8px; font-family: Georgia, "Noto Sans TC", serif; font-size: 38px; font-weight: 500; }
.page-heading > p:last-child { color: var(--muted); }
.order-form, .form-section, .settings-card, .login-card, .success-card, .api-help {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.order-form { margin: 18px 0 60px; padding: 28px; box-shadow: var(--shadow); }
.form-section { margin-bottom: 22px; padding: 24px; }
.form-section h2 { margin-bottom: 16px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label, .login-card label, .settings-card label, .bulk-toolbar label, .rule-form label {
  display: grid;
  gap: 6px;
  color: #41544a;
  font-size: 14px;
  font-weight: 600;
}
.form-grid .wide { grid-column: 1 / -1; }
.required { color: var(--error); }
input:not([type="checkbox"]), select, textarea {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #d8ddd5;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgb(66 99 79 / 13%); }
.field-hint, .deadline-note { color: var(--muted); font-size: 13px; }
.field-hint { margin: 12px 0 0; }
.deadline-note { margin: 12px 0 0; }
.quantity-table { min-width: 650px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
thead th { background: #f6f7f2; color: #617168; font-size: 12px; font-weight: 600; }
.quantity-table tbody th { min-width: 100px; font-weight: 600; }
.quantity-cell { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.quantity-cell input { min-width: 70px; }
.table-scroll { overflow-x: auto; }
.order-summary { display: flex; align-items: center; justify-content: flex-end; gap: 22px; padding: 16px 4px 2px; }
.order-summary strong { margin-right: auto; }
.order-summary > span:last-child, .total-line strong { color: var(--green-dark); font-family: Georgia, serif; font-size: 22px; font-weight: 700; }
.total-line { margin: 14px 0 0; text-align: right; }
.notice { margin: 22px 0; padding: 13px 16px; border: 1px solid #cbdaca; border-radius: 7px; background: #eef5ed; color: #35553e; }
.notice.error { border-color: #eccdc7; background: #fff1ee; color: var(--error); }
.notice.success { margin-top: 14px; }
.confirm-form { margin-bottom: 60px; }
.confirm-check { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; }
.confirm-check input { margin-top: 7px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.details-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.details-grid dt { color: var(--muted); }
.details-grid dd { margin: 0; font-weight: 600; }
.success-card, .login-card { max-width: 700px; margin: 55px auto; padding: 38px; text-align: center; }
.success-icon { display: grid; width: 60px; height: 60px; place-items: center; margin: 0 auto 20px; border-radius: 50%; background: #e6f0e5; color: var(--green); font-size: 31px; }
.login-card { max-width: 430px; text-align: left; }
.login-card form { display: grid; gap: 16px; }
.admin-nav { display: flex; align-items: center; gap: 22px; margin: 18px 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-nav a, .text-button { font-size: 14px; font-weight: 600; text-decoration: none; }
.admin-nav form { margin-left: auto; }
.text-button { padding: 0; border: 0; background: none; color: var(--green); cursor: pointer; }
.danger-text { color: var(--error); }
.reference-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 18px 0 55px; }
.reference-list-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.reference-list-card h2 { margin-bottom: 16px; font-size: 20px; }
.reference-add-form, .reference-edit-form { display: grid; align-items: end; gap: 10px; }
.reference-add-form { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 18px; }
.reference-add-form label { display: grid; gap: 6px; color: #41544a; font-size: 14px; font-weight: 600; }
.reference-edit-form { grid-template-columns: minmax(0, 1fr) auto; }
.reference-edit-form .button { min-height: 40px; padding: 7px 12px; font-size: 13px; }
.reference-list-card td:last-child { width: 1%; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.settings-card { display: grid; gap: 18px; max-width: 760px; margin: 15px 0 55px; padding: 25px; }
.rule-form { grid-template-columns: repeat(3, 1fr); align-items: end; max-width: none; }
.search-bar { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; margin: 18px 0; }
.bulk-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 12px; }
.bulk-toolbar label { min-width: 170px; }
.bulk-toolbar .button { min-height: 43px; padding: 8px 14px; font-size: 13px; }
.admin-table { min-width: 980px; }
.admin-table small { color: var(--muted); font-size: 11px; }
.admin-table a { font-size: 13px; font-weight: 600; }
.pagination { display: flex; justify-content: flex-end; gap: 18px; margin: 16px 0; }
.pagination span { margin-right: auto; color: var(--muted); font-size: 13px; }
.pagination a { font-size: 13px; font-weight: 600; }
.status-pill { display: inline-block; padding: 3px 8px; border-radius: 16px; background: #f5edda; color: #7c632d; white-space: nowrap; font-size: 12px; }
.status-paid { background: #e7efe6; color: #41634a; }
.status-picked_up { background: #e8edf4; color: #4c6178; }
.api-help { margin: 34px 0; padding: 22px; }
.api-help h2 { margin-bottom: 5px; font-size: 18px; }
.api-help code, .api-help pre { overflow-wrap: anywhere; color: #49604f; }

@media (max-width: 760px) {
  .container { width: min(100% - 24px, 600px); }
  .site-header { min-height: 64px; padding: 10px 14px; }
  .brand { gap: 8px; font-size: 13px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { grid-template-columns: 1fr; gap: 0; min-height: 0; padding: 40px 24px 14px; }
  .hero h1 { font-size: 54px; }
  .hero-art { min-height: 320px; }
  .hero-art > img { top: 0; left: 6%; width: 68%; }
  .hero-art > .hero-easter { top: 54px; left: 38%; width: 58%; }
  .anniversary-seal { top: 4px; right: 2%; width: 75px; height: 75px; }
  .intro-section { margin: 52px auto; }
  .design-grid { grid-template-columns: 1fr; }
  .design-card img { width: 38%; }
  .order-form { padding: 14px; }
  .form-section { padding: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .page-heading { padding-top: 34px; }
  .page-heading h1, .success-card h1, .login-card h1 { font-size: 32px; }
  .reference-lists { grid-template-columns: 1fr; }
  .rule-form { grid-template-columns: 1fr; }
  .search-bar { grid-template-columns: 1fr; }
  .admin-nav { flex-wrap: wrap; gap: 12px 18px; }
  .admin-nav form { margin-left: 0; }
  .success-card, .login-card { padding: 26px 18px; }
}
