:root {
  --brand: #f0573b;
  --brand-deep: #c93b22;
  --brand-soft: #fff1ec;
  --ink: #1f2328;
  --ink-2: #4b5260;
  --ink-3: #8a909c;
  --line: #e6e8ec;
  --line-2: #d5d8de;
  --bg: #ffffff;
  --bg-2: #f5f6f8;
  --ok: #18a058;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .06), 0 4px 14px rgba(20, 24, 31, .06);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ヘッダー */
.hd { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.hd-in { max-width: 1240px; margin: 0 auto; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.logo { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 14px 0 0; flex: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 15px; letter-spacing: -.02em; }
.logo-text { font-weight: 900; font-size: 19px; letter-spacing: .02em; }
.logo-text small { display: block; font-size: 10px; font-weight: 500; color: var(--ink-3); letter-spacing: .08em; margin-top: -3px; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; background: var(--bg-2); border: 1px solid transparent; border-radius: var(--radius); height: 38px; padding: 0 6px 0 12px; transition: border-color .15s, background .15s; }
.search:focus-within { background: #fff; border-color: var(--line-2); }
.search input { flex: 1; border: 0; background: transparent; outline: 0; font-size: 14px; }
.search button { border: 0; background: transparent; width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; border-radius: 4px; }
.hd-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { height: 38px; min-width: 38px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius); color: var(--ink-2); font-size: 13px; border: 0; background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(24, 160, 88, .16); }
.status-dot.warn { background: #e8a000; box-shadow: 0 0 0 3px rgba(232, 160, 0, .2); }
.update-box { border: 1px solid #f0c36a; background: #fff8e8; color: #7a5200; border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.7; }
.update-box b { display: block; font-size: 14px; margin-bottom: 2px; }

.notice { background: var(--brand-soft); color: var(--brand-deep); font-size: 13px; }
.notice-in { max-width: 1240px; margin: 0 auto; padding: 8px 20px; display: flex; gap: 8px; align-items: center; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.crumb { font-size: 12px; color: var(--ink-3); padding: 16px 0 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a:hover { color: var(--brand); text-decoration: underline; }

/* トップの見出し帯 */
.hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff 0%, #fff7f4 100%); }
.hero-in { max-width: 1240px; margin: 0 auto; padding: 36px 20px 30px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: center; }
.hero-eyebrow { color: var(--brand); font-weight: 700; font-size: 12px; letter-spacing: .14em; }
.hero h1 { font-size: 34px; line-height: 1.35; margin: 10px 0 12px; font-weight: 900; letter-spacing: .01em; }
.hero p { margin: 0; color: var(--ink-2); line-height: 1.8; font-size: 15px; }
.hero-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hero-steps li { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.hero-steps b { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.hero-steps span small { display: block; color: var(--ink-3); font-size: 12px; }

.section { padding: 28px 0 8px; }
.section-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-hd h2 { font-size: 20px; margin: 0; font-weight: 700; }
.section-hd .count { color: var(--ink-3); font-size: 13px; }

/* 絞り込み */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.chip { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.toolbar select { height: 32px; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 10px; background: #fff; font-size: 13px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }

/* 商品カード（BOOTHと同じく正方形サムネ＋2行タイトル） */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 28px 18px; padding-bottom: 48px; }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.035); }
.badge { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 3px; background: var(--brand); color: #fff; letter-spacing: .04em; }
.badge.soon { background: rgba(31, 35, 40, .78); }
.card-cat { font-size: 11px; color: var(--ink-3); }
.card-title { font-size: 14px; line-height: 1.45; font-weight: 700; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card:hover .card-title { color: var(--brand-deep); }
.card-shop { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.card-shop i { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 10px; font-style: normal; font-weight: 900; }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.price { color: var(--brand); font-weight: 700; }
.likes { color: var(--ink-3); display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }
.likes svg { width: 13px; height: 13px; }
.empty { padding: 60px 0; text-align: center; color: var(--ink-3); }

/* 詳細ページ */
.item { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; padding: 8px 0 56px; }
.gallery { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }
.side { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 14px; }
.side-cat { font-size: 12px; color: var(--ink-3); }
.side h1 { font-size: 22px; line-height: 1.5; margin: 0; font-weight: 700; }
.side .lead { color: var(--ink-2); font-size: 14px; line-height: 1.8; margin: 0; }
.plan { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.plan small { display: block; font-size: 12px; color: var(--ink-3); }
.plan strong { font-size: 18px; color: var(--brand); }
.btn { height: 46px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 0 18px; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-line:hover { border-color: var(--ink-3); }
.btn[aria-disabled="true"] { background: var(--bg-2); color: var(--ink-3); cursor: default; border-color: var(--line); }
.btn-sm { height: 34px; font-size: 13px; padding: 0 12px; white-space: nowrap; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; color: var(--ink-2); background: var(--bg-2); border-radius: 3px; padding: 4px 8px; }
.desc h2 { font-size: 17px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin: 32px 0 14px; }
.desc p { line-height: 1.9; color: var(--ink-2); margin: 0 0 10px; font-size: 15px; }
.note { font-size: 12px; color: var(--ink-3); line-height: 1.7; }

/* 設定画面 */
.settings { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; padding: 8px 0 56px; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.panel + .panel { margin-top: 16px; }
.panel-hd { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-hd h2 { margin: 0; font-size: 15px; }
.panel-bd { padding: 16px 18px; }
.side-nav { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 16px; }
.mini { display: flex; gap: 12px; align-items: center; }
.mini img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); }
.mini b { font-size: 14px; line-height: 1.5; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-size: 13px; font-weight: 700; }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input { height: 38px; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 10px; background: #fff; width: 100%; }
.input:focus { outline: 2px solid rgba(240, 87, 59, .25); border-color: var(--brand); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.switch:first-child { border-top: 0; }
.switch input { width: 40px; height: 22px; appearance: none; background: var(--line-2); border-radius: 11px; position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.prize-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prize-table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 500; padding: 0 6px 6px; }
.prize-table td { padding: 4px 6px; border-top: 1px solid var(--line); }
.prize-table td .input { height: 34px; }
.prize-table .x { width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; border-radius: 4px; }
.prize-table .x:hover { background: var(--bg-2); color: var(--brand-deep); }
.rate-bar { height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; display: flex; margin: 6px 0 4px; }
.rate-bar span { display: block; height: 100%; }
.rate-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.rate-legend .bad { color: var(--brand-deep); font-weight: 700; }
.r-SSR { background: linear-gradient(90deg, #ff6fb5, #ffcc4d, #5ce1e6, #9b7bff); }
.r-SR { background: #f5b301; }
.r-R { background: #5b8def; }
.r-N { background: #9aa3b2; }
.savebar { position: sticky; bottom: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 12px 0; display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin-top: 16px; }
.savebar .msg { margin-right: auto; font-size: 13px; color: var(--ink-3); }
.preview { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: repeating-conic-gradient(#eef0f3 0% 25%, #fafbfc 0% 50%) 50% / 24px 24px; position: relative; }
.preview { aspect-ratio: 16 / 9; }
.preview iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; }
.steps { margin: 0; padding-left: 20px; line-height: 1.9; font-size: 14px; color: var(--ink-2); }
.steps code { font-size: 12px; background: var(--bg-2); padding: 2px 6px; border-radius: 3px; }

/* 「？」の説明（カーソルを合わせる・タップ・キーボードで開く） */
.help { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 11px; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; flex: none; font-style: normal; }
.help:hover, .help:focus-visible, .help.open { background: var(--ink); border-color: var(--ink); color: #fff; outline: none; }
.help-tip { position: fixed; z-index: 60; max-width: 300px; padding: 10px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.7; box-shadow: 0 8px 24px rgba(20, 24, 31, .25); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; white-space: normal; text-align: left; letter-spacing: 0; }
.help-tip.show { opacity: 1; transform: translateY(0); }
.step-badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 900; margin-right: 8px; flex: none; }
.panel-hd h2 { display: flex; align-items: center; }
.done-mark { color: var(--ok); font-size: 12px; font-weight: 700; }

.ft { border-top: 1px solid var(--line); background: var(--bg-2); color: var(--ink-3); font-size: 12px; }
.ft-in { max-width: 1240px; margin: 0 auto; padding: 24px 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; font-size: 13px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero-in, .item, .settings { grid-template-columns: 1fr; }
  .side, .side-nav { position: static; }
  .hero h1 { font-size: 26px; }
  .logo-text small, .icon-btn .lbl { display: none; }
}
@media (max-width: 560px) {
  .hd-in { gap: 8px; padding: 0 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .wrap { padding: 0 12px; }
  .row2 { grid-template-columns: 1fr; }
}
