:root {
  --background: #f5f6f8;
  --paper: #ffffff;
  --text: #20242d;
  --muted: #576273;
  --line: #d8dde6;
  --accent: #3159c9;
  --accent-light: #edf2ff;
  --error: #a82424;
  --radius: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; background: #edf0f5; color: #586171; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #a55200; outline-offset: 3px; }
h1, h2, h3, p, figure { margin-top: 0; }
h1 { font-size: clamp(2rem, 3.8vw, 3.5rem); line-height: 1.12; letter-spacing: -.045em; margin-bottom: 24px; overflow-wrap: anywhere; }
h2 { font-size: 1.65rem; line-height: 1.22; letter-spacing: -.03em; margin-bottom: 20px; }
h3 { font-size: 1.08rem; line-height: 1.35; margin-bottom: 10px; }
section { margin-bottom: 44px; }
img { max-width: 100%; height: auto; }
.container { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.page-main { padding-block: 36px 60px; min-height: 60vh; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 92px; }
.brand { font-size: 1.65rem; font-weight: 800; letter-spacing: -.055em; color: var(--text); text-decoration: none; white-space: nowrap; }
.main-nav { display: flex; justify-content: center; align-items: center; flex: 1; gap: 20px; }
.main-nav a { text-decoration: none; color: var(--text); padding-block: 12px; }
.main-nav a:hover { color: var(--accent); }
.cart-link { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; text-decoration: none; min-height: 44px; white-space: nowrap; }
.cart-link span { background: var(--accent-light); min-width: 24px; border-radius: 20px; text-align: center; color: var(--accent); }
.menu-toggle { display: none; }
.button, .menu-toggle { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--text); padding: 10px 18px; font-weight: 600; text-decoration: none; text-align: center; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button:hover:not(:disabled) { border-color: var(--accent); }
.text-button { min-height: 44px; padding: 8px 4px; color: var(--accent); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 22px; }
.lead { max-width: 680px; font-size: 1.12rem; color: var(--muted); }
.eyebrow { display: block; font-size: .77rem; text-transform: uppercase; font-weight: 750; letter-spacing: .1em; color: var(--accent); margin-bottom: 12px; }
.muted, .field-help { color: var(--muted); }
.field-help { font-size: .86rem; margin: 8px 0 16px; }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.hero > div:first-child { padding: 48px; }
.hero h1 { font-size: clamp(2rem, 3.2vw, 3rem); }
.hero-aside { background: #e8edf7; display: grid; place-content: center; text-align: center; padding: 32px; color: #40516e; }
.hero-disc { display: block; width: 180px; height: 180px; margin: 0 auto 28px; border-radius: 50%; background: radial-gradient(circle, #e8edf7 0 9%, #c9d4ea 9% 12%, #f7f9ff 12% 43%, #c7d2e9 72%, #f9fbff); box-shadow: 0 15px 30px #203c7215; }
.category-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-block: 24px 38px; }
.category-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 70px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; font-weight: 650; color: var(--text); }
.category-links a span { color: var(--accent); font-size: 1.4rem; }
.category-links.compact a { min-height: 52px; padding: 12px 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-block: 34px 20px; }
.section-heading h2 { margin: 0; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 24px; }
.two-columns, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.two-columns .panel { margin-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; }
.steps li { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.steps li > span { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent); margin-bottom: 18px; }
.steps p { color: var(--muted); margin-bottom: 0; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { min-width: 0; display: flex; flex-direction: column; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-photo { display: grid; place-items: center; background: #edf0f5; aspect-ratio: 1; color: var(--muted); text-decoration: none; text-align: center; overflow: hidden; }
.product-photo img { width: 100%; height: 100%; object-fit: contain; }
.product-card-body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.product-card h3 { margin-block: 14px 8px; }
.product-card h3 a { color: var(--text); text-decoration: none; }
.product-card p.muted { font-size: .84rem; }
.product-card .price { margin-top: auto; padding-top: 8px; }
.product-card .button { width: 100%; }
.price { font-size: 1.35rem; font-weight: 750; margin-bottom: 16px; }
.large-price { font-size: 2rem; margin-top: 20px; }
.status { display: inline-block; max-width: fit-content; border: 1px solid #c5d0e6; background: #eff3fb; color: #31476e; border-radius: 30px; padding: 3px 10px; font-size: .8rem; }
.breadcrumbs { font-size: .86rem; color: var(--muted); margin-bottom: 24px; }
.breadcrumbs a { margin-right: 5px; }
.catalog-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; }
.catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filters { padding: 20px; }
.filters h2 { font-size: 1.1rem; }
.filters .two-columns { gap: 10px; }
.filters .button { width: 100%; margin-bottom: 10px; }
label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: 8px; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { width: 100%; min-height: 44px; border: 1px solid #a4adbd; border-radius: 9px; padding: 10px 12px; background: white; color: var(--text); }
input[type=checkbox] { width: 21px; height: 21px; accent-color: var(--accent); flex: none; }
textarea { resize: vertical; }
.field { margin-bottom: 18px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.form-grid { gap: 0 22px; }
.check-label { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 400; }
.checkbox-field label, .delete-control label { min-height: 44px; display: inline-flex; align-items: center; font-weight: 400; }
.consent-field { margin-block: 24px; }
.notice { border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-light); color: #30446b; padding: 16px 18px; margin-block: 18px; }
.notice p:last-child { margin-bottom: 0; }
.error-summary { border: 1px solid #d6a4a4; border-left: 4px solid var(--error); background: #fff5f5; padding: 18px; margin-bottom: 24px; border-radius: 10px; }
.error-summary h2 { font-size: 1.1rem; }
.errorlist { list-style: none; padding: 0; color: var(--error); font-size: .9rem; }
.field-error { color: var(--error); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pagination a, .pagination span { display: grid; place-content: center; min-width: 44px; min-height: 44px; padding: 8px; border-radius: 9px; }
.pagination a { border: 1px solid var(--line); text-decoration: none; background: white; }
.pagination a[aria-current] { background: var(--accent); color: white; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-bottom: 40px; }
.gallery-main { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 12px; aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.gallery-thumbs button { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 6px; width: 70px; height: 70px; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery-dialog { border: 0; border-radius: 18px; width: min(1000px, 95vw); max-height: 92vh; padding: 20px; }
.gallery-dialog::backdrop { background: #18202ed9; }
.gallery-dialog img { display: block; object-fit: contain; max-height: 72vh; margin: auto; }
.dialog-close { display: block; min-height: 44px; margin: 0 0 12px auto; padding: 8px 16px; border: 1px solid var(--line); background: white; border-radius: 9px; }
.properties { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0, 1fr); margin-block: 24px; }
.properties dt, .properties dd { padding: 11px 0; margin: 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.properties dt { color: var(--muted); padding-right: 16px; }
.quantity-input { max-width: 80px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; border-bottom: 1px solid var(--line); padding-block: 20px; }
.cart-line:first-child { padding-top: 0; }
.cart-line h2 { font-size: 1.1rem; margin-bottom: 8px; }
.cart-line h2 a { color: var(--text); }
.quantity-form { display: flex; gap: 8px; }
.quantity-form input { max-width: 80px; }
.total { display: flex; justify-content: space-between; gap: 16px; font-size: 1.2rem; }
.inquiry-form { max-width: 960px; }
.buyback-item { border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin: 24px 0; min-width: 0; }
.buyback-item legend { font-weight: 700; padding-inline: 8px; }
.item-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.order-control { max-width: 140px; }
.photo-uploader { border: 1px dashed #8e9bb1; border-radius: 12px; padding: 18px; margin-block: 20px; }
.photo-status { font-size: .88rem; color: var(--muted); margin-top: 12px; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.photo-preview { max-width: 150px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: white; overflow-wrap: anywhere; }
.photo-preview img { height: 90px; object-fit: contain; width: 100%; }
.photo-preview button { min-height: 44px; width: 100%; background: white; border: 0; color: var(--accent); }
progress { width: 100%; height: 16px; accent-color: var(--accent); }
.empty, .result-panel { padding: 40px; text-align: center; }
.public-number { color: var(--accent); font-size: clamp(1.4rem, 4vw, 2.5rem); font-weight: 750; overflow-wrap: anywhere; }
.result-panel { max-width: 800px; margin: 40px auto; }
.result-panel .actions { justify-content: center; }
.prose { max-width: 900px; overflow-wrap: anywhere; }
details { border-bottom: 1px solid var(--line); padding: 15px 0; }
details:last-child { border-bottom: 0; }
summary { cursor: pointer; min-height: 44px; font-weight: 600; display: list-item; padding-top: 8px; }
blockquote { margin-inline: 0; }
.site-footer { background: white; border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-size: 1rem; color: var(--text); }
.seller-details { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -80px; left: 20px; background: white; padding: 12px; z-index: 20; }
.skip-link:focus { top: 10px; }
.js-only { display: none; }
.js-ready .js-only { display: inline-flex; }
.js-ready .delete-control, .js-ready .order-control { display: none; }
@media (max-width: 1050px) {
  .main-nav { gap: 12px; font-size: .9rem; }
  .header-inner { gap: 18px; }
  .hero > div:first-child { padding: 32px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-layout { grid-template-columns: 225px minmax(0, 1fr); gap: 20px; }
  .product-layout { gap: 24px; }
}
@media (max-width: 800px) {
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 100%; left: 16px; right: 16px; z-index: 10; background: white; padding: 12px 20px; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 15px 25px #202b441a; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-aside { display: none; }
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { grid-row: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 78px; gap: 8px; }
  .brand { font-size: 1.4rem; }
  .menu-toggle, .cart-link { padding: 8px 10px; font-size: .85rem; }
  .cart-link { gap: 5px; }
  .cart-link span { min-width: 20px; }
  .page-main { padding-top: 25px; }
  h2 { font-size: 1.4rem; }
  .hero > div:first-child { padding: 26px; }
  .hero h1 { font-size: 2rem; }
  .hero .actions .button { flex: 1; }
  .category-links, .steps, .two-columns, .form-grid, .catalog-layout, .product-layout, .footer-grid { grid-template-columns: 1fr; }
  .category-links { gap: 10px; }
  .category-links a { min-height: 55px; padding: 14px 18px; }
  .panel { padding: 20px; }
  .product-grid { gap: 12px; }
  .product-card-body { padding: 12px; }
  .product-card h3 { font-size: .96rem; }
  .product-card p.muted { font-size: .78rem; }
  .product-card .button { padding: 9px 6px; font-size: .85rem; }
  .product-card .price { font-size: 1.15rem; }
  .filters .two-columns { grid-template-columns: 1fr 1fr; }
  .field.full { grid-column: auto; }
  .cart-line { grid-template-columns: 1fr; gap: 8px; }
  .cart-line > div:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .cart-line .price { width: 100%; }
  .cart-line .quantity-form { flex: 1; }
  .buyback-item { padding: 16px; }
  .photo-uploader { padding: 14px; }
  .inquiry-form { padding: 18px; }
  .inquiry-form > .button.primary { width: 100%; }
  .footer-grid > div:first-child { grid-column: auto; }
  .section-heading { align-items: start; }
  .section-heading a { font-size: .88rem; }
  .empty, .result-panel { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
