:root {
    --green: #315e32;
    --green-dark: #214722;
    --green-soft: #edf5e9;
    --cream: #fbfaf5;
    --ink: #202820;
    --muted: #5f685f;
    --line: #cfd7cc;
    --red: #b52d25;
    --white: #fff;
    font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    color: var(--ink);
    background: var(--cream);
    font-size: 18px;
    line-height: 1.75;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); }
button, input, select, textarea { font: inherit; }
.wrap { width: min(960px, calc(100% - 32px)); margin-inline: auto; }

.header-inner { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.header-tagline { min-height: 21px; padding: 1px 0; color: #fff; background: #4e7541; font-size: .72rem; font-weight: 600; letter-spacing: .05em; }
.header-main { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 25px; background: #fff; }
.header-logo { display: block; flex: 0 0 auto; line-height: 0; }
.header-logo img { display: block; width: 225px; height: auto; }
.desktop-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(18px, 2.25vw, 34px); }
.desktop-nav a { color: #222; font-size: .88rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.desktop-nav a:hover, .desktop-nav a:focus-visible { color: #4e7541; text-decoration: underline; text-underline-offset: 6px; }
.mobile-nav { display: none; }

.order-hero {
    padding: 34px 0 30px;
    color: var(--white);
    text-align: center;
    background: linear-gradient(135deg, var(--green-dark), #4e7541);
    border-bottom: 5px solid #d8c77a;
}
.order-hero h1 { margin: 3px 0 8px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(1.85rem, 5vw, 2.65rem); line-height: 1.35; letter-spacing: .04em; }
.eyebrow { margin: 0; font-weight: 700; color: #eff7d0; }
.lead { margin: 0; font-size: 1.05rem; }
.mobile-only { display: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 30px 0; padding: 0; list-style: none; }
.steps li { padding: 12px 8px; text-align: center; font-weight: 700; color: var(--muted); background: #e8ebe5; border-radius: 8px; }
.steps li.current { color: var(--white); background: var(--green); }

.panel { margin: 0 0 26px; padding: 30px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 3px 12px rgb(34 60 30 / 8%); }
.section-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.section-heading h2, .panel > h2 { margin: 0; font-size: 1.55rem; line-height: 1.45; color: var(--green-dark); }
.section-heading p { margin: 3px 0 0; color: var(--muted); }
.section-number { display: grid; flex: 0 0 46px; height: 46px; place-items: center; color: var(--white); background: var(--green); border-radius: 50%; font-size: 1.25rem; font-weight: 800; }
h3 { color: var(--green-dark); }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.product-card { display: grid; grid-template-columns: 112px 1fr; grid-template-areas: "image info" "image quantity" "details details"; gap: 10px 16px; align-items: center; padding: 16px; background: #fbfcf9; border: 2px solid #dce5d7; border-radius: 10px; transition: border-color .15s, background-color .15s; }
.product-card.selected-product { background: var(--green-soft); border-color: var(--green); }
.product-image-wrap { grid-area: image; display: grid; overflow: hidden; width: 112px; height: 112px; padding: 0; place-items: center; background: #fff; border: 1px solid #e3e7df; border-radius: 8px; cursor: zoom-in; }
.product-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-image-wrap:hover .product-image { transform: scale(1.05); }
.product-image-wrap:focus-visible { outline: 4px solid #cfdf7c; outline-offset: 2px; }
.product-image-wrap .product-image { transition: transform .3s ease-in-out; }
.product-info { grid-area: info; min-width: 0; }
.variant-badge { display: inline-block; margin-bottom: 5px; padding: 3px 9px; border: 1px solid #fff; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.35; }
.variant-badge.soil { color: #fff; background: #397345; }
.variant-badge.fertilizer { color: #fff; background: #8a6a22; }
.variant-badge.mineral { color: #233128; background: #edf0eb; border-color: #a5aaa1; }
.product-card h3 { margin: 0 0 3px; font-size: 1.08rem; line-height: 1.4; }
.product-card p { margin: 0; }
.product-card > div > p:not(.price) { color: var(--muted); font-size: .9rem; }
.product-spec { min-height: 2.8em; }
.product-overview { display: grid; gap: 3px; margin: 8px 0 0; padding: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; list-style: none; }
.product-overview li { position: relative; padding-left: 14px; }
.product-overview li::before { position: absolute; top: .55em; left: 1px; width: 7px; height: 7px; content: ""; background: #69b45c; border-radius: 50%; }
.price { margin-top: 8px !important; color: var(--green-dark); }
.price strong { font-size: 1.35rem; }
.price span { font-size: .85rem; }
.product-card > label { grid-area: quantity; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; font-weight: 700; }
.product-details { grid-area: details; margin-top: 4px; border: 1px solid #b9c8b4; border-radius: 8px; background: #fff; }
.product-details summary { position: relative; padding: 12px 42px 12px 15px; color: var(--green-dark); font-size: .9rem; font-weight: 800; cursor: pointer; list-style: none; }
.product-details summary::-webkit-details-marker { display: none; }
.product-details summary::after { position: absolute; top: 50%; right: 15px; content: "＋"; font-size: 1.3rem; line-height: 1; transform: translateY(-50%); }
.product-details[open] summary { background: var(--green-soft); border-radius: 8px 8px 0 0; }
.product-details[open] summary::after { content: "－"; }
.product-details.is-animating { overflow: hidden; }
.product-details summary:focus-visible { outline: 4px solid #cfdf7c; outline-offset: 2px; }
.product-details-body { padding: 14px 15px 16px; border-top: 1px solid #dce5d7; font-size: .82rem; line-height: 1.65; }
.product-details-body > p { color: var(--ink) !important; font-size: inherit !important; }
.product-details-body h4 { margin: 13px 0 4px; color: var(--green-dark); font-size: .9rem; }
.product-details-body ul { margin: 0; padding-left: 1.25em; }
.product-details-body li + li { margin-top: 3px; }
.product-details-body dl { margin: 0; border-top: 1px solid var(--line); }
.product-details-body dl > div { display: grid; grid-template-columns: 36% 1fr; border-bottom: 1px solid var(--line); }
.product-details-body dt, .product-details-body dd { padding: 6px 7px; }
.product-details-body dt { font-weight: 700; background: #f3f6f1; }
.product-details-body dd { margin: 0; overflow-wrap: anywhere; }
.image-viewer { width: 100%; max-width: none; height: 100%; max-height: none; margin: auto; padding: 20px; overflow: auto; background: transparent; border: 0; opacity: 0; transition: opacity .3s ease-in-out; }
.image-viewer::backdrop { background: rgb(0 0 0 / 0%); transition: background-color .3s ease-in-out; }
.image-viewer.is-visible { opacity: 1; }
.image-viewer.is-visible::backdrop { background: rgb(0 0 0 / 72%); }
.image-viewer-panel { position: relative; width: fit-content; max-width: 100%; margin: min(8vh, 70px) auto 20px; padding: 54px 18px 16px; text-align: center; background: #fff; border-radius: 12px; box-shadow: 0 18px 60px rgb(0 0 0 / 45%); opacity: 0; transform: scale(.55); transition: transform .3s ease-in-out, opacity .3s ease-in-out; }
.image-viewer.is-visible .image-viewer-panel { opacity: 1; transform: scale(1); }
.image-viewer img { display: block; width: auto; max-width: min(500px, calc(100vw - 76px)); height: auto; max-height: 72vh; margin: auto; object-fit: contain; }
#image-viewer-title { margin: 10px 0 0; font-weight: 800; color: var(--green-dark); }
.image-viewer-close { position: absolute; top: 10px; right: 10px; min-height: 38px; padding: 4px 11px; color: #fff; background: var(--green-dark); border: 0; border-radius: 6px; font-size: .82rem; font-weight: 800; cursor: pointer; }
.image-viewer-close span { font-size: 1.2rem; vertical-align: -.08em; }
.image-viewer-close:focus-visible { outline: 4px solid #cfdf7c; outline-offset: 2px; }
.live-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 8px; margin-top: 18px; padding: 15px 18px; background: var(--green-soft); border-radius: 8px; }
.live-total span { font-weight: 700; }
.live-total strong { color: var(--green-dark); font-size: 1.5rem; }
.live-total small { color: var(--muted); }

select, input[type="text"], input[type="email"], input[type="tel"], textarea {
    width: 100%; min-height: 54px; padding: 10px 13px; color: var(--ink); background: var(--white); border: 2px solid #9da99a; border-radius: 7px;
}
textarea { resize: vertical; }
select:focus, input:focus, textarea:focus { outline: 4px solid #cfdf7c; outline-offset: 1px; border-color: var(--green-dark); }

.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; }
.field.full { grid-column: 1 / -1; }
.required { display: inline-block; padding: 1px 7px; color: var(--white); background: var(--red); border-radius: 4px; font-size: .78rem; font-weight: 700; vertical-align: .12em; }
.optional { color: var(--muted); font-size: .88rem; font-weight: 400; }
.has-error input, .has-error textarea { border-color: var(--red); background: #fff7f6; }
.error { margin: 7px 0 0; color: #9e1d17; font-weight: 700; }

.info-box, .shipping-note { margin-top: 22px; padding: 16px 18px; background: #f1f6e9; border-left: 5px solid var(--green); border-radius: 6px; }
.info-box p, .shipping-note { margin-bottom: 0; }
.radio-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.radio-group label { display: flex; gap: 13px; align-items: center; padding: 18px; border: 2px solid var(--line); border-radius: 9px; cursor: pointer; }
.radio-group label:has(input:checked) { background: var(--green-soft); border-color: var(--green); }
input[type="radio"], input[type="checkbox"] { flex: 0 0 auto; width: 25px; height: 25px; accent-color: var(--green); }
.radio-group strong, .radio-group small { display: block; }
.radio-group small { color: var(--muted); }
.note-field { margin-top: 10px; }
.privacy-check { display: flex; gap: 13px; align-items: flex-start; margin-top: 24px; padding: 18px; background: #f5f5f2; border-radius: 8px; cursor: pointer; }

.submit-area { margin: 32px 0 42px; text-align: center; }
.submit-area p { margin-bottom: 12px; font-weight: 700; }
.button { display: inline-flex; min-height: 58px; padding: 12px 30px; align-items: center; justify-content: center; border: 2px solid var(--green); border-radius: 8px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button.primary { color: var(--white); background: var(--green); box-shadow: 0 4px 0 var(--green-dark); font-size: 1.1rem; }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { color: var(--green-dark); background: var(--white); }
.button:disabled { opacity: .65; cursor: wait; }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 32px; }

.alert { margin: 0 0 24px; padding: 17px 20px; color: #891b16; background: #fff1ef; border: 2px solid #d7655e; border-radius: 8px; }
.instruction { margin-bottom: 26px; }
.summary-list { border-top: 1px solid var(--line); }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.summary-row span { color: var(--muted); }
.summary-row.total { font-size: 1.15rem; background: #f5f8f2; }
.confirm-data { margin: 0; border-top: 1px solid var(--line); }
.confirm-data div, .complete-info div { display: grid; grid-template-columns: 160px 1fr; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.confirm-data dt, .complete-info dt { font-weight: 700; }
.confirm-data dd, .complete-info dd { margin: 0; overflow-wrap: anywhere; }
.complete { text-align: center; }
.complete-mark { display: grid; width: 74px; height: 74px; margin: 0 auto 16px; place-items: center; color: var(--white); background: var(--green); border-radius: 50%; font-size: 2.5rem; font-weight: 800; }
.complete-info { max-width: 620px; margin: 25px auto; text-align: left; }
.note { color: var(--muted); }
.help-box { margin: 25px 0 45px; padding: 22px 26px; background: #f2eee0; border-radius: 10px; }
.help-box h2 { margin: 0 0 8px; font-size: 1.2rem; }
.help-box ul { margin: 0; padding-left: 1.4em; }
.honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.official-footer { margin-top: 0; text-align: center; }
.footer-contact { position: relative; min-height: 390px; display: grid; place-items: center; padding: 55px 20px; color: #fff; background: linear-gradient(rgb(0 0 0 / 58%), rgb(0 0 0 / 58%)), url("assets/hanagen-footer.webp") center / cover no-repeat; }
.footer-contact-inner { width: min(760px, 100%); }
.footer-contact p { margin: 0 0 12px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.footer-contact-button { display: flex; min-height: 62px; margin: 30px auto 16px; align-items: center; justify-content: center; color: #315e32; background: #fff; border: 2px solid #fff; border-radius: 3px; font-size: 1.2rem; font-weight: 800; text-decoration: none; }
.footer-contact-button:hover, .footer-contact-button:focus-visible { color: #fff; background: #4e7541; }
.footer-phone { display: block; color: #fff; font-size: 1.12rem; font-weight: 800; text-decoration: none; text-shadow: 0 1px 3px #000; }
.footer-phone span { font-size: .9rem; }
.footer-company { padding: 28px 20px 20px; background: #fff; }
.footer-company img { display: block; width: 225px; height: auto; margin: 0 auto 13px; }
.footer-company p { margin: 0 0 14px; font-size: .83rem; line-height: 1.6; }
.footer-nav { display: flex; max-width: 900px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: #333; font-size: .72rem; text-decoration: none; }
.footer-nav a:not(:last-child)::after { content: "/"; margin: 0 10px; color: #999; }
.footer-nav a:hover, .footer-nav a:focus-visible { color: #4e7541; text-decoration: underline; }
.copyright { padding: 5px 15px; color: #fff; background: #4e7541; font-size: .68rem; }
.desktop-only { display: block; }

@media (max-width: 700px) {
    :root { font-size: 17px; }
    .wrap { width: min(100% - 20px, 960px); }
    .header-inner { width: min(100% - 20px, 1200px); }
    .header-tagline { display: none; }
    .header-main { min-height: 67px; }
    .header-logo img { width: 175px; }
    .desktop-nav { display: none; }
    .mobile-nav { display: block; position: relative; }
    .mobile-nav summary { padding: 9px 12px; color: #fff; background: #4e7541; border-radius: 4px; font-size: .88rem; font-weight: 700; cursor: pointer; list-style: none; }
    .mobile-nav summary::-webkit-details-marker { display: none; }
    .mobile-nav nav { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 20px)); padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px rgb(0 0 0 / 20%); }
    .mobile-nav nav a { display: block; padding: 10px 12px; color: #222; border-bottom: 1px solid #e6e9e3; font-weight: 700; text-decoration: none; }
    .order-hero { padding: 27px 0 24px; }
    .mobile-only { display: block; }
    .panel { padding: 21px 16px; border-radius: 10px; }
    .product-grid, .fields, .radio-group { grid-template-columns: 1fr; }
    .product-card { grid-template-columns: 84px 1fr; grid-template-areas: "image info" "quantity quantity" "details details"; padding: 14px; }
    .product-image-wrap { width: 84px; height: 84px; }
    .product-details-body dl > div { grid-template-columns: 38% 1fr; }
    .steps li { padding: 9px 3px; font-size: .9rem; }
    .section-heading { gap: 11px; }
    .section-number { flex-basis: 40px; height: 40px; }
    .section-heading h2, .panel > h2 { font-size: 1.3rem; }
    .button { width: 100%; }
    .button-row { display: grid; }
    .button-row form { width: 100%; }
    .summary-row { align-items: flex-start; }
    .confirm-data div, .complete-info div { grid-template-columns: 1fr; gap: 2px; }
    .confirm-data dt, .complete-info dt { color: var(--green-dark); }
    .footer-contact { min-height: 340px; padding: 40px 16px; }
    .footer-contact p { font-size: .88rem; }
    .footer-contact-button { min-height: 58px; margin-top: 23px; }
    .footer-phone span { display: block; }
    .desktop-only { display: none; }
    .footer-nav { gap: 5px 0; }
}

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