:root {
  --navy: #05264d;
  --navy-deep: #031b38;
  --teal: #039b9f;
  --teal-dark: #00868e;
  --sky: #edf6fb;
  --ink: #102b4e;
  --muted: #657891;
  --line: #d9e4ee;
  --white: #fff;
  --shadow: 0 18px 45px rgba(13, 48, 81, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
body, button, input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { color: inherit; }
.container { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.narrow { max-width: 900px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 16px; color: #fff; background: var(--navy); }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid #f1a82f; outline-offset: 3px; }

.site-header { position: relative; z-index: 20; height: 84px; background: rgba(255,255,255,.98); border-bottom: 1px solid rgba(5,38,77,.05); }
.header-inner { display: flex; align-items: center; height: 100%; gap: 30px; }
.brand { flex: 0 0 235px; height: 58px; overflow: hidden; display: flex; align-items: center; }
.brand img { width: 230px; height: auto; }
.global-nav { display: flex; align-items: center; gap: 31px; margin-left: auto; }
.global-nav a { position: relative; font-weight: 700; font-size: 14px; white-space: nowrap; }
.global-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -9px; height: 2px; background: var(--teal); transition: right .2s; }
.global-nav a:hover::after, .global-nav a[aria-current="page"]::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 20px; margin-left: 30px; font-size: 14px; font-weight: 700; }
.cart { font-size: 25px; transform: rotate(180deg); }
.nav-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.nav-toggle > span:not(.sr-only) { display: block; width: 25px; height: 2px; margin: 5px 0; background: var(--navy); }

.hero { position: relative; min-height: 620px; overflow: hidden; background: #eef7fc; }
.hero-art { position: absolute; inset: 0; background-image: linear-gradient(90deg, #fff 0, rgba(255,255,255,.98) 25%, rgba(255,255,255,.82) 38%, rgba(255,255,255,.18) 59%, rgba(255,255,255,0) 72%), url("hero-codemarina-v2.png"); background-repeat: no-repeat; background-size: auto, cover; background-position: 0 0, center center; }
.hero-inner { position: relative; min-height: 620px; display: flex; align-items: center; }
.hero-copy { width: 58%; padding: 46px 0 35px; }
.eyebrow { margin: 0 0 25px; color: #7593b1; font-size: 12px; font-weight: 700; letter-spacing: .38em; line-height: 1.7; }
.hero h1 { margin: 0; color: var(--navy-deep); font-size: clamp(40px, 4.45vw, 64px); line-height: 1.35; letter-spacing: -.035em; }
.hero-lead { margin: 22px 0 28px; font-size: 19px; font-weight: 500; }
.button-row { display: flex; gap: 28px; }
.button { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 27px; border: 1px solid transparent; border-radius: 6px; font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(5,38,77,.16); }
.button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: .58; transform: none; box-shadow: none; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--teal), var(--teal-dark)); }
.button-primary span { margin-left: 22px; }
.button-outline { min-width: 185px; border-color: var(--navy); color: var(--navy); background: rgba(255,255,255,.72); }
.hero-note { margin-top: 43px; color: #6f8095; font-size: 15px; line-height: 1.7; }
.hero-note > span { display: block; width: 52px; height: 1px; margin-bottom: 25px; background: #8fb1c8; }
.hero-note p { margin: 0; }

.category-strip { padding: 33px 0; background: #fff; border-bottom: 1px solid #eef3f7; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.category-card { display: grid; grid-template-columns: 58px 1fr 12px; align-items: center; gap: 18px; min-height: 114px; padding: 21px 23px; border: 1px solid var(--line); border-radius: 8px; transition: transform .2s, box-shadow .2s; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-icon { width: 54px; height: 54px; display: grid; place-items: center; border: 3px solid var(--navy); border-radius: 50%; font: 700 25px Georgia, serif; }
.category-icon.puzzle, .category-icon.cube { color: var(--teal); border: 0; border-radius: 0; font: 700 53px/1 Arial, sans-serif; }
.category-card strong { display: block; margin-bottom: 2px; font-size: 18px; }
.category-card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; }
.category-card b { color: #2e6392; font-size: 28px; font-weight: 400; }

.products-section, .listing-section { padding: 67px 0 78px; background: linear-gradient(180deg, #fff, #f7fafc); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 30px; }
.section-heading .eyebrow { margin-bottom: 3px; }
.section-heading h2 { margin: 0; font-size: 38px; line-height: 1.25; }
.section-heading > a { color: #285a87; font-size: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.product-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 25px rgba(9,45,77,.04); }
.product-card[hidden] { display: none; }
.product-image { display: block; aspect-ratio: 1.115; background-image: url("top-design-reference.png"); background-repeat: no-repeat; background-size: 330.3% auto; border-bottom: 1px solid var(--line); }
.product-image-1 { background-position: 4.6% 67.7%; }
.product-image-2 { background-position: 50.6% 67.7%; }
.product-image-3 { background-position: 95.7% 67.7%; }
.uploaded-product-image { position: relative; overflow: hidden; background: #f4f7fa; background-image: none; }
.uploaded-product-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--image-position-x, 50%) 50%; }
.product-body { padding: 20px 23px 21px; }
.tag { display: inline-flex; padding: 2px 10px; border-radius: 999px; color: #155478; background: #e5f5fb; font-size: 12px; line-height: 1.6; }
.product-card h2, .product-card h3 { margin: 10px 0 5px; font-size: 20px; line-height: 1.45; }
.product-card p { min-height: 56px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.price { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; color: var(--navy-deep); }
.price strong { font-size: 17px; }
.price a { font-size: 29px; font-weight: 300; }

.developer-section { position: relative; overflow: hidden; padding: 70px 0 80px; color: #fff; background: linear-gradient(118deg, #fff 0, #fff 45%, transparent 45.1%), linear-gradient(135deg, #123b61, #052243); }
.developer-grid { display: grid; grid-template-columns: 43% 57%; gap: 55px; align-items: center; }
.developer-grid > div:first-child { color: var(--ink); }
.developer-grid h2 { margin: 0 0 16px; font-size: 37px; line-height: 1.5; }
.developer-grid p:not(.eyebrow) { color: var(--muted); }
.text-link { display: inline-block; margin-top: 12px; color: #176b82; font-weight: 700; }
.code-window { width: 88%; margin-left: auto; padding: 14px 0 0; transform: perspective(900px) rotateY(-7deg); border: 1px solid rgba(255,255,255,.25); border-radius: 11px; background: #061b32; box-shadow: 0 25px 60px rgba(0,0,0,.32); }
.code-window > div { display: flex; gap: 7px; padding: 0 16px 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.code-window i { width: 9px; height: 9px; border-radius: 50%; background: #3eb5af; }
.code-window pre { min-height: 180px; margin: 0; padding: 26px; color: #9be1e1; white-space: pre-wrap; font: 14px/2 Consolas, monospace; }

.site-footer { overflow: hidden; padding: 45px 0 20px; color: #b9c9d9; background: var(--navy-deep); }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 35px; min-width: 0; }
.footer-grid > div { min-width: 0; }
.footer-grid img { width: 190px; height: auto; padding: 7px 10px; border-radius: 6px; background: #fff; }
.footer-grid p { margin: 9px 0 0; font-size: 13px; }
.footer-grid nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 15px 30px; max-width: 50%; font-size: 14px; }
.footer-cookie-button { padding: 0; color: inherit; border: 0; background: none; cursor: pointer; font: inherit; }
.copyright { margin-top: 32px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }
.consent-banner { position: fixed; z-index: 1000; right: 24px; bottom: 24px; left: 24px; display: flex; align-items: center; justify-content: space-between; gap: 28px; width: min(920px, calc(100% - 48px)); margin: auto; padding: 20px 22px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 15px 45px rgba(5,38,77,.2); }
.consent-banner[hidden] { display: none; }
.consent-banner strong { color: var(--navy-deep); font-size: 17px; }
.consent-banner p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.consent-banner a { color: #176b82; }
.consent-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.consent-actions .button { min-width: 108px; padding: 10px 16px; cursor: pointer; }

.page-hero { padding: 73px 0 65px; background: linear-gradient(135deg, #f6fbfe, #e6f3f9); border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { margin-bottom: 7px; }
.page-hero h1 { margin: 0 0 9px; font-size: 44px; line-height: 1.35; }
.page-hero p:last-child { margin: 0; color: var(--muted); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-bar button { padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; }
.filter-bar button.is-active { color: #fff; border-color: var(--teal); background: var(--teal); }
.breadcrumbs { display: flex; gap: 10px; padding-top: 24px; color: var(--muted); font-size: 13px; }
.product-detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: 55px; padding-top: 36px; padding-bottom: 72px; }
.detail-main { aspect-ratio: 1.115; border: 1px solid var(--line); border-radius: 8px; background-image: url("top-design-reference.png"); background-repeat: no-repeat; background-size: 330.3% auto; }
.detail-main.is-pannable { cursor: ew-resize; touch-action: pan-y; }
.detail-main.is-pannable img { transition: object-position .12s ease-out; user-select: none; -webkit-user-drag: none; }
.detail-main.is-dragging img { transition: none; }
.thumb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.thumb-row span { aspect-ratio: 1.5; border: 1px solid var(--line); border-radius: 5px; background-image: url("top-design-reference.png"); background-repeat: no-repeat; background-size: 330.3% auto; }
.thumb-row .gallery-thumb { overflow: hidden; aspect-ratio: 1.5; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; cursor: pointer; }
.thumb-row .gallery-thumb:hover, .thumb-row .gallery-thumb.is-active { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(3, 155, 159, .2); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-banner { padding: 10px 20px; color: #fff; background: #9b6710; text-align: center; font-weight: 700; }
.empty-products { grid-column: 1 / -1; padding: 40px 0; color: var(--muted); text-align: center; }
.detail-summary h1 { margin: 14px 0 15px; font-size: 38px; line-height: 1.35; }
.detail-lead { color: var(--muted); }
.detail-summary dl { margin: 25px 0; border-top: 1px solid var(--line); }
.detail-summary dl div { display: grid; grid-template-columns: 95px 1fr; padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail-summary dt { font-weight: 700; }
.detail-summary dd { margin: 0; }
.purchase-button, .demo-link { width: 100%; }
.purchase-note { margin: 10px 0 17px; color: var(--muted); font-size: 12px; text-align: center; }
.detail-content { padding: 70px 0 80px; background: #f7fafc; }
.prose { max-width: 850px; }
.privacy-policy h3 { margin: 28px 0 8px; color: var(--navy-deep); font-size: 21px; }
.prose h2 { margin: 45px 0 15px; font-size: 28px; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: 5px; }
.spec-table, .info-table { margin-top: 24px; border-top: 1px solid var(--line); }
.spec-table div, .info-table div { display: grid; grid-template-columns: 190px 1fr; gap: 20px; padding: 17px 5px; border-bottom: 1px solid var(--line); }
.content-section { padding: 72px 0 90px; }
.content-section h2 { margin-top: 0; font-size: 30px; }
.notice { margin-top: 25px; padding: 16px 20px; border-left: 4px solid var(--teal); background: #edf8f8; color: #4b6379; }
.home-notices { padding: 65px 0 75px; background: #fff; border-top: 1px solid var(--line); }
.home-notice-list { border-top: 1px solid var(--line); }
.home-notice-list article { display: grid; grid-template-columns: 110px 130px 1fr 30px; align-items: center; gap: 18px; padding: 20px 8px; border-bottom: 1px solid var(--line); }
.home-notice-list time, .notice-meta time { color: var(--muted); font-size: 14px; }
.home-notice-list h3 { margin: 0; font-size: 17px; }
.notice-arrow { color: #2e6392; font-size: 28px; text-align: right; }
.notice-list { max-width: 920px; }
.notice-row { padding: 30px 0; border-bottom: 1px solid var(--line); }
.notice-row.has-image { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.notice-row:first-child { padding-top: 0; }
.notice-thumb { overflow: hidden; aspect-ratio: 1.5; border-radius: 7px; background: #edf3f7; }
.notice-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.notice-thumb:hover img { transform: scale(1.03); }
.notice-meta { display: flex; align-items: center; gap: 14px; }
.notice-row h2 { margin: 9px 0 6px; font-size: 23px; }
.notice-row p { margin: 0; color: var(--muted); }
.notice-row .text-link { margin-top: 10px; font-size: 14px; }
.notice-detail { max-width: 900px; padding-top: 42px; padding-bottom: 85px; }
.notice-detail header { margin-bottom: 30px; }
.notice-detail h1 { margin: 14px 0 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.4; }
.notice-main-image { width: 100%; max-height: 560px; margin-bottom: 38px; object-fit: cover; border-radius: 9px; }
.notice-body { font-size: 16px; line-height: 2; }
.notice-body > p:first-child { margin-top: 0; }
.notice-link { margin-top: 35px; }
.update-meta { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 24px 0 0; padding: 16px 20px; background: #f1f7fa; border-radius: 7px; }
.update-meta div { display: flex; gap: 10px; }
.update-meta dt { font-weight: 700; }
.update-meta dd { margin: 0; }
.contact-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 65px; align-items: start; }
.contact-form { padding: 34px; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.contact-form label { display: block; margin-bottom: 22px; font-weight: 700; }
.contact-form label > span { margin-left: 8px; color: #a43a3a; font-size: 11px; }
.contact-form input:not([type="checkbox"]), .contact-form select, .contact-form textarea { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #bdccd9; border-radius: 5px; background: #fff; font-size: 16px; }
.contact-form :disabled { cursor: not-allowed; opacity: .68; background-color: #eef3f7; }
.contact-form textarea { resize: vertical; }
.contact-form .check-label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; font-weight: 400; }
.check-label input { margin-top: 6px; }
.contact-form .button { width: 100%; }
.form-status { margin-bottom: 0; color: #176b82; font-size: 14px; font-weight: 700; }

@media (max-width: 1050px) {
  .container { width: min(100% - 44px, 960px); }
  .site-header { height: 76px; }
  .brand { flex-basis: 195px; height: 50px; }
  .brand img { width: 192px; }
  .global-nav { gap: 18px; }
  .header-actions { margin-left: 5px; }
  .hero { min-height: 570px; }
  .hero-inner { min-height: 570px; }
  .hero-art { background-position: 47% center; }
  .hero-copy { width: 62%; }
  .hero h1 { font-size: 45px; }
  .category-card { grid-template-columns: 48px 1fr 8px; gap: 12px; padding: 18px 16px; }
  .category-icon { width: 46px; height: 46px; }
  .category-card small { font-size: 11px; }
}

@media (max-width: 820px) {
  .container { width: min(100% - 36px, 720px); }
  .nav-toggle { display: block; margin-left: auto; }
  .global-nav { position: absolute; top: 76px; left: 0; right: 0; display: none; margin: 0; padding: 18px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 15px 25px rgba(5,38,77,.12); }
  .global-nav.is-open { display: grid; }
  .global-nav a { padding: 10px 8px; }
  .header-actions { display: none; }
  .hero { min-height: 670px; background: #eef7fc; }
  .hero-inner { min-height: 670px; align-items: flex-start; }
  .hero-copy { width: 100%; padding-top: 70px; }
  .hero-art { inset: auto 0 0; height: 300px; opacity: .58; background-image: linear-gradient(180deg, #fff 0, rgba(255,255,255,.5) 30%, rgba(255,255,255,0) 70%), url("hero-codemarina-v2.png"); background-size: auto, cover; background-position: 0, 68% center; }
  .hero-note { position: relative; z-index: 2; width: max-content; max-width: 100%; padding: 10px 14px; border-radius: 5px; background: rgba(255,255,255,.88); }
  .category-grid, .product-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 105px; }
  .category-card small { font-size: 13px; }
  .product-card { max-width: 560px; width: 100%; margin-inline: auto; }
  .developer-section { background: linear-gradient(160deg, #fff 0, #fff 55%, #0b3155 55.2%); }
  .developer-grid { grid-template-columns: 1fr; }
  .code-window { width: 90%; margin: 25px auto 0; transform: none; }
  .product-detail, .contact-layout { grid-template-columns: 1fr; }
  .home-notice-list article { grid-template-columns: 95px 115px 1fr 20px; gap: 12px; }
  .contact-layout { gap: 35px; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .container { width: min(100% - 30px, 480px); }
  .site-header { height: 67px; }
  .brand { flex-basis: 172px; height: 45px; }
  .brand img { width: 170px; }
  .global-nav { top: 67px; }
  .hero, .hero-inner { min-height: 650px; }
  .hero-copy { padding-top: 48px; }
  .eyebrow { font-size: 10px; letter-spacing: .28em; }
  .hero h1 { font-size: clamp(34px, 10.5vw, 46px); }
  .hero-lead { font-size: 16px; }
  .button-row { flex-direction: column; gap: 12px; }
  .button-row .button { width: 100%; }
  .hero-note { margin-top: 30px; }
  .hero-art { left: 0; height: 235px; background-size: auto, cover; background-position: 0, 70% center; }
  .category-strip { padding-block: 22px; }
  .category-card strong { font-size: 16px; }
  .products-section, .listing-section { padding: 50px 0; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 30px; }
  .section-heading > a { margin-top: 37px; font-size: 12px; }
  .developer-section { padding: 55px 0; }
  .developer-grid h2 { font-size: 31px; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .footer-grid nav { justify-content: flex-start; max-width: none; width: 100%; gap: 15px 25px; }
  .page-hero { padding: 52px 0 45px; }
  .page-hero h1 { font-size: 34px; }
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filter-bar button { flex: 0 0 auto; }
  .product-detail { padding-top: 25px; gap: 32px; }
  .detail-summary h1 { font-size: 31px; }
  .spec-table div, .info-table div { grid-template-columns: 1fr; gap: 4px; }
  .contact-form { padding: 24px 18px; }
  .home-notices { padding: 50px 0; }
  .home-notice-list article { grid-template-columns: auto 1fr 20px; gap: 8px 12px; }
  .home-notice-list h3 { grid-column: 1 / 3; }
  .home-notice-list .notice-arrow { grid-column: 3; grid-row: 1 / 3; }
  .notice-row.has-image { grid-template-columns: 1fr; }
  .notice-thumb { max-width: 420px; }
  .notice-detail { padding-top: 30px; }
  .consent-banner { right: 12px; bottom: 12px; left: 12px; align-items: stretch; flex-direction: column; gap: 16px; width: calc(100% - 24px); padding: 18px; }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .consent-actions .button { min-width: 0; }
}

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