:root {
    --ink: #404040;
    --muted: #a8a8a8;
    --line: #ececec;
    --bg: #fff;
    --accent: #3d5c54;
    --link: #296eb8;
    --cat: #ff9933;
    --hover: #f4f6fa;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    color: var(--ink);
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "メイリオ", "Yu Gothic", "Noto Sans JP", sans-serif;
    background: var(--bg);
    line-height: 1.5;
    font-size: 14px;
  }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
  img { display: block; max-width: 100%; }

  .wrap { width: min(1320px, calc(100% - 20px)); margin: 0 auto; }

  .ticker {
    background: #fff;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
  }
  .ticker__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 20px 0;
  }
  .ticker__left,
  .ticker__right { margin: 0; font-size: 14px; }
  .ticker__left { flex: 1 1 auto; min-width: 0; }
  .ticker__right { flex: 0 1 auto; text-align: right; white-space: nowrap; }
  .ticker__em { color: #9f0404; font-weight: 700; }

  .nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
  }
  .nav__top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 10px 0;
  }
  .brand {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "メイリオ", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 20px;
    letter-spacing: .18em; font-weight: 400;
    white-space: nowrap; flex-shrink: 0;
    line-height: 1;
  }
  .nav__search {
    display: flex; align-items: stretch;
    width: 100%; max-width: 600px; margin: 0 auto;
    border: 1px solid #d0d0d0; border-radius: 8px;
    background: #fff; overflow: hidden;
  }
  .nav__search input {
    flex: 1; min-width: 0; border: 0; background: transparent;
    padding: 12px 14px; font-size: 14px; outline: none;
  }
  .nav__search button {
    width: 44px; display: grid; place-items: center;
    color: var(--muted); border-left: 1px solid var(--line);
  }
  .nav__search button:hover { color: var(--ink); background: #f0f0f0; }
  .nav__search svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
  .nav__right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
  .nav__auth {
    display: flex; align-items: center; gap: 10px;
    font-size: 11px; color: var(--muted); margin-right: 4px;
  }
  .nav__auth a:hover, .nav__auth button:hover { color: var(--ink); }
  .nav__login {
    display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
    font-size: 11px; letter-spacing: .04em; color: var(--ink); line-height: 1.1;
    min-width: 42px; padding: 4px 2px;
  }
  .nav__login:hover { opacity: .7; }
  .nav__user { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav__icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); }
  .nav__icon:hover { opacity: .7; }
  .nav__icon:not(.nav__icon--label) svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
  .nav__icon--label {
    width: auto; min-width: 42px; height: auto;
    display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
    font-size: 11px; letter-spacing: .04em; line-height: 1.1; padding: 4px 2px;
  }
  .nav__login svg, .nav__icon--label svg {
    width: 22px; height: 22px; display: block; flex-shrink: 0; stroke: currentColor; fill: none;
  }
  .nav__cart-ico { position: relative; display: grid; place-items: center; }
  .nav__cart-badge {
    position: absolute; top: -7px; right: -9px; z-index: 1;
    min-width: 18px; height: 18px; padding: 0 5px;
    border: 1px solid #fff; border-radius: 999px;
    background: #ef3038; color: #fff;
    font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
  }

  .drawer-bg {
    position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 60; display: none;
  }
  .drawer-bg.is-open { display: block; }
  .drawer {
    position: fixed; right: 0; top: 0; bottom: 0; width: min(300px, 86vw);
    background: #fff; z-index: 70; transform: translateX(105%);
    transition: transform .25s ease; overflow-y: auto; padding: 20px 20px 40px;
  }
  .drawer.is-open { transform: translateX(0); }
  .drawer__close { float: right; font-size: 20px; line-height: 1; color: var(--muted); }
  .drawer h3 {
    clear: both; margin: 22px 0 10px; font-size: 11px;
    letter-spacing: .14em; color: var(--muted); font-weight: 700;
  }
  .drawer ul { list-style: none; margin: 0; padding: 0; }
  .drawer li { border-bottom: 1px solid var(--line); }
  .drawer a, .drawer button {
    display: block; width: 100%; text-align: left; padding: 12px 0; font-size: 12px;
  }

  .modal {
    position: fixed; inset: 0; z-index: 100;
    display: none; align-items: center; justify-content: center;
    padding: 20px; background: rgba(0,0,0,.45);
  }
  .modal.is-open { display: flex; }
  .modal__panel {
    width: min(380px, 100%);
    background: #fff; padding: 32px 28px 24px; position: relative;
  }
  .modal__close { position: absolute; right: 12px; top: 10px; font-size: 20px; color: var(--muted); }
  .modal h2 {
    margin: 0 0 8px;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "メイリオ", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 20px; letter-spacing: .06em; font-weight: 400;
  }
  .modal .hint { margin: 0 0 18px; font-size: 12px; color: var(--muted); }
  .modal label { display: block; font-size: 11px; color: var(--muted); margin: 0 0 6px; }
  .modal input[type="text"],
  .modal input[type="password"] {
    width: 100%; padding: 10px 12px; margin-bottom: 14px;
    border: 1px solid var(--line); font-size: 14px;
  }
  .modal__submit {
    width: 100%; padding: 12px; border: 0; cursor: pointer;
    background: var(--ink); color: #fff; font-size: 12px;
  }
  .modal__links {
    margin-top: 14px; display: flex; justify-content: space-between;
    font-size: 12px; color: var(--accent);
  }

  footer {
    background: #fff;
    color: var(--ink);
    border-top: 1px solid var(--line);
    padding: 40px 0 0;
    font-size: 14px;
  }
  .foot__grid {
    display: grid; gap: 32px 28px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 40px;
  }
  @media (min-width: 900px) {
    .foot__grid { grid-template-columns: repeat(4, 1fr); }
  }
  footer h4 {
    margin: 0 0 16px; font-size: 16px; font-weight: 700;
    letter-spacing: .02em; color: var(--ink);
  }
  footer ul { list-style: none; margin: 0; padding: 0; }
  footer li { margin: 0; }
  .foot__grid > div > ul > li > a {
    display: inline-block; color: var(--ink); font-size: 14px;
    padding: 8px 0; line-height: 1.4;
  }
  .foot__grid > div > ul > li > a:hover { text-decoration: underline; }
  .foot__sns { list-style: none; margin: 0; padding: 0; }
  .foot__sns li + li { margin-top: 10px; }
  .foot__sns a { display: block; color: var(--ink); text-decoration: none; padding: 6px 0; }
  .foot__sns a:hover { opacity: .65; text-decoration: none; }
  .foot__sns-row { display: flex; align-items: center; gap: 10px; }
  .foot__sns-row svg { width: 24px; height: 24px; flex-shrink: 0; }
  .foot__sns-row strong { font-size: 14px; font-weight: 700; }
  .foot__sns p { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }

  @media (max-width: 720px) {
    .brand img { height: 36px; max-width: 140px; }

    footer { padding-top: 0; }
    footer h4 {
      font-size: 14px; color: var(--muted); background: #f4f6fa;
      border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
      padding: 12px; margin: 0;
    }
    .foot__grid { gap: 0; margin-bottom: 0; }
    .foot__grid > div > ul > li > a {
      display: block; width: 100%; padding: 16px; box-sizing: border-box;
    }
    .foot__sns li + li { margin-top: 0; }
    .foot__sns a { padding: 16px; }
  }
  @media (max-width: 860px) {
    .ticker { font-size: 12px; }
    .ticker__left, .ticker__right { font-size: 12px; }
    .ticker__inner { padding: 14px 0; flex-wrap: wrap; }
    .ticker__right { white-space: normal; text-align: left; }
    .nav__top {
      grid-template-columns: 1fr auto;
      grid-template-areas: "brand right" "search search";
      gap: 8px 12px;
    }
    .brand { grid-area: brand; font-size: 16px; letter-spacing: .12em; align-self: center; }
    .nav__search { grid-area: search; max-width: none; }
    .nav__search input { padding: 9px 12px; font-size: 14px; }
    .nav__right { grid-area: right; }
    .nav__auth { display: none; }
    .nav__login, .nav__icon--label { font-size: 0; }
    .nav__login svg, .nav__icon--label svg { width: 20px; height: 20px; }
    .modal__panel { padding: 28px 20px 20px; }
    .modal__links { flex-direction: column; gap: 8px; }

  }
  @media (max-width: 480px) {
    .wrap { width: calc(100% - 16px); }
    .nav__login span, .nav__icon--label span { display: none; }
    .nav__login, .nav__icon--label { gap: 0; padding: 6px; min-width: 36px; }
  }
  @supports (padding: max(0px)) {

    .drawer { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
    .nav { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  }

  
  .page {
    padding: 28px 0 56px;
  }
  .page__inner {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    overflow: visible;
  }
  @media (max-width: 900px) {
    .page__inner { grid-template-columns: 1fr; }
    .side { display: none; }
  }

  .side {
    font-size: 14px;
    position: sticky;
    top: 80px;
    z-index: 5;
    color: var(--ink);
  }
  .side__block { margin-bottom: 48px; }
  .side__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.4;
    padding-bottom: 0;
    border-bottom: 0;
    color: var(--ink);
  }
  .side__cat {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--cat);
  }
  .side__cat a,
  .side .side__cat a { color: var(--cat); }
  .side__cat a:hover,
  .side .side__cat a:hover { color: var(--cat); opacity: .75; }
  .side__cat--sub { margin-top: 24px; }
  .side ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
  }
  .side__menu > li {
    border-bottom: 0;
    position: relative;
  }
  .side__menu > li > a {
    display: block;
    padding: 12px;
    font-size: 14px;
    color: var(--ink);
    border-radius: 8px;
    transition: background .2s;
  }
  .side__menu > li > a:hover { background: var(--hover); color: var(--ink); }
  .side__menu > li > a.is-on { background: var(--hover); font-weight: 700; }

  .side-fly { position: relative; width: 100%; }
  .side__menu > li.side-fly > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink);
  }
  .side__menu > li.side-fly > a::after {
    content: ">";
    font-size: 12px;
    font-weight: 400;
    color: #a8a8a8;
    line-height: 1;
    flex: 0 0 auto;
    margin-left: auto;
  }
  .side-fly:hover > a,
  .side-fly:focus-within > a { background: var(--hover); }
  .side-fly__panel {
    display: none;
    position: absolute;
    left: calc(100% + 0px);
    top: 0;
    min-width: 112px;
    width: fit-content;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(0, 0, 0, .08);
    padding: 0;
    z-index: 30;
  }
  .side-fly:hover > .side-fly__panel,
  .side-fly:focus-within > .side-fly__panel { display: block; }
  .side-fly__panel a {
    display: block;
    padding: 12px;
    color: var(--ink);
    font-size: 14px;
    border: 0;
    white-space: nowrap;
    border-radius: 0;
  }
  .side-fly__panel li:first-child a { border-radius: 8px 8px 0 0; }
  .side-fly__panel li:last-child a { border-radius: 0 0 8px 8px; }
  .side-fly__panel a:hover {
    background: var(--hover);
    color: var(--ink);
  }
  .side-fly__panel a.is-on { background: var(--hover); font-weight: 700; }
  .side a { color: var(--ink); text-decoration: none; }
  .side a:hover { color: var(--ink); }
  .side .side-fly > a:hover,
  .side .side-fly__panel a:hover { color: var(--ink); }
  .side__block--list li { border-bottom: 0; }
  .side__block--list a {
    display: block;
    padding: 12px;
    font-size: 14px;
    border-radius: 8px;
    transition: background .2s;
  }
  .side__block--list a:hover {
    background: var(--hover);
    color: var(--ink);
  }
