:root {
  --green: #2e7d32;
  --green-dark: #1f5a23;
  --green-soft: #e7f1e4;
  --straw: #dce775;
  --ink: #1b1f1a;
  --muted: #5f6a5d;
  --line: #e2e6df;
  --bg: #ffffff;
  --bg-alt: #f6f7f3;
  --danger: #b3261e;
  --radius: 12px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.tiny { font-size: 0.85rem; }
.tiny svg, p svg { width: 1em; height: 1em; vertical-align: -0.15em; }
.lead { font-size: 1.1rem; color: #35402f; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--green); margin-bottom: 0.5rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; }
.skip:focus { left: 0; z-index: 1000; }
code { background: var(--bg-alt); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand img { border-radius: 9px; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand small { font-size: 0.72rem; font-weight: 600; color: var(--green); letter-spacing: 0.02em; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.95rem; font-weight: 600; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--green); }
.cart-link { position: relative; display: inline-flex; align-items: center; }
.cart-link svg { width: 24px; height: 24px; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--green); color: #fff; font-size: 0.7rem; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 700; }
@media (max-width: 560px) { .brand span { display: none; } .site-nav { gap: 0.9rem; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.25rem; border-radius: 10px; font-weight: 700; font-size: 0.95rem; text-decoration: none; cursor: pointer; border: 2px solid var(--ink); color: var(--ink); background: #fff; line-height: 1.2; transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost { background: transparent; }
.btn-light { background: #fff; border-color: #fff; color: var(--green-dark); }
.btn-lg { padding: 0.9rem 1.5rem; font-size: 1.05rem; }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.85rem; border-radius: 8px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.25rem 0; }
.link { font-weight: 600; }

/* hero */
.hero { background: linear-gradient(180deg, var(--green-soft), #fff 70%); padding: 3rem 0 2rem; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hero-media img { border-radius: var(--radius); box-shadow: 0 24px 60px rgba(31, 90, 35, 0.22); max-height: 560px; width: auto; margin: 0 auto; }
.hero-points { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-points svg { width: 18px; height: 18px; color: var(--green); }
@media (max-width: 820px) { .hero-inner { grid-template-columns: 1fr; } .hero-media img { max-height: 380px; } }

/* sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--green-dark); color: #fff; }
.section-dark h2 { color: #fff; }
.section-dark p { color: #d6e5d4; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head h2, .section-head h1 { margin: 0; }
.page-head { margin-bottom: 2rem; max-width: 820px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.split figure { margin: 0; }
.split img { border-radius: var(--radius); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* grids and cards */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card.pad { padding: 1.5rem; }
.card.pad .btn { margin-top: auto; align-self: flex-start; }
.card.pad p { color: var(--muted); font-size: 0.95rem; }
.product-card { text-decoration: none; color: inherit; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.product-card:hover { box-shadow: 0 14px 34px rgba(27, 31, 26, 0.12); transform: translateY(-2px); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 0.75rem; left: 0.75rem; background: var(--straw); color: var(--ink); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.25rem 0.55rem; border-radius: 6px; }
.badge.inline { position: static; vertical-align: middle; font-size: 0.6em; margin-left: 0.4rem; }
.card-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card-body h3 { margin: 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.75rem; }
.price { font-weight: 800; font-size: 1.2rem; }
.price.sold-out { color: var(--muted); font-size: 1rem; }
.icon { width: 44px; height: 44px; color: var(--green); margin-bottom: 0.75rem; }
.icon svg { width: 100%; height: 100%; }
.icon.big { width: 64px; height: 64px; background: var(--green-soft); border-radius: 50%; padding: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.chip { display: inline-block; padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.9rem; text-transform: capitalize; }
.chip.active, .chip:hover { background: var(--green); border-color: var(--green); color: #fff; }
.notice { background: #fff8d6; border: 1px solid #f0e2a0; border-radius: 10px; padding: 0.85rem 1rem; margin: 1rem 0; font-size: 0.95rem; }
.notice.care { margin-top: 2rem; }
.error { color: var(--danger); font-weight: 600; }

/* steps and features */
.steps { counter-reset: step; }
.step { background: var(--bg-alt); border-radius: var(--radius); padding: 1.5rem; }
.step-n { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 0.75rem; }
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.feature-grid { margin-top: 1.5rem; }
.feature { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
.feature ul { padding-left: 1.1rem; margin: 0; color: #35402f; }
.feature li { margin-bottom: 0.4rem; }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; align-items: start; }
.shots figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem; }
.shots figure.wide { grid-column: span 2; }
.shots img { border-radius: 8px; max-height: 440px; width: auto; margin: 0 auto 0.6rem; }
.shots figcaption { font-size: 0.85rem; color: var(--muted); }
.shots figcaption b { display: block; color: var(--green); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; }
@media (max-width: 900px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .shots { grid-template-columns: 1fr; } .shots figure.wide { grid-column: span 1; } }

/* product page */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 820px) { .product-layout { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 1; background: var(--bg-alt); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 2px solid var(--line); padding: 0; background: var(--bg-alt); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--green); }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.crumbs a { color: var(--muted); }
.price-row { margin: 0.5rem 0 1rem; font-size: 1.1rem; }
.features { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.features li { display: flex; gap: 0.5rem; align-items: flex-start; margin-bottom: 0.4rem; }
.features svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 0.2rem; }
.buy-box { background: var(--bg-alt); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.qty-label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 42px; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--green-soft); }
.qty input { width: 56px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-size: 1rem; font-family: inherit; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-box .cta-row { margin-bottom: 0.25rem; }
.ship-note { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.9rem; color: var(--muted); margin: 1rem 0 1.5rem; }
.ship-note svg { width: 22px; height: 22px; flex: none; color: var(--green); }
.prose p { color: #35402f; }
.prose h2 { margin-top: 1.75rem; font-size: 1.35rem; }
.works-with h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* cart */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.cart-table td { padding: 0.9rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table .thumb-cell { width: 84px; }
.cart-table .thumb-cell img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--bg-alt); }
.cart-table .num { text-align: right; white-space: nowrap; font-weight: 700; }
.cart-table .remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 0.85rem; text-decoration: underline; padding: 0; font-family: inherit; }
.cart-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; font-weight: 800; padding: 0.75rem 0.5rem; }
.cart-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; margin: 1rem 0; }
.order-summary { margin: 1.5rem 0; }
.order-table { width: 100%; border-collapse: collapse; }
.order-table td { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.order-table .num { text-align: right; }
.order-table .total td { font-weight: 800; border-bottom: 0; }

/* gate */
.gate { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: linear-gradient(180deg, var(--green-soft), #fff); }
.gate-card { max-width: 520px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2.5rem 2rem; text-align: center; box-shadow: 0 24px 60px rgba(31, 90, 35, 0.12); }
.gate-card img { margin: 0 auto 1rem; border-radius: 18px; }
.gate-form { margin-top: 1.5rem; text-align: left; }
.gate-form label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; }
.gate-row { display: flex; gap: 0.5rem; }
.gate-row input { flex: 1; font-size: 1rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; }

/* admin */
.table-wrap { overflow-x: auto; }
.orders { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.orders th, .orders td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.orders .num { text-align: right; white-space: nowrap; }
.orders tr.done { opacity: 0.6; }

/* footer */
.site-footer { background: var(--ink); color: #c9d1c6; margin-top: 2rem; padding: 2.5rem 0 1.5rem; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: #fff; margin-bottom: 0.6rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-grid a { display: block; color: #c9d1c6; text-decoration: none; margin-bottom: 0.4rem; }
.footer-grid a:hover { color: #fff; }
.brand-footer { color: #fff; margin-bottom: 0.75rem; }
.footer-legal { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #333; color: #8e988b; font-size: 0.8rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* blog */
.post-card .card-media { aspect-ratio: 16 / 9; }
.post-cover { margin: 1rem 0 2rem; }
.post-cover img { border-radius: var(--radius); max-height: 460px; width: auto; max-width: 100%; margin: 0 auto; }
.post-body { font-size: 1.05rem; }
.post-body h2 { margin-top: 2rem; font-size: 1.5rem; }
.post-body h3 { margin-top: 1.5rem; font-size: 1.2rem; }
.post-body img { border-radius: 10px; margin: 1rem 0; }
.post-body pre { background: var(--ink); color: #e8ecef; padding: 1rem; border-radius: 10px; overflow-x: auto; font-size: 0.9rem; }
.post-body pre code { background: none; color: inherit; padding: 0; }
.post-body blockquote { border-left: 4px solid var(--green); margin: 1rem 0; padding: 0.25rem 1rem; color: var(--muted); }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.3rem; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* admin editor */
.admin-nav { margin-bottom: 1.5rem; }
.error-notice { background: #fde8e6; border-color: #f1b8b3; }
.editor { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
@media (max-width: 820px) { .editor { grid-template-columns: 1fr; } }
.editor label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 1rem; }
.editor label .muted { font-weight: 400; }
.editor input[type=text], .editor input:not([type]), .editor input[type=date], .editor textarea { display: block; width: 100%; margin-top: 0.35rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 0.95rem; }
.editor textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; line-height: 1.5; min-height: 420px; }
.editor-side { background: var(--bg-alt); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: 80px; }
.editor-side input[type=checkbox] { margin-right: 0.4rem; }
.media-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.media-pick { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0; cursor: pointer; overflow: hidden; font-size: 0.6rem; }
.media-pick img { width: 100%; height: 100%; object-fit: cover; }
.upload-form { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; background: var(--bg-alt); padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.upload-form label { font-weight: 700; font-size: 0.9rem; }
.upload-form input[type=file] { display: block; margin-top: 0.4rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.media-item { border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem; }
.media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--bg-alt); }
.media-item .file { display: block; padding: 2rem 0.5rem; text-align: center; background: var(--bg-alt); border-radius: 6px; word-break: break-all; }
.media-item code { font-size: 0.72rem; word-break: break-all; }
.media-item .remove { background: none; border: 0; color: var(--danger); cursor: pointer; font-size: 0.8rem; padding: 0; text-decoration: underline; font-family: inherit; }
.orders .actions { white-space: nowrap; }

/* cloud band */
.section-cloud { background: var(--green-soft); border-top: 1px solid #d5e4d0; border-bottom: 1px solid #d5e4d0; }
.cloud-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.cloud-points li { display: flex; gap: 0.8rem; align-items: flex-start; background: #fff; border-radius: 10px; padding: 0.9rem 1rem; border: 1px solid var(--line); }
.cloud-points svg { width: 26px; height: 26px; flex: none; color: var(--green); }
.cloud-points b { display: block; }
.cloud-points span { color: var(--muted); font-size: 0.92rem; }
