:root {
    --ink: #404040;
    --muted: #a8a8a8;
    --line: #ececec;
    --bg: #fff;
    --accent: #3d5c54;
    --link: #296eb8;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; overflow-x: clip; }
  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;
    overflow-x: clip;
  }
  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(960px, calc(100% - 32px)); 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; }
  @media (max-width: 800px) {
    .ticker__inner { flex-direction: column; align-items: flex-start; }
    .ticker__right { white-space: normal; text-align: left; }
  }

  .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);
  }

  

  .page { padding: 28px 0 64px; min-height: 50vh; }
  .crumb {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin: 0 0 22px; font-size: 12px; color: var(--muted);
  }
  .crumb a:hover { color: var(--accent); }
  .page h1 {
    margin: 0 0 24px;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "メイリオ", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 20px; font-weight: 400; letter-spacing: .08em;
  }

  .cart-empty {
    padding: 48px 20px; text-align: center; border: 1px solid var(--line);
  }
  .cart-empty p { margin: 0 0 18px; color: var(--muted); }
  .cart-empty a {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 22px;
    background: var(--accent); color: #fff; font-weight: 700; border-radius: 4px;
  }

  .cart-layout {
    display: grid; gap: 28px;
  }
  @media (min-width: 880px) {
    .cart-layout { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
  }

  .cart-list { border-top: 1px solid var(--line); }
  .cart-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  @media (min-width: 640px) {
    .cart-row { grid-template-columns: 96px minmax(0, 1fr) auto; }
  }
  .cart-row__img {
    width: 88px; height: 88px; background: #f7f7f7; overflow: hidden;
  }
  @media (min-width: 640px) { .cart-row__img { width: 96px; height: 96px; } }
  .cart-row__img img { width: 100%; height: 100%; object-fit: cover; }
  .cart-row__main { min-width: 0; }
  .cart-row__name {
    margin: 0 0 6px; font-size: 14px; font-weight: 700; line-height: 1.35;
  }
  .cart-row__name a:hover { color: var(--accent); }
  .cart-row__meta { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
  .cart-row__warn { margin: 0 0 8px; font-size: 12px; color: #9f0404; }
  .cart-row__ops {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  }
  .qty {
    display: inline-flex; align-items: center;
    border: 1px solid #d0d0d0; border-radius: 4px; overflow: hidden;
  }
  .qty button {
    width: 36px; height: 36px; display: grid; place-items: center;
  }
  .qty button:hover { background: #f6f6f6; }
  .qty button:disabled { opacity: .35; cursor: not-allowed; }
  .qty input {
    width: 44px; height: 36px;
    border: 0; border-left: 1px solid #d0d0d0; border-right: 1px solid #d0d0d0;
    text-align: center; font: inherit; color: var(--ink);
  }
  .cart-row__remove {
    font-size: 12px; color: var(--muted); text-decoration: underline;
  }
  .cart-row__remove:hover { color: var(--ink); }
  .cart-row__price {
    font-size: 14px; font-weight: 700; white-space: nowrap;
    justify-self: end; align-self: start;
  }
  .cart-row__price .tax { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }
  .cart-row.is-oos { opacity: .72; }

  .cart-summary {
    border: 1px solid var(--line);
    padding: 20px 18px;
    position: sticky; top: 84px;
  }
  .cart-summary h2 {
    margin: 0 0 14px; font-size: 14px; letter-spacing: .06em;
  }
  .sum-row {
    display: flex; justify-content: space-between; gap: 12px;
    margin: 0 0 10px; font-size: 12px;
  }
  .sum-row--total {
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
    font-size: 16px; font-weight: 700;
  }
  .sum-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
  .btn-checkout {
    width: 100%; margin-top: 18px; min-height: 46px;
    background: var(--accent); color: #fff;
    font-size: 14px; font-weight: 700; border-radius: 4px;
  }
  .btn-checkout:hover { filter: brightness(1.06); }
  .btn-checkout:disabled {
    background: #c8c8c8; cursor: not-allowed; filter: none;
  }
  .checkout-msg {
    margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.45;
  }
