:root {
  --red: #d50028;
  --red-dark: #a80020;
  --ink: #222;
  --muted: #6b6b6b;
  --line: #d9d9d9;
  --soft: #f5f5f6;
  --blue: #1265a8;
  --orange: #e98200;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: white; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", Meiryo, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(1380px, calc(100% - 32px)); margin: 0 auto; }

.top-notice { color: #fff; background: #252525; font-size: 11px; }
.top-notice .container { display: flex; justify-content: space-between; padding: 5px 0; }
.header { border-bottom: 1px solid var(--line); background: #fff; }
.header__main { display: grid; grid-template-columns: 245px 1fr auto; gap: 24px; align-items: center; padding: 16px 0; }
.logo { color: var(--red); text-decoration: none; line-height: 1; }
.logo strong { display: block; font-size: 29px; letter-spacing: -.08em; }
.logo span { display: block; margin-top: 7px; color: #222; font-size: 13px; font-weight: 900; letter-spacing: .34em; }
.search { display: flex; height: 46px; }
.search input { min-width: 0; flex: 1; padding: 0 16px; border: 2px solid var(--red); border-radius: 2px 0 0 2px; font-size: 15px; }
.search button { width: 105px; color: #fff; background: var(--red); border: 0; font-weight: 800; }
.header-actions { display: flex; }
.header-actions button { min-width: 110px; height: 46px; border: 0; border-left: 1px solid var(--line); background: white; font-size: 12px; }
.header-actions b { color: var(--red); }
.main-nav { border-top: 1px solid var(--line); border-bottom: 3px solid var(--red); }
.main-nav .container { display: flex; }
.nav-item { min-width: 125px; flex: 1; border: 0; border-left: 1px solid var(--line); background: white; padding: 12px 8px; font-weight: 800; }
.nav-item:last-child { border-right: 1px solid var(--line); }
.nav-item:hover, .nav-item.active { color: white; background: var(--red); }
.keyword-rail { border-bottom: 1px solid var(--line); background: #fafafa; }
.keyword-rail .container { display: flex; gap: 7px; align-items: center; overflow-x: auto; padding: 8px 0; white-space: nowrap; }
.keyword-rail b { font-size: 12px; }
.keyword-rail button, .active-filters button { border: 1px solid #bbb; border-radius: 2px; background: white; padding: 4px 10px; font-size: 12px; }

.page-grid { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 24px; padding-top: 20px; padding-bottom: 50px; }
.filters { align-self: start; border: 1px solid var(--line); position: sticky; top: 8px; }
.filters__title { display: flex; justify-content: space-between; padding: 12px; background: var(--soft); border-bottom: 1px solid var(--line); }
.filters__title button { color: var(--blue); border: 0; background: none; font-size: 12px; }
.filter-group { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.filter-group h2 { margin: 0 0 7px; font-size: 13px; }
.filter-group label { display: flex; gap: 5px; align-items: center; padding: 3px 0; font-size: 12px; }
.filter-group label span { margin-left: auto; color: #888; }
.filter-submit { width: calc(100% - 20px); margin: 12px 10px 7px; }
.match-count { margin: 0 10px 12px; text-align: center; font-size: 12px; }
.button { border: 0; padding: 10px 14px; font-weight: 800; }
.button--primary { color: white; background: var(--red); }
.button--primary:hover { background: var(--red-dark); }
.button--ghost { border: 1px solid #aaa; background: white; }

.status-strip { display: grid; grid-template-columns: 1.4fr repeat(3, .65fr) auto; gap: 10px; align-items: center; border: 1px solid #b9cee0; background: #f0f7fc; padding: 10px 12px; }
.status-strip div { display: grid; }
.status-strip b { color: #205b84; font-size: 11px; }
.status-strip span { font-weight: 800; }
.status-strip button { color: white; border: 0; background: var(--blue); padding: 9px 12px; font-weight: 800; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 24px 0 10px; padding-bottom: 8px; border-bottom: 2px solid #444; }
.section-heading h1, .section-heading h2 { margin: 0; font-size: 21px; }
.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.section-heading button { color: var(--blue); border: 0; background: none; }
.rank-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rank-card { display: grid; grid-template-columns: 46% 1fr; border: 1px solid var(--line); min-height: 168px; position: relative; }
.rank-card__image { width: 100%; height: 100%; object-fit: cover; background: #eee; }
.rank-badge { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 35px; height: 35px; color: white; background: var(--red); font-size: 18px; font-weight: 900; }
.rank-card__body { padding: 11px; }
.rank-card h3 { margin: 0 0 8px; color: var(--blue); font-size: 14px; }
.rank-card p { margin: 4px 0; font-size: 11px; }
.stars { color: var(--orange); font-weight: 800; }
.rank-price, .product-price { color: var(--red); font-size: 17px; font-weight: 900; }

.catalog-toolbar { display: flex; gap: 16px; align-items: end; margin-top: 28px; padding-bottom: 8px; border-bottom: 2px solid #444; }
.catalog-toolbar > div:first-child { margin-right: auto; }
.catalog-toolbar h2 { margin: 0; font-size: 21px; }
.catalog-toolbar p { margin: 2px 0 0; font-size: 11px; }
.catalog-toolbar label { font-size: 12px; }
.catalog-toolbar select { margin-left: 5px; padding: 7px; border: 1px solid #aaa; background: white; }
.view-switch { display: flex; }
.view-switch button { border: 1px solid #aaa; background: white; padding: 7px 9px; }
.view-switch button.active { color: white; background: #555; }
.active-filters { display: flex; flex-wrap: wrap; gap: 5px; min-height: 31px; padding: 7px 0; }
.active-filters button { color: var(--red); border-color: #e8a9b5; }
.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.product-card { position: relative; min-width: 0; border: 1px solid var(--line); background: white; }
.product-card:hover { border-color: #999; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.product-image-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #ddd; }
.product-image { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.product-card:hover .product-image { transform: scale(1.025); }
.product-image-label { position: absolute; left: 5px; bottom: 5px; padding: 2px 5px; color: white; background: rgba(0,0,0,.75); font-size: 9px; }
.sale-ribbon { position: absolute; z-index: 2; top: 0; left: 0; color: #fff; background: var(--red); padding: 4px 7px; font-size: 10px; font-weight: 900; }
.favorite-icon { position: absolute; z-index: 2; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; color: white; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: rgba(0,0,0,.45); font-size: 18px; }
.favorite-icon.saved { color: #fff; background: var(--red); }
.product-body { padding: 9px; }
.product-title { display: -webkit-box; min-height: 42px; margin: 0 0 5px; overflow: hidden; color: var(--blue); -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 800; }
.quick-button--text { width: 100%; padding: 0; text-align: left; border: 0; background: none; }
.product-meta { color: var(--muted); font-size: 10px; }
.product-tags { display: flex; flex-wrap: wrap; gap: 3px; margin: 6px 0; }
.product-tags span { border: 1px solid #bbb; padding: 1px 4px; font-size: 9px; }
.product-row { display: flex; justify-content: space-between; align-items: end; gap: 5px; }
.product-review { font-size: 10px; }
.quick-button { width: 100%; margin-top: 7px; padding: 6px; color: #333; border: 1px solid #aaa; background: white; font-size: 11px; font-weight: 700; }
.product-grid.list { display: block; }
.product-grid.list .product-card { display: grid; grid-template-columns: 200px 1fr; margin-bottom: 10px; }
.product-grid.list .product-image-wrap { aspect-ratio: 16/9; }
.product-grid.list .product-body { padding: 15px; }
.product-grid.list .product-title { min-height: auto; font-size: 17px; }
.empty { display: grid; place-items: center; min-height: 180px; background: var(--soft); }
.empty span { color: var(--muted); }
.load-more { display: block; width: 260px; margin: 20px auto; border: 1px solid #aaa; background: white; padding: 10px; font-weight: 800; }

.genre-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.genre-card { display: grid; gap: 2px; padding: 12px; text-align: center; border: 1px solid var(--line); background: #fff; }
.genre-card b { color: var(--red); }
.genre-card span { color: var(--muted); font-size: 10px; }
.recent-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; min-height: 70px; }
.recent-item { display: grid; grid-template-columns: 64px 1fr; gap: 7px; border: 1px solid var(--line); padding: 5px; background: white; text-align: left; }
.recent-item img { width: 64px; height: 48px; object-fit: cover; }
.recent-item b { display: -webkit-box; overflow: hidden; font-size: 10px; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.recent-empty { color: var(--muted); padding: 20px; background: var(--soft); }
.guide-block { margin-top: 35px; padding: 18px; border: 1px solid var(--line); background: var(--soft); }
.guide-block h2 { margin-top: 0; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.guide-grid article { border-left: 4px solid var(--red); background: white; padding: 12px; }
.guide-grid p { margin-bottom: 0; color: var(--muted); font-size: 12px; }

.footer { border-top: 1px solid var(--line); background: #f5f5f5; }
.footer__grid { display: grid; grid-template-columns: 1.2fr .7fr .7fr 1.5fr; gap: 35px; padding: 28px 0; }
.footer-brand strong { display: block; color: var(--red); font-size: 24px; }
.footer-brand span { font-weight: 900; letter-spacing: .28em; }
.footer p { font-size: 11px; }
.footer div > button { display: block; color: #444; border: 0; background: none; padding: 3px 0; font-size: 11px; }
.footer div > a { display: block; color: #444; padding: 3px 0; font-size: 11px; text-decoration: none; }
.footer div > a:hover { text-decoration: underline; }
.adult-note { border: 1px solid #e6a7b2; background: #fff; padding: 12px; }
.adult-note b { color: var(--red); }
.footer-bottom { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.legal-page { width: min(860px, calc(100% - 28px)); margin: 40px auto 80px; line-height: 1.8; }
.legal-page h1, .legal-page h2 { border-bottom: 2px solid var(--red); padding-bottom: 8px; }
.legal-page section { margin-top: 32px; }
.legal-note { border: 1px solid #e7b2bd; background: #fff7f9; padding: 14px; }

.age-gate { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.82); }
.age-gate.hidden { display: none; }
.age-gate__panel { width: min(400px, calc(100% - 30px)); border-top: 5px solid var(--red); background: white; padding: 28px; text-align: center; }
.age-gate__panel .button { display: block; width: 100%; margin-top: 9px; }
.age-logo b { display: block; color: var(--red); font-size: 25px; }
.age-logo span { font-weight: 900; letter-spacing: .25em; }
dialog { width: min(1000px, calc(100% - 30px)); max-height: calc(100vh - 30px); border: 0; padding: 0; box-shadow: 0 12px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.7); }
.dialog-close { position: sticky; z-index: 4; float: right; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #222; color: white; font-size: 20px; }
.detail-shell { display: grid; grid-template-columns: 42% 1fr; padding: 28px; gap: 25px; }
.detail-image { width: 100%; max-height: 430px; object-fit: cover; }
.detail-info h2 { margin: 0 45px 8px 0; color: var(--blue); font-size: 23px; }
.detail-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12px; }
.detail-table th, .detail-table td { border: 1px solid var(--line); padding: 7px; text-align: left; }
.detail-table th { width: 95px; background: var(--soft); }
.detail-actions { display: flex; gap: 8px; margin-top: 15px; }
.detail-actions button { flex: 1; }
.directory-shell { padding: 28px; }
.directory-shell h2 { margin-top: 0; }
.directory-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.directory-list button { display: flex; justify-content: space-between; border: 1px solid var(--line); background: white; padding: 10px; text-align: left; }
.toast { position: fixed; z-index: 60; right: 20px; bottom: 20px; max-width: 380px; color: white; background: #222; padding: 12px 15px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-nav { display: none; }

@media (max-width: 1100px) {
  .header__main { grid-template-columns: 210px 1fr; }
  .header-actions { display: none; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .rank-card { grid-template-columns: 40% 1fr; }
  .genre-grid { grid-template-columns: repeat(4, 1fr); }
  .recent-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  body { padding-bottom: 55px; }
  .container { width: min(100% - 20px, 1380px); }
  .top-notice .container span:first-child { display: none; }
  .header__main { grid-template-columns: 1fr; gap: 12px; }
  .logo { text-align: center; }
  .main-nav .container { overflow-x: auto; }
  .nav-item { min-width: 118px; }
  .page-grid { display: block; }
  .filters { display: none; position: static; margin-bottom: 15px; }
  .filters.open { display: block; }
  .status-strip { grid-template-columns: repeat(2, 1fr); }
  .status-strip button { grid-column: 1 / -1; }
  .rank-cards { grid-template-columns: 1fr; }
  .section-heading { flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; }
  .catalog-toolbar { flex-wrap: wrap; }
  .catalog-toolbar > div:first-child { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-grid.list .product-card { grid-template-columns: 120px 1fr; }
  .genre-grid { grid-template-columns: repeat(2, 1fr); }
  .recent-list { grid-template-columns: repeat(2, 1fr); }
  .guide-grid, .footer__grid { grid-template-columns: 1fr; }
  .detail-shell { display: block; padding: 18px; }
  .detail-image { max-height: 300px; }
  .directory-list { grid-template-columns: repeat(2, 1fr); }
  .mobile-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: white; }
  .mobile-nav button { border: 0; border-right: 1px solid var(--line); background: white; padding: 11px 2px; font-size: 11px; }
}
@media (max-width: 470px) {
  .logo strong { font-size: 24px; }
  .search button { width: 72px; }
  .sale-switch { display: none; }
  .product-card .product-body { padding: 7px; }
  .product-title { font-size: 12px; }
  .product-grid.list .product-card { grid-template-columns: 105px 1fr; }
  .recent-list { grid-template-columns: 1fr; }
}
