:root {
    --ink: #0d1720;
    --paper: #f4f2ec;
    --surface: #fffef9;
    --line: #d8d5cb;
    --signal: #ff4d22;
    --cyan: #00a8a8;
    --muted: #66727b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

.site-header a, main a, .site-footer a { color: inherit; text-decoration: none; }

.site-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 242, 236, .94);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand { font-size: 1.15rem; font-weight: 900; letter-spacing: .08em; }
.brand span { color: var(--signal); }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: .88rem; font-weight: 700; }
.watch-button { padding: 10px 16px; border: 1px solid var(--ink); }

main { width: min(1180px, 90vw); margin: 0 auto; }

.affiliate-disclosure { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin: 24px 0 0; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .72rem; line-height: 1.6; }
.affiliate-disclosure strong { color: var(--ink); white-space: nowrap; }
.affiliate-disclosure a { color: var(--signal); font-weight: 900; white-space: nowrap; }

.hero {
    min-height: 590px;
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    align-items: center;
    gap: 8vw;
}

.eyebrow { color: var(--signal); font-size: .72rem; font-weight: 900; letter-spacing: .22em; }
h1 { margin: 18px 0; font-size: clamp(3.2rem, 7vw, 6.9rem); line-height: .94; letter-spacing: -.06em; }
h1 span { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.9; }

.search { display: flex; max-width: 680px; margin-top: 34px; background: var(--surface); border: 1px solid var(--ink); }
.search input { min-width: 0; flex: 1; padding: 18px; border: 0; background: transparent; font-size: 1rem; }
.search button { border: 0; padding: 0 28px; background: var(--ink); color: white; font-weight: 800; }

.signal-card { min-height: 330px; padding: 34px; background: var(--ink); color: white; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.signal-card p { color: #8f9da7; font-size: .7rem; letter-spacing: .2em; }
.signal-card strong { font-size: 1.8rem; }
.signal-card span { color: #b7c0c6; margin-top: 12px; line-height: 1.6; }
.pulse-line { height: 80px; margin: 32px -34px -34px; background: linear-gradient(135deg, transparent 0 35%, var(--signal) 36% 38%, transparent 39% 49%, var(--cyan) 50% 52%, transparent 53%); opacity: .9; }

.market-section { padding: 80px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; }
h2 { margin: 8px 0 0; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.04em; }
.status { font-size: .75rem; color: var(--muted); }
.status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: #a0a0a0; }
.status.online::before { background: #1fb66d; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.product-card { min-height: 410px; padding: 24px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product-card { display: block; transition: background .18s ease, transform .18s ease; }
.product-card:hover, .product-card:focus-visible { background: white; transform: translateY(-3px); outline: 2px solid var(--signal); outline-offset: -2px; }
.product-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.product-card h3 { min-height: 52px; margin: 22px 0 20px; font-size: 1.05rem; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; }
.price-row strong { font-size: 1.6rem; }
.change { font-size: .8rem; font-weight: 900; }
.change.down { color: var(--cyan); }
.change.up { color: var(--signal); }
.product-card > p { color: var(--muted); font-size: .72rem; }
.market-image-frame { margin: 0; position: relative; background: white; border: 1px solid #ebe8df; overflow: hidden; }
.market-image-frame img { display: block; max-width: 100%; height: auto; object-fit: contain; }
.market-image-frame figcaption { color: var(--muted); font-size: .58rem; line-height: 1.4; text-align: center; }
.market-image-fallback { display: none; align-items: center; justify-content: center; min-height: 146px; color: var(--muted); font-size: .7rem; }
.market-image-frame.image-missing .market-image-fallback,
.market-image-frame.image-failed .market-image-fallback { display: flex; }
.market-image-frame.image-failed img { display: none; }
.product-card-image { min-height: 174px; margin: 20px 0 0; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.product-card-image img { width: 146px; height: 146px; }
.product-card-image figcaption { margin-top: 6px; }

.info-band { margin: 20px 0 80px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--signal); color: white; }
.info-band div { padding: 36px; border-right: 1px solid rgba(255,255,255,.35); }
.info-band span { display: block; font-size: .68rem; opacity: .7; }
.info-band strong { display: block; margin-top: 24px; font-size: 1.3rem; }
.info-band p { margin-bottom: 0; opacity: .8; }

.news-section { padding: 80px 0; border-top: 1px solid var(--line); }
.news-list { border-top: 1px solid var(--ink); }
.news-list > a { display: grid; grid-template-columns: 180px 1fr auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.news-list > a:hover strong, .news-list > a:focus-visible strong { color: var(--signal); }
.news-list span, .news-list em { color: var(--muted); font-size: .72rem; font-style: normal; }
.news-list strong { line-height: 1.6; }
.empty-state { padding: 32px; color: var(--muted); background: var(--surface); }

.detail-main { padding-top: 48px; }
.back-link { color: var(--muted); font-size: .82rem; font-weight: 700; }
.detail-hero { min-height: 420px; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 8vw; }
.detail-hero h1 { max-width: 780px; font-size: clamp(3rem, 6vw, 6.2rem); }
.detail-identity { min-width: 0; display: grid; grid-template-columns: 164px minmax(0, 1fr); align-items: center; gap: 28px; }
.detail-product-image { width: 164px; min-height: 184px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.detail-product-image img { width: 146px; height: 146px; }
.detail-product-image figcaption { margin-top: 7px; }
.detail-price { min-height: 250px; padding: 32px; background: var(--ink); color: white; display: flex; flex-direction: column; justify-content: flex-end; }
.detail-price span { color: #9eabb3; font-size: .72rem; letter-spacing: .12em; }
.detail-price strong { margin: 16px 0 8px; font-size: clamp(2.2rem, 4vw, 4rem); }
.detail-price p { margin: 0; font-weight: 800; }
.detail-price .down { color: #36cccc; }
.detail-price .up { color: #ff7958; }
.detail-grid { display: grid; grid-template-columns: 1.5fr .5fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.history-panel { min-height: 420px; padding: 42px; background: var(--surface); border-right: 1px solid var(--line); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-end; }
.panel-heading h2 { font-size: 2.2rem; }
.panel-heading > span { color: var(--muted); font-size: .75rem; }
.history-chart { height: 230px; display: flex; align-items: flex-end; gap: 8px; margin-top: 42px; border-bottom: 1px solid var(--ink); }
.history-point { min-width: 12px; height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.history-point > span { display: block; width: min(30px, 80%); min-height: 8px; background: var(--cyan); }
.history-point small { height: 28px; margin-top: 8px; color: var(--muted); font-size: .58rem; white-space: nowrap; overflow: hidden; max-width: 76px; }
.history-range { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: .7rem; }
.market-facts { padding: 42px; background: var(--paper); }
.market-facts dl { margin-top: 32px; }
.market-facts dl div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.market-facts dt { color: var(--muted); font-size: .7rem; }
.market-facts dd { margin: 6px 0 0; font-size: 1.05rem; font-weight: 900; }
.source-section { padding: 80px 0; }
.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.source-grid article { padding: 30px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.source-grid span, .source-grid p { color: var(--muted); font-size: .72rem; }
.source-grid strong { display: block; margin-top: 20px; font-size: 2rem; }
.outbound-button { display: inline-flex; margin-top: 12px; padding: 11px 15px; background: var(--ink); color: white; font-size: .76rem; font-weight: 900; }
.outbound-button { align-items: center; gap: 8px; }
.ad-label { padding: 2px 5px; border: 1px solid currentColor; color: #ffd1c5; font-size: .58rem; letter-spacing: .08em; }
.outbound-button:hover, .outbound-button:focus-visible { background: var(--signal); outline: 2px solid var(--ink); outline-offset: 2px; }
.commerce-note { margin: 16px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.7; }

.watch-panel { margin-bottom: 70px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; padding: 38px; background: var(--ink); color: white; }
.watch-panel h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.watch-panel > div > p:last-child { color: #aeb8be; line-height: 1.7; }
.watch-form { align-self: center; }
.watch-form > label { display: block; margin-bottom: 10px; color: #aeb8be; font-size: .72rem; font-weight: 800; }
.watch-form > div { display: flex; flex-wrap: wrap; gap: 8px; }
.watch-form input { min-width: 170px; flex: 1; padding: 14px; border: 1px solid #68747b; background: #17232c; color: white; font: inherit; }
.primary-button, .text-button { border: 0; padding: 14px 18px; font: inherit; font-size: .78rem; font-weight: 900; cursor: pointer; }
.primary-button { background: var(--signal); color: white; }
.text-button { background: transparent; color: inherit; border: 1px solid currentColor; }
.primary-button:hover, .primary-button:focus-visible { background: #ff7654; outline: 2px solid white; outline-offset: 2px; }
.text-button:hover, .text-button:focus-visible { color: var(--signal); outline: 2px solid currentColor; outline-offset: 2px; }
.watch-message { min-height: 1.5em; margin: 12px 0 0; color: #b7c0c6; font-size: .75rem; }
.watch-message.reached { color: #56dddd; font-weight: 900; }

.watchlist-section { padding: 80px 0; border-top: 1px solid var(--line); }
.watchlist { border-top: 1px solid var(--ink); }
.watch-item { display: grid; grid-template-columns: 1fr auto auto; gap: 32px; align-items: center; padding: 24px; border: 1px solid var(--line); border-top: 0; background: var(--surface); }
.watch-item.reached { border-left: 5px solid var(--cyan); }
.watch-item-copy { display: flex; flex-direction: column; gap: 7px; }
.watch-item-brand { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .12em; }
.watch-item-title { font-weight: 900; }
.watch-item-title:hover, .watch-item-title:focus-visible { color: var(--signal); }
.watch-item-status { margin: 0; color: var(--muted); font-size: .72rem; }
.watch-item.reached .watch-item-status { color: var(--cyan); font-weight: 900; }
.watch-item-prices { display: flex; flex-direction: column; gap: 5px; text-align: right; font-size: .78rem; }
.watch-item-prices strong { font-size: 1rem; }

.site-footer { padding: 28px 5vw; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.site-footer > p { margin: 0; line-height: 1.7; }
.footer-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--ink); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--signal); }
.api-credits { padding: 0 5vw 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.policy-main { max-width: 900px; padding: 90px 0; }
.policy-main > h1 { font-size: clamp(3rem, 7vw, 6rem); }
.readiness-notice { margin: 36px 0; padding: 18px; border-left: 5px solid var(--signal); background: #fff1ec; line-height: 1.7; }
.policy-section { padding: 52px 0; border-top: 1px solid var(--line); }
.policy-section h2 { margin-bottom: 24px; font-size: clamp(1.8rem, 4vw, 3rem); }
.policy-section p { line-height: 1.9; }
.policy-section dl { margin: 0; }
.policy-section dl div { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.policy-section dt { color: var(--muted); }
.policy-section dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.policy-section a { color: var(--signal); text-decoration: underline; }

@media (max-width: 900px) {
    .site-header nav a:not(.watch-button) { display: none; }
    .hero { grid-template-columns: 1fr; padding: 90px 0; }
    .detail-hero, .detail-grid { grid-template-columns: 1fr; padding: 70px 0; }
    .watch-panel { grid-template-columns: 1fr; }
    .history-panel { border-right: 0; }
    .signal-card { min-height: 250px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    main { width: min(92vw, 1180px); }
    h1 { font-size: 3.4rem; }
    .search button { padding: 0 18px; }
    .product-grid, .info-band { grid-template-columns: 1fr; }
    .news-list > a { grid-template-columns: 1fr; gap: 8px; }
    .source-grid { grid-template-columns: 1fr; }
    .watch-panel { padding: 28px; gap: 24px; }
    .watch-item { grid-template-columns: 1fr; gap: 16px; }
    .watch-item-prices { text-align: left; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
    .detail-identity { grid-template-columns: 1fr; }
    .detail-product-image { width: 164px; }
    .affiliate-disclosure { grid-template-columns: 1fr; gap: 6px; }
    .policy-section dl div { grid-template-columns: 1fr; gap: 6px; }
}
