:root {
  --brand:#277460;
  --ink:#1b3029;
  --muted:#758078;
  --bg:#f7f9f6;
  --line:#e1e8e0;
  --paper:#fff;
  --radius:16px;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--ink);
  background:var(--bg);
  font-synthesis:none
}

* {
  box-sizing:border-box
}

body {
  margin:0
}

button,input,select,textarea {
  font:inherit
}

a {
  color:inherit;
  text-decoration:none
}

button,a,input,select,textarea {
  touch-action:manipulation
}

button {
  cursor:pointer
}

button:disabled {
  opacity:.5;
  cursor:wait
}

[hidden] {
  display:none!important
}

.container {
  max-width:1140px;
  margin:0 auto;
  padding:0 28px
}

.store-header {
  background:rgba(255,255,255,.94);
  border-bottom:1px solid var(--line)
}

.header-inner {
  min-height:86px;
  display:flex;
  align-items:center;
  gap:36px
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:750;
  letter-spacing:-.03em;
  font-size:19px;
  white-space:nowrap
}

.brand-mark {
  display:grid;
  place-items:center;
  background:var(--brand);
  color:white;
  width:36px;
  height:36px;
  border-radius:11px;
  font-size:24px
}

.brand img {
  width:36px;
  height:36px;
  object-fit:contain
}

.header-inner nav {
  display:flex;
  gap:25px;
  font-size:14px
}

.header-inner nav a {
  padding:8px 0;
  color:var(--muted)
}

.header-inner nav a.active {
  color:var(--brand);
  border-bottom:2px solid var(--brand)
}

.header-actions {
  margin-left:auto;
  display:flex;
  gap:20px;
  align-items:center;
  font-size:14px
}

.cart-link span {
  background:#e7eee8;
  border-radius:30px;
  padding:2px 7px;
  font-size:11px
}

.button {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  border:1px solid transparent;
  border-radius:9px;
  background:var(--brand);
  color:white;
  padding:12px 18px;
  font-weight:600;
  font-size:14px
}

.button:hover {
  filter:brightness(.96)
}

.button.subtle {
  color:var(--ink);
  background:white;
  border-color:var(--line)
}

.button.danger {
  background:#b54545
}

.button.small {
  padding:8px 12px;
  font-size:12px
}

.button.wide {
  width:100%
}

.text-button {
  border:0;
  background:none;
  color:var(--brand);
  padding:5px;
  font-size:13px
}

.store-intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-top:68px;
  padding-bottom:52px
}

.eyebrow {
  color:var(--brand);
  font-size:10px;
  font-weight:750;
  letter-spacing:.18em;
  margin:0 0 12px
}

.store-intro h1 {
  font-size:36px;
  letter-spacing:-.045em;
  margin:0 0 16px;
  line-height:1.4
}

.store-intro p:not(.eyebrow),.gallery-intro p:not(.eyebrow) {
  color:var(--muted);
  font-size:15px;
  line-height:1.8
}

.intro-note {
  font-size:13px;
  max-width:230px;
  background:#eef3ec;
  border:1px solid var(--line);
  padding:20px;
  border-radius:12px;
  line-height:1.8
}

.intro-note>span:last-child {
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-left:14px
}

.note-dot {
  display:inline-block;
  width:6px;
  height:6px;
  background:var(--brand);
  border-radius:50%;
  margin-right:8px
}

.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:16px 0 22px
}

.section-heading h2 {
  font-size:25px;
  letter-spacing:-.02em;
  margin:0
}

.muted {
  font-size:13px;
  color:var(--muted)
}

.product-list {
  display:grid;
  gap:14px
}

.product {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:26px;
  display:flex;
  gap:22px;
  align-items:center
}

.product-emblem {
  flex-shrink:0;
  display:grid;
  place-items:center;
  border-radius:12px;
  width:66px;
  height:66px;
  background:#eff3e9;
  font-size:28px;
  color:var(--brand)
}

.product-copy {
  flex:1;
  min-width:0
}

.product h3 {
  font-size:17px;
  margin:0 0 10px
}

.product-description {
  font-size:13px;
  color:var(--muted);
  line-height:1.8;
  margin:0;
  white-space:pre-line;
  overflow-wrap:anywhere
}

.product-meta {
  margin-top:13px;
  display:flex;
  gap:12px;
  align-items:center;
  font-size:12px;
  color:var(--muted)
}

.product-buy {
  display:flex;
  gap:18px;
  align-items:center;
  flex-shrink:0
}

.price {
  font-size:23px;
  color:var(--ink);
  font-weight:700;
  white-space:nowrap
}

.price small {
  font-size:13px;
  margin-right:3px
}

.old-price {
  font-size:12px;
  color:var(--muted);
  text-decoration:line-through;
  font-weight:400;
  margin-left:8px
}

.product-buy input {
  width:66px;
  padding:10px 8px
}

.stock {
  border-radius:20px;
  background:#f0f5ee;
  padding:3px 8px;
  font-size:11px
}

.store-footer {
  margin-top:72px;
  padding-top:30px;
  padding-bottom:38px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:20px;
  color:var(--muted);
  font-size:12px
}

.store-footer strong {
  color:var(--ink);
  font-size:14px
}

.store-footer p {
  white-space:pre-line;
  line-height:1.8
}

.panel {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:26px;
  margin-bottom:20px
}

.panel h3 {
  font-size:17px;
  margin-top:0
}

.empty,.loading {
  text-align:center;
  color:var(--muted);
  padding:70px 25px;
  background:var(--paper);
  border:1px dashed var(--line);
  border-radius:var(--radius);
  font-size:14px
}

.empty-icon {
  font-size:38px;
  color:var(--brand)
}

.empty p {
  line-height:1.8
}

.notice {
  padding:15px 18px;
  background:#f0f5ed;
  border-radius:10px;
  font-size:13px;
  line-height:1.8;
  margin-bottom:20px;
  white-space:pre-line
}

.cart-row {
  display:flex;
  align-items:center;
  gap:20px;
  padding:18px 0;
  border-bottom:1px solid var(--line)
}

.cart-row>div:first-child {
  flex:1
}

.cart-row h3 {
  font-size:15px;
  margin:0 0 8px
}

.cart-total {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:22px;
  padding-top:24px
}

.cart-total .price {
  font-size:25px
}

.badge {
  display:inline-block;
  padding:4px 9px;
  background:#edf0f2;
  border-radius:6px;
  font-size:11px;
  white-space:nowrap;
  font-weight:500;
  color:#626d75
}

.badge.paid,.badge.delivered,.badge.active,.badge.available {
  background:#e7f3ec;
  color:#277451
}

.badge.pending,.badge.reserved,.badge.exception {
  background:#fff2d9;
  color:#957123
}

.badge.expired,.badge.banned,.badge.suspended {
  background:#fae9e8;
  color:#b25a54
}

.order-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
  margin-bottom:14px
}

.order-number {
  font-size:13px;
  overflow-wrap:anywhere;
  font-family:ui-monospace,monospace
}

.order-card .muted {
  margin-top:12px
}

.order-card .badges {
  display:flex;
  gap:8px;
  margin-top:12px
}

.order-card .order-right {
  text-align:right;
  display:grid;
  gap:12px;
  justify-items:end
}

.detail-grid {
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:20px
}

.detail-row {
  display:flex;
  justify-content:space-between;
  gap:20px;
  line-height:1.8;
  font-size:13px;
  padding:9px 0;
  border-bottom:1px solid var(--line)
}

.detail-row:last-child {
  border:0
}

.detail-row span:first-child {
  color:var(--muted);
  flex-shrink:0
}

.detail-row strong {
  overflow-wrap:anywhere;
  text-align:right
}

.code-list {
  display:grid;
  gap:10px
}

.code {
  border:1px solid var(--line);
  padding:13px;
  border-radius:8px;
  background:var(--bg);
  font-family:ui-monospace,monospace;
  font-size:13px;
  overflow-wrap:anywhere;
  white-space:pre-wrap
}

.announcement h3 {
  font-size:18px
}

.announcement .content {
  white-space:pre-wrap;
  line-height:1.9;
  font-size:14px;
  overflow-wrap:anywhere
}

.account-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px
}

.field {
  display:grid;
  gap:8px;
  margin-bottom:16px;
  font-size:13px
}

.field label {
  font-weight:600
}

.field small {
  color:var(--muted);
  font-size:12px;
  line-height:1.6
}

input,textarea,select {
  color:var(--ink);
  background:white;
  width:100%;
  border:1px solid var(--line);
  padding:11px 13px;
  border-radius:8px;
  outline:none
}

textarea {
  resize:vertical;
  min-height:100px
}

input:focus,select:focus,textarea:focus {
  border-color:var(--brand);
  box-shadow:0 0 0 3px #27746012
}

:focus-visible {
  outline:2px solid var(--brand);
  outline-offset:4px
}

.form-actions {
  display:flex;
  align-items:center;
  gap:14px;
  margin-top:22px
}

dialog {
  border:0;
  border-radius:18px;
  padding:0;
  width:min(520px,calc(100% - 32px));
  max-height:90vh;
  color:var(--ink);
  box-shadow:0 24px 90px #162e2933
}

dialog::backdrop {
  background:#12231d66;
  backdrop-filter:blur(3px)
}

.dialog-header {
  padding:22px 26px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center
}

.dialog-header h2 {
  font-size:19px;
  margin:0
}

.icon-button {
  border:0;
  background:none;
  font-size:26px;
  color:var(--muted);
  padding:0 5px
}

.dialog-content {
  padding:24px 26px
}

.dialog-switch {
  text-align:center;
  font-size:13px;
  margin-top:18px;
  color:var(--muted)
}

#toast {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  background:var(--ink);
  color:white;
  padding:14px 22px;
  border-radius:10px;
  box-shadow:0 8px 30px #162e2930;
  z-index:100;
  max-width:calc(100% - 32px);
  font-size:13px
}

#toast[data-type=error] {
  background:#a94442
}

.announcement-strip {
  display:none
}

.gallery-intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
  padding-top:60px;
  padding-bottom:65px
}

.gallery-intro h1 {
  font-size:52px;
  line-height:1.25;
  font-weight:650;
  letter-spacing:-.065em;
  margin:0 0 20px
}

.gallery-intro .button {
  margin-top:12px
}

.hero-art {
  position:relative;
  width:440px;
  height:320px;
  display:grid;
  place-items:center;
  background:#eee9df;
  border-radius:28px;
  overflow:hidden
}

.hero-art:before {
  content:"";
  position:absolute;
  border:1px solid #dcd4c1;
  border-radius:50%;
  width:400px;
  height:400px;
  left:-170px;
  top:-160px
}

.art-window {
  position:relative;
  background:#fffdf7;
  border-radius:14px;
  width:250px;
  padding:24px;
  transform:rotate(-6deg);
  box-shadow:8px 16px 0 #dcd4bf
}

.art-window>span {
  letter-spacing:.12em;
  font-size:9px;
  color:#8c897e
}

.art-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:20px 0
}

.art-grid i {
  display:grid;
  place-items:center;
  background:#e5eadb;
  border-radius:12px;
  height:70px;
  font-size:40px;
  font-style:normal;
  color:var(--brand)
}

.art-grid i:nth-child(2) {
  background:#f5e2c1
}

.art-grid i:nth-child(3) {
  background:#dbe7ed
}

.art-grid i:nth-child(4) {
  background:#eddcd3
}

.art-window small {
  font-size:10px;
  color:#888579
}

.art-tag {
  position:absolute;
  bottom:30px;
  right:25px;
  background:var(--brand);
  color:white;
  padding:10px 17px;
  border-radius:40px;
  transform:rotate(7deg);
  font-size:12px
}

body[data-theme=gallery] {
  --bg:#fbf9f4;
  --line:#e9e5da;
  --ink:#303c2e;
  --radius:18px
}

body[data-theme=gallery] .announcement-strip {
  display:block;
  background:var(--brand);
  color:white;
  padding:9px;
  text-align:center;
  font-size:11px;
  letter-spacing:.09em
}

body[data-theme=gallery] .store-header {
  background:transparent
}

body[data-theme=gallery] .product-list {
  grid-template-columns:repeat(3,1fr);
  gap:22px
}

body[data-theme=gallery] .product {
  display:block;
  padding:22px
}

body[data-theme=gallery] .product-emblem {
  width:100%;
  height:120px;
  margin-bottom:22px;
  font-size:45px;
  background:#f0ede4
}

body[data-theme=gallery] .product-description {
  min-height:68px
}

body[data-theme=gallery] .product-buy {
  flex-wrap:wrap;
  margin-top:22px;
  gap:12px
}

body[data-theme=gallery] .product-buy .price {
  width:100%;
  font-size:22px
}

body[data-theme=gallery] .product-buy .button {
  flex:1
}

body[data-theme=gallery] .product h3 {
  font-size:16px
}

@media(max-width:950px) {
  .header-inner {
    gap:20px;
    flex-wrap:wrap;
    padding-top:18px;
    padding-bottom:15px
  }
  .header-inner nav {
    order:3;
    width:100%;
    justify-content:center
  }
  .header-actions {
    gap:12px
  }
  .product-buy {
    flex-wrap:wrap;
    justify-content:flex-end;
    max-width:200px
  }
  .product-buy .price {
    width:100%;
    text-align:right
  }
  .gallery-intro h1 {
    font-size:42px
  }
  .hero-art {
    width:330px
  }
  body[data-theme=gallery] .product-list {
    grid-template-columns:repeat(2,1fr)
  }
}

@media(max-width:600px) {
  .container {
    padding-left:18px;
    padding-right:18px
  }
  .brand {
    font-size:15px
  }
  .brand-mark {
    width:30px;
    height:30px;
    font-size:20px
  }
  .header-actions {
    font-size:12px;
    gap:8px
  }
  .header-actions .button {
    font-size:11px;
    padding:8px 10px
  }
  .header-inner nav {
    gap:30px;
    font-size:13px
  }
  .store-intro {
    padding-top:35px;
    padding-bottom:25px;
    display:block
  }
  .store-intro h1 {
    font-size:27px
  }
  .intro-note {
    margin-top:22px;
    max-width:none;
    padding:12px
  }
  .intro-note>span:last-child {
    display:inline;
    margin-left:12px
  }
  .product {
    padding:19px;
    flex-wrap:wrap;
    gap:14px
  }
  .product-emblem {
    width:46px;
    height:46px;
    font-size:22px
  }
  .product-buy {
    width:100%;
    max-width:none;
    justify-content:flex-start;
    border-top:1px solid var(--line);
    padding-top:16px
  }
  .product-buy .price {
    width:auto;
    text-align:left;
    flex:1;
    font-size:21px
  }
  .product-buy input {
    width:58px
  }
  .product-buy .button {
    padding:11px 12px;
    font-size:12px
  }
  .section-heading h2 {
    font-size:21px
  }
  .store-footer {
    margin-top:45px;
    display:block
  }
  .store-footer>span {
    display:block;
    margin-top:15px
  }
  .detail-grid,.account-grid {
    grid-template-columns:1fr
  }
  .panel {
    padding:20px
  }
  .cart-row {
    gap:12px;
    flex-wrap:wrap
  }
  .cart-total {
    gap:14px;
    flex-wrap:wrap
  }
  .order-card {
    padding:18px;
    align-items:flex-start
  }
  .order-number {
    font-size:11px
  }
  .gallery-intro {
    display:block;
    padding-top:35px;
    padding-bottom:30px
  }
  .gallery-intro h1 {
    font-size:38px
  }
  .hero-art {
    margin-top:30px;
    width:100%;
    height:240px
  }
  .art-window {
    width:210px;
    padding:18px
  }
  .art-grid {
    margin:12px 0
  }
  .art-grid i {
    height:48px;
    font-size:30px
  }
  body[data-theme=gallery] .product-list {
    grid-template-columns:1fr
  }
  body[data-theme=gallery] .product-description {
    min-height:0
  }
  body[data-theme=gallery] .product-emblem {
    height:100px
  }
  body[data-theme=gallery] .product-buy .price {
    width:auto
  }
  .detail-row {
    gap:10px
  }
  .section-heading {
    align-items:flex-start
  }
}
