:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #16322c;
  background: #f2f7f5;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.environment-banner { position: sticky; top: 0; z-index: 1000; padding: .35rem 1rem; color: #fff; background: #9b1c1c; font-weight: 900; letter-spacing: .18em; text-align: center; }
.site-header { padding: 1rem 1.5rem; background: #fff; border-bottom: 1px solid #dce9e5; }
.brand { color: #176b5b; font-weight: 800; text-decoration: none; font-size: 1.2rem; }
.page-shell { min-height: calc(100vh - 65px); display: grid; place-items: center; padding: 2rem 1rem; }
.card { width: min(100%, 560px); padding: clamp(1.5rem, 4vw, 3rem); background: #fff; border: 1px solid #dce9e5; border-radius: 20px; box-shadow: 0 18px 45px rgba(20, 68, 58, .08); }
.eyebrow { color: #397b6d; font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
h1 { margin: .4rem 0 1rem; font-size: clamp(2rem, 7vw, 3rem); line-height: 1.1; }
.button { display: inline-flex; justify-content: center; width: 100%; padding: .9rem 1.2rem; border: 0; border-radius: 12px; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.button--primary { color: #fff; background: #176b5b; }
.button--secondary { color: #164f44; background: #e4f1ed; }
.button:focus-visible { outline: 3px solid #f3aa3c; outline-offset: 3px; }
.account-details { margin: 1.5rem 0; padding: 1rem; background: #f2f7f5; border-radius: 12px; }
.account-details dt { color: #527069; font-size: .85rem; }
.account-details dd { margin: .25rem 0 0; font-weight: 750; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-nav a { color: #176b5b; font-weight: 700; }
.content-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 5rem; }
.content-shell--narrow { width: min(720px, calc(100% - 2rem)); }
.maintenance-shell { display: grid; gap: 1.5rem; }
.maintenance-shell .card { width: 100%; overflow-wrap: anywhere; }
.maintenance-shell form { display: grid; gap: 1rem; }
.maintenance-shell label { display: block; line-height: 1.6; }
.maintenance-shell input:not([type="hidden"]):not([type="checkbox"]),
.maintenance-shell textarea, .maintenance-shell select { display: block; width: 100%; margin-top: .35rem; padding: .7rem; border: 1px solid #a9c4bc; border-radius: 8px; background: #fff; color: inherit; font: inherit; }
.maintenance-shell input[type="checkbox"] { margin-right: .5rem; }
.maintenance-shell textarea { resize: vertical; }
.maintenance-shell input:focus-visible, .maintenance-shell textarea:focus-visible, .maintenance-shell select:focus-visible { outline: 3px solid #f3aa3c; outline-offset: 2px; }
.page-heading h1 { margin-top: .25rem; }
.heading-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.product-card, .detail-card, .empty-state, .admin-form { padding: 1.5rem; background: #fff; border: 1px solid #dce9e5; border-radius: 16px; }
.product-card { display: flex; flex-direction: column; }
.product-card h2, .product-card h3 { margin: 0; }
.product-card .button { margin-top: auto; }
.catalog-nav { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1.25rem 0 2.5rem; }
.catalog-nav__link { padding: .65rem 1rem; border: 1px solid #a9c4bc; border-radius: 999px; color: #164f44; background: #fff; font-weight: 750; text-decoration: none; }
.catalog-nav__link:hover, .catalog-nav__link:focus-visible { border-color: #176b5b; background: #e4f1ed; }
.catalog-nav__link:focus-visible { outline: 3px solid #f3aa3c; outline-offset: 2px; }
.catalog-sections { display: grid; gap: 3.25rem; }
.catalog-section { scroll-margin-top: 1rem; }
.catalog-section__heading { margin-bottom: 1rem; }
.catalog-section__heading .eyebrow { margin-bottom: .3rem; }
.catalog-section__heading h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2rem); }
.product-type-label { align-self: flex-start; margin: 0 0 .8rem; padding: .3rem .65rem; border-radius: 999px; color: #176b5b; background: #e4f1ed; font-size: .78rem; font-weight: 800; }
.product-card--digital_access .product-type-label { color: #65501a; background: #fff3ce; }
.product-access-label { margin: -.35rem 0 1rem; color: #65501a; font-weight: 800; }
.product-status-note { align-self: flex-start; margin: 0 0 1rem; padding: .3rem .65rem; border-radius: 999px; color: #8a5a1f; background: #fbeccd; font-size: .78rem; font-weight: 800; }
.product-card__description { line-height: 1.65; overflow-wrap: anywhere; }
/* Shop top page only (views/shop-home.php): the 3 category cards are the page's main visual --
   a big illustration panel on top, a centered text body below, in a soft per-category background. */
.shop-home__intro { margin-bottom: .5rem; text-align: center; }
.shop-home__intro h1 { font-size: clamp(1.75rem, 5vw, 2.4rem); }
.shop-home__intro p { max-width: 46rem; margin-left: auto; margin-right: auto; }
.category-grid { gap: 1.75rem; margin: 2.5rem 0 1.5rem; }
.category-card { padding: 0; overflow: hidden; text-align: center; border: none; box-shadow: 0 14px 32px rgba(20, 68, 58, .06); }
.category-card__visual { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem 1.25rem; }
.category-card__visual svg { width: min(100%, 150px); height: auto; }
.category-card__body { display: flex; flex: 1; flex-direction: column; padding: 0 1.5rem 1.75rem; background: #fff; }
.category-card h2 { margin: 0 0 .6rem; font-size: 1.3rem; }
.category-card .product-card__description { margin: 0 0 1rem; color: #3d5850; }
.category-card__empty-note { align-self: center; }
.category-card__examples { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.category-card__examples li { padding: .35rem .75rem; border: 1px solid #dce9e5; border-radius: 999px; color: #164f44; background: #f2f7f5; font-size: .8rem; font-weight: 700; }
.category-card .button { width: auto; min-width: 60%; margin: auto auto 0; padding-left: 1.75rem; padding-right: 1.75rem; }
.category-card--digital_access .category-card__visual { color: #8a6c1f; background: #fdf1cf; }
.category-card--digital_access .category-card__examples li { background: #fdf6e3; }
.category-card--service .category-card__visual { color: #176b5b; background: #dcefe8; }
.category-card--physical .category-card__visual { color: #2f6478; background: #dceaef; }
.category-card--physical .category-card__examples li { background: #eef6f8; }
.shop-home__all-products { margin-top: .5rem; text-align: center; }
.shop-home__all-products .button { width: auto; }
/* A quiet, informational download route for prospective creators. It intentionally uses the
   secondary button treatment so the product catalogue remains the top page's primary CTA. */
.creator-guide { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 3rem; padding: 1.5rem; background: #fff; border: 1px solid #dce9e5; border-radius: 14px; }
.creator-guide h2 { margin: .3rem 0 .6rem; font-size: 1.2rem; }
.creator-guide p { margin: 0; line-height: 1.65; }
.creator-guide__meta { margin-top: .75rem !important; color: #527069; font-size: .85rem; }
.creator-guide__actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: .75rem; }
.creator-guide .button { flex: 0 0 auto; }
/* Shop top page only, continued: the "今とこれから" roadmap section replacing the old
   selling-oriented usecase cards + seller-signup CTA (removed: they read as though general users
   could already list/sell products today). Plain status/roadmap cards, no icons, no CTA button --
   this section explains where things stand, it is not a second navigation surface. */
.shop-home__roadmap { margin-top: 4rem; }
.roadmap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.roadmap-card { display: flex; flex-direction: column; padding: 1.5rem; background: #fff; border: 1px solid #dce9e5; border-radius: 14px; }
.roadmap-card h3 { margin: .3rem 0 .6rem; font-size: 1.05rem; }
.roadmap-card .product-card__description { margin: 0; font-size: .92rem; }

/* Shared site footer (views/partials/shop-footer.php): currently wired into the top page and the
   catalog/legal pages only (see that partial's own docblock for why). Kept deliberately plain --
   this is navigation, not a design centerpiece. */
.site-footer { margin-top: 4rem; padding: 2rem 1.5rem; background: #fff; border-top: 1px solid #dce9e5; text-align: center; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin: 0 0 1rem; }
.site-footer__links a { color: #527069; font-size: .85rem; text-decoration: none; }
.site-footer__links a:hover, .site-footer__links a:focus-visible { color: #176b5b; text-decoration: underline; }
.site-footer__copyright { margin: 0; color: #7c948d; font-size: .8rem; }

/* Legal/policy pages (views/legal-*.php): plain, readable article typography -- no cards, no icons. */
.legal-page { line-height: 1.8; }
.legal-page h2 { margin: 2.25rem 0 .75rem; font-size: 1.2rem; }
.legal-page h2:first-of-type { margin-top: 1.5rem; }
.legal-page p { margin: 0 0 1rem; overflow-wrap: anywhere; }
.legal-page ul { margin: 0 0 1rem; padding-left: 1.4rem; }
.legal-page li { margin-bottom: .4rem; }
.legal-page__updated { color: #7c948d; font-size: .85rem; }
.legal-page__notice { padding: 1rem 1.25rem; margin-bottom: 1.5rem; background: #fdf6e3; border: 1px solid #f0e2b0; border-radius: 12px; color: #6b5417; }
.legal-page__table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; }
.legal-page__table th, .legal-page__table td { padding: .85rem 0; border-bottom: 1px solid #dce9e5; text-align: left; vertical-align: top; }
.legal-page__table th { width: 35%; padding-right: 1.5rem; color: #397b6d; font-size: .85rem; font-weight: 800; white-space: nowrap; }
.price { color: #176b5b; font-size: 1.5rem; font-weight: 850; }
.price--large { font-size: 2rem; }
.description { margin: 1.5rem 0; line-height: 1.8; overflow-wrap: anywhere; }
.stock { display: inline-block; padding: .35rem .65rem; border-radius: 999px; color: #155e50; background: #e4f1ed; font-weight: 750; }
.stock--out { color: #8a271f; background: #fae9e7; }
.notice { color: #527069; text-align: center; }
.button[disabled] { cursor: not-allowed; opacity: .55; }
.button--fit { width: auto; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #dce9e5; border-radius: 14px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: .85rem; border-bottom: 1px solid #dce9e5; text-align: left; }
th { background: #f2f7f5; font-size: .82rem; }
.status { padding: .2rem .5rem; border-radius: 999px; background: #edf2f0; }
.status--active { color: #155e50; background: #e4f1ed; }
.status--inactive { color: #8a271f; background: #fae9e7; }
.admin-form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .4rem; }
.field-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.field label { font-weight: 750; }
.field input, .field textarea, .field select { width: 100%; padding: .75rem; border: 1px solid #a9c4bc; border-radius: 8px; color: inherit; background: #fff; font: inherit; }
.checkbox-field { display: flex; align-items: center; grid-template-columns: auto 1fr; }
.checkbox-field input { width: auto; }
.field-error, .error-summary { color: #8a271f; }
.field-hint { margin: 0; color: #527069; font-size: .82rem; }
.field-static { margin: 0; padding: .75rem; border: 1px solid #dce9e5; border-radius: 8px; background: #f7faf9; font-weight: 750; }
.field-static__label { margin-right: .5rem; color: #527069; font-weight: 750; }
.field--product-type { padding: 1.25rem; background: #e4f1ed; border: 1px solid #a9c4bc; border-radius: 12px; }
.field--product-type select { font-size: 1.05rem; font-weight: 800; }
.success { padding: 1rem; border-radius: 10px; color: #155e50; background: #e4f1ed; }
/* Seller register/dashboard only (scoped under .seller-card, added alongside .card) -- readability
   pass: looser line-height on the explanatory copy, breathing room around the plain <form>'s field
   and button (seller pages don't use .admin-form's grid gap), and space between account-details
   status rows that otherwise run together with no gap between dt/dd pairs. */
.seller-card { padding: clamp(1.75rem, 4vw, 3rem); }
.seller-card p { line-height: 1.8; }
.seller-card .field { margin: 1.5rem 0; }
.seller-card .field-error { margin: .6rem 0 0; }
.seller-card form { margin-top: 1.5rem; }
.seller-card .account-details dt { margin: 0; font-size: .92rem; }
.seller-card .account-details dt:not(:first-of-type) { margin-top: 1.1rem; }
.seller-card .account-details dd { margin-top: .35rem; font-size: 1.05rem; }
.service-fields { display: grid; gap: 1.25rem; margin: 0; padding: 1.25rem; border: 1px solid #dce9e5; border-radius: 12px; }
.service-fields[hidden] { display: none; }
.service-fields legend { padding: 0 .4rem; font-weight: 800; }
.notice--left { text-align: left; }
.service-details { display: grid; gap: 1rem; margin: 1.5rem 0; }
.service-details section { padding: 1rem; background: #f7faf9; border-radius: 10px; }
.service-details h2 { margin: 0 0 .5rem; font-size: 1.05rem; }
.service-details p { margin: 0; line-height: 1.75; overflow-wrap: anywhere; }
/* Shop top page only: space the "view all products" link below the 3-category grid. */
.shop-home__all-products { margin-top: 2rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 640px) {
  .site-header, .heading-actions { align-items: flex-start; flex-direction: column; }
  .field-grid { grid-template-columns: 1fr; }
  .content-shell { padding-top: 2rem; }
  .catalog-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 2rem; }
  .catalog-nav__link { display: flex; align-items: center; justify-content: center; text-align: center; }
  .catalog-sections { gap: 2.5rem; }
  .creator-guide { align-items: stretch; flex-direction: column; }
  .creator-guide__actions { width: 100%; }
  .creator-guide .button { width: 100%; }
  .legal-page__table, .legal-page__table tbody, .legal-page__table tr, .legal-page__table th, .legal-page__table td { display: block; width: auto; }
  .legal-page__table tr { padding: .85rem 0; border-bottom: 1px solid #dce9e5; }
  .legal-page__table th, .legal-page__table td { padding: 0; border-bottom: 0; }
  .legal-page__table th { margin-bottom: .35rem; }
}
