:root{
  --bg:#f6f7f9; --surface:#ffffff; --text:#1c2530; --muted:#6b7684;
  --border:#e3e7ec; --primary:#2f6df6; --primary-ink:#fff;
  --success:#0f9d58; --danger:#d93838; --warn:#b8860b;
  --radius:12px; --shadow:0 1px 3px rgba(0,0,0,.06),0 8px 24px rgba(0,0,0,.05);
  --maxw:1080px;
}
[data-theme="dark"]{
  --bg:#12161c; --surface:#1b2129; --text:#e7ecf2; --muted:#98a4b3;
  --border:#2b333d; --primary:#5b8dff; --primary-ink:#0b1017;
  --shadow:0 1px 3px rgba(0,0,0,.4),0 10px 30px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans JP",sans-serif;
  line-height:1.7; -webkit-font-smoothing:antialiased;
}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
h1{font-size:1.7rem;margin:.2em 0 .6em}
h2{font-size:1.3rem;margin:1.4em 0 .6em}
.muted{color:var(--muted)}
.small{font-size:.85rem}
.skip{position:absolute;left:-999px}
.skip:focus{left:8px;top:8px;background:var(--surface);padding:8px;z-index:100}

/* header */
.site-header{background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:30}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:60px;gap:16px}
.brand{font-weight:700;font-size:1.05rem;color:var(--text);display:inline-flex;align-items:center;gap:10px}
.brand:hover{text-decoration:none}
.brand-mark{border-radius:8px;display:block;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.brand-word{letter-spacing:.16em;font-weight:800}
.main-nav{display:flex;align-items:center;gap:22px}
.main-nav a{color:var(--muted);font-size:.9rem;font-weight:600}
.main-nav a:hover{color:var(--text);text-decoration:none}
.theme-toggle{background:none;border:1px solid var(--border);border-radius:8px;padding:5px 9px;cursor:pointer;color:var(--muted);font-size:.85rem}
.theme-toggle:hover{color:var(--text)}
.linklike{background:none;border:none;color:var(--muted);cursor:pointer;font:inherit;font-weight:600;padding:0}
.linklike:hover{color:var(--text)}
.inline{display:inline}

/* hamburger */
.nav-toggle{display:none;flex-direction:column;justify-content:space-between;
  width:40px;height:34px;padding:9px 7px;background:none;border:1px solid var(--border);
  border-radius:9px;cursor:pointer}
.nav-toggle span{display:block;height:2px;width:100%;background:var(--text);border-radius:2px;transition:.22s}
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

@media(max-width:860px){
  .nav-toggle{display:flex}
  .main-nav{
    position:absolute;left:0;right:0;top:100%;
    flex-direction:column;align-items:stretch;gap:0;
    background:var(--surface);border-bottom:1px solid var(--border);box-shadow:var(--shadow);
    max-height:0;overflow:hidden;transition:max-height .25s ease}
  .main-nav.open{max-height:80vh;overflow:auto}
  .main-nav > a,
  .main-nav > .theme-toggle,
  .main-nav .inline .linklike{
    display:block;width:100%;text-align:left;padding:15px 20px;font-size:1rem;color:var(--text);
    border:0;border-top:1px solid var(--border);border-radius:0}
  .main-nav > .inline{display:block;width:100%}
}

/* layout blocks */
main.wrap{padding-top:28px;padding-bottom:60px;min-height:60vh}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow)}
.stack>*+*{margin-top:16px}
.row{display:flex;gap:16px;flex-wrap:wrap}
.between{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}

/* buttons */
.btn{display:inline-block;background:var(--primary);color:var(--primary-ink);border:none;
  border-radius:10px;padding:11px 20px;font-size:.95rem;font-weight:600;cursor:pointer;text-align:center}
.btn:hover{filter:brightness(1.05);text-decoration:none}
.btn.secondary{background:transparent;color:var(--text);border:1px solid var(--border)}
.btn.danger{background:var(--danger)}
.btn.block{display:block;width:100%}
.btn.sm{padding:6px 12px;font-size:.85rem}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn.gbtn{background:#fff;color:#3c4043;border:1px solid #dadce0;
  display:flex;align-items:center;justify-content:center;gap:10px}
.btn.gbtn:hover{filter:none;background:#f7f8f8}

/* forms */
label{display:block;font-size:.9rem;font-weight:600;margin-bottom:6px}
input[type=text],input[type=email],input[type=password],input[type=number],select,textarea{
  width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:9px;
  background:var(--bg);color:var(--text);font:inherit}
textarea{min-height:110px;resize:vertical}
.field+.field{margin-top:16px}
.help{font-size:.82rem;color:var(--muted);margin-top:4px}

/* flashes */
.flashes{margin-bottom:20px;display:grid;gap:8px}
.flash{padding:12px 16px;border-radius:10px;border:1px solid var(--border);background:var(--surface)}
.flash-error{border-color:var(--danger);color:var(--danger)}
.flash-success{border-color:var(--success);color:var(--success)}
.flash-info{border-color:var(--primary)}

/* product grid */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}

/* category bar */
.cat-bar{display:flex;gap:8px;overflow-x:auto;padding:14px 0 16px;margin-bottom:8px;
  border-bottom:1px solid var(--border);scrollbar-width:none}
.cat-bar::-webkit-scrollbar{display:none}
.cat-bar .chip{flex:0 0 auto}

/* benefits */
.benefits{margin-top:52px;padding:36px 32px 40px;border-radius:16px;
  background:linear-gradient(180deg,var(--surface),transparent);
  border:1px solid var(--border)}
.benefits-lead{margin:0 0 24px;text-align:center;font-weight:800;letter-spacing:.02em;
  font-size:1.15rem}
.benefits-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:36px}
.benefit{text-align:center}
.benefit-ico{display:inline-flex;align-items:center;justify-content:center;
  width:52px;height:52px;border-radius:14px;margin-bottom:14px;
  background:var(--primary);color:var(--primary-ink)}
.benefit-ico svg{width:26px;height:26px}
.benefit h3{margin:0 0 8px;font-size:1rem}
.benefit p{margin:0;font-size:.87rem;color:var(--muted);line-height:1.75}
@media(max-width:720px){
  .benefits{padding:28px 20px 32px;margin-top:40px}
  .benefits-grid{grid-template-columns:1fr;gap:24px}
  .benefit{display:flex;gap:16px;text-align:left;align-items:flex-start}
  .benefit-ico{flex:0 0 48px;width:48px;height:48px;margin-bottom:0}
}

/* carousel rows */
.row-sec{margin:26px 0}
.row-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:14px}
.row-head h2{margin:0;font-size:1.15rem}
.row-more{font-size:.85rem;font-weight:600;color:var(--muted);white-space:nowrap}
.row-more:hover{color:var(--primary)}
.carousel{position:relative}
.car-track{display:flex;gap:16px;overflow-x:auto;scroll-behavior:smooth;
  scroll-snap-type:x proximity;padding-bottom:10px;scrollbar-width:none}
.car-track::-webkit-scrollbar{display:none}
.car-track > .product-card{flex:0 0 236px;scroll-snap-align:start}
.car-nav{position:absolute;top:calc(50% - 34px);z-index:6;width:38px;height:38px;border-radius:50%;
  border:1px solid var(--border);background:var(--surface);color:var(--text);
  font-size:1.3rem;line-height:1;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.2);
  opacity:0;pointer-events:none;transition:opacity .15s}
.carousel:hover .car-nav:not(:disabled){opacity:1;pointer-events:auto}
.car-nav.prev{left:-4px}
.car-nav.next{right:-4px}
@media(hover:none),(max-width:640px){.car-nav{display:none}}

.product-card{overflow:hidden;display:flex;flex-direction:column}
.product-card .thumb{aspect-ratio:16/10;background:var(--bg);width:100%;object-fit:cover;border-bottom:1px solid var(--border)}
.product-card .body{padding:14px 16px;display:flex;flex-direction:column;gap:6px;flex:1}
.product-card h3{margin:0;font-size:1rem}
.product-card h3 a{color:var(--text)}
.product-card .desc{font-size:.85rem;color:var(--muted);flex:1}
.price{font-weight:700;font-size:1.1rem}
.price.big{font-size:1.5rem}
.price.sale .was{color:var(--muted);text-decoration:line-through;font-weight:400;margin-right:6px;font-size:.85em}
.price.sale .now{color:var(--danger)}
.sale-badge{display:inline-block;background:var(--danger);color:#fff;font-size:.7rem;font-weight:700;
  border-radius:5px;padding:1px 6px;margin-left:6px;vertical-align:middle}
.sale-until{display:inline-block;font-size:.75rem;color:var(--danger);margin-left:6px;font-weight:700}
.tag{display:inline-block;font-size:.72rem;background:var(--bg);border:1px solid var(--border);
  border-radius:999px;padding:2px 10px;color:var(--muted)}

/* tables */
table{width:100%;border-collapse:collapse;font-size:.9rem}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--border)}
th{color:var(--muted);font-weight:600}
.badge{font-size:.75rem;padding:2px 9px;border-radius:999px;border:1px solid var(--border)}
.badge.paid{color:var(--success);border-color:var(--success)}
.badge.pending{color:var(--warn);border-color:var(--warn)}
.badge.failed{color:var(--danger);border-color:var(--danger)}

/* 在庫バッジ */
.stock{display:inline-block;font-size:.75rem;padding:2px 9px;border-radius:999px;border:1px solid var(--border);color:var(--muted)}
.stock.low{color:var(--warn);border-color:var(--warn);font-weight:700}
.stock.out{color:var(--danger);border-color:var(--danger);font-weight:700}
.soldout-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.45);color:#fff;font-weight:800;font-size:1.1rem;letter-spacing:.1em}

/* footer */
.site-footer{background:var(--surface);border-top:1px solid var(--border);margin-top:56px}
.footer-top{display:flex;justify-content:space-between;gap:40px;flex-wrap:wrap;padding-top:32px;padding-bottom:24px}
.footer-about{max-width:280px}
.footer-about .brand-word{font-size:1rem}
.footer-about p{margin:10px 0 0}
.footer-nav{display:flex;gap:48px;flex-wrap:wrap}
.footer-nav .footer-h{display:block;font-size:.72rem;font-weight:700;letter-spacing:.08em;
  color:var(--muted);margin-bottom:10px;text-transform:uppercase}
.footer-nav a{display:block;font-size:.88rem;color:var(--text);padding:4px 0}
.footer-nav a:hover{color:var(--primary)}
.footer-bottom{border-top:1px solid var(--border);padding-top:14px;padding-bottom:20px;
  display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
@media(max-width:560px){
  .footer-top{gap:24px}
  .footer-nav{gap:32px}
}

.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px;align-items:center}
.filters form{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{font-size:.82rem;padding:5px 12px;border-radius:999px;border:1px solid var(--border);color:var(--text)}
.chip.active{background:var(--primary);color:var(--primary-ink);border-color:var(--primary)}

.summary-line{display:flex;justify-content:space-between;padding:6px 0}
.summary-total{border-top:2px solid var(--border);margin-top:8px;padding-top:12px;font-weight:700;font-size:1.15rem}

.steps{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px;font-size:.8rem;color:var(--muted)}
.steps span.on{color:var(--primary);font-weight:700}

.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}
.kpi{padding:18px}
.kpi .n{font-size:1.6rem;font-weight:700}
.kpi .l{font-size:.82rem;color:var(--muted)}

@media(max-width:640px){
  main.wrap{padding-top:16px}
  .row-head h2{font-size:1.05rem}
  .car-track > .product-card{flex-basis:200px}
  h1{font-size:1.4rem}
}

/* ---------------------------------------------------------------- チャット */
.unread-dot{display:inline-block;min-width:18px;padding:0 6px;border-radius:999px;background:var(--danger);
  color:#fff;font-size:.7rem;font-weight:700;line-height:18px;text-align:center;vertical-align:1px}
.chat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);
  display:flex;flex-direction:column;overflow:hidden}
.chat-log{height:min(60vh,520px);overflow-y:auto;padding:20px 16px;display:flex;flex-direction:column;gap:12px}
.chat-empty{margin:auto;text-align:center}
.chat-msg{display:flex;flex-direction:column;max-width:78%}
.chat-msg.mine{align-self:flex-end;align-items:flex-end}
.chat-msg.theirs{align-self:flex-start;align-items:flex-start}
.chat-bubble{padding:10px 14px;border-radius:16px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55}
.chat-msg.mine .chat-bubble{background:var(--primary);color:var(--primary-ink);border-bottom-right-radius:4px}
.chat-msg.theirs .chat-bubble{background:var(--bg);border:1px solid var(--border);border-bottom-left-radius:4px}
.chat-meta{font-size:.72rem;color:var(--muted);margin-top:3px}
.chat-form{display:flex;gap:10px;align-items:flex-end;padding:12px;border-top:1px solid var(--border)}
.chat-form textarea{flex:1;min-height:44px;max-height:160px;resize:vertical}
.chat-error{color:var(--danger);margin:0;padding:0 12px 12px}
.chat-notice{margin:0;padding:10px 14px;border-top:1px solid var(--border);font-size:.85rem;color:var(--muted);background:var(--bg)}

/* ---------------------------------------------------------------- ヘッダーのベル・アイコン / プロフィール */
.brand{margin-right:auto}
.main-nav{order:1}
.header-actions{order:2;display:flex;align-items:center;gap:12px}
.nav-toggle{order:3}
.bell{position:relative;display:inline-flex;color:var(--muted);padding:4px}
.bell:hover{color:var(--text);text-decoration:none}
.bell-count{position:absolute;top:-3px;right:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;
  background:var(--danger);color:#fff;font-size:.68rem;font-weight:700;line-height:18px;text-align:center;
  box-shadow:0 0 0 2px var(--surface)}
.avatar-link{display:inline-flex}
.avatar-link:hover{text-decoration:none}
.avatar{border-radius:50%;object-fit:cover;display:inline-block;flex:none;vertical-align:middle}
.avatar-initial{display:inline-flex;align-items:center;justify-content:center;background:var(--primary);
  color:var(--primary-ink);font-weight:700;line-height:1}
.user-cell{display:flex;align-items:center;gap:10px}
.user-cell .who{display:flex;flex-direction:column;line-height:1.35}
.notice{padding:18px 20px;border-bottom:1px solid var(--border)}
.notice:last-child{border-bottom:0}
.notice h3{margin:0 0 4px;font-size:1rem;display:flex;align-items:center;gap:8px}
.notice-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 0}
.new-badge{font-size:.68rem;font-weight:700;color:#fff;background:var(--danger);border-radius:999px;padding:1px 7px}

/* ================================================================ 丸み・なめらかな動き
   既存の定義をここで上書きする。動きは prefers-reduced-motion で止める。 */
:root{--radius:20px;--radius-sm:14px;--ease:cubic-bezier(.22,.8,.24,1)}
html{scroll-behavior:smooth}
body,.site-header,.site-footer,.card,.panel,.chat,input,select,textarea{
  transition:background-color .35s ease,border-color .35s ease,color .35s ease}
a{transition:color .18s ease}

/* ボタン: ピル型 + 押し込み */
.btn{border-radius:999px;padding:11px 22px;
  transition:transform .2s var(--ease),box-shadow .25s var(--ease),filter .2s,background-color .2s}
.btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px -6px rgba(47,109,246,.45)}
.btn:active{transform:translateY(0) scale(.96);box-shadow:none;transition-duration:.08s}
.btn.secondary:hover,.btn.gbtn:hover{box-shadow:0 6px 16px -8px rgba(0,0,0,.25)}
.btn.danger:hover{box-shadow:0 8px 20px -6px rgba(217,56,56,.45)}
.btn.sm{padding:7px 14px}
.btn[disabled],.btn[disabled]:hover{transform:none;box-shadow:none}
.theme-toggle,.nav-toggle{border-radius:999px;transition:background-color .2s,color .2s,transform .2s var(--ease)}
.theme-toggle:active,.nav-toggle:active{transform:scale(.92)}

/* 入力欄 */
input[type=text],input[type=email],input[type=password],input[type=number],input[type=search],select,textarea{
  border-radius:var(--radius-sm);padding:11px 14px;outline:none;
  transition:border-color .2s,box-shadow .2s,background-color .35s}
input[type=search]{width:100%;border:1px solid var(--border);background:var(--bg);color:var(--text);font:inherit}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(47,109,246,.16)}

/* パネル・カード・通知 */
.panel{padding:26px}
.flash{border-radius:var(--radius-sm);animation:flash-in .45s var(--ease) both}
.sale-badge{border-radius:999px;padding:1px 8px}
.chat-bubble{border-radius:20px}
.chat-msg.mine .chat-bubble{border-bottom-right-radius:6px}
.chat-msg.theirs .chat-bubble{border-bottom-left-radius:6px}

/* 商品カード: ふわっと浮く */
.product-card{transition:transform .35s var(--ease),box-shadow .35s var(--ease)}
.product-card .thumb{transition:transform .6s var(--ease);border-bottom:0}
.product-card:hover{transform:translateY(-5px);box-shadow:0 18px 38px -18px rgba(0,0,0,.35)}
.product-card:hover .thumb{transform:scale(1.045)}
.product-card > div:first-child{overflow:hidden}
.product-card .body{padding:16px 18px 18px}

/* 商品一覧の見出し・検索 */
.list-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:6px}
.list-head h1{margin:0}
.search{display:flex;gap:8px;align-items:center;flex:0 1 360px}
.search input{flex:1;min-width:0}
@media(max-width:640px){.search{flex-basis:100%}}

/* 横スライド */
.row-sec{margin:34px 0;scroll-margin-top:84px}
.row-head h2{display:flex;align-items:center;gap:8px}
.row-count{font-size:.72rem;font-weight:700;color:var(--muted);background:var(--surface);
  border:1px solid var(--border);border-radius:999px;padding:1px 9px}
.car-track{gap:18px;padding:6px 4px 18px;margin:0 -4px;scroll-snap-type:x mandatory;scroll-padding-inline:4px;
  overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--fade-l,0px),#000 calc(100% - var(--fade-r,0px)),transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 var(--fade-l,0px),#000 calc(100% - var(--fade-r,0px)),transparent 100%)}
.car-track.can-left{--fade-l:36px}
.car-track.can-right{--fade-r:36px}
.car-track > .product-card{flex:0 0 250px}
.car-track.dragging{scroll-snap-type:none;scroll-behavior:auto;cursor:grabbing;user-select:none}
.car-track.dragging .product-card{pointer-events:none}
@media(hover:hover) and (pointer:fine){.car-track{cursor:grab}}
.car-nav{width:42px;height:42px;background:var(--surface);
  transition:opacity .25s var(--ease),transform .25s var(--ease)}
.car-nav:hover{transform:scale(1.08)}
.car-nav:active{transform:scale(.94)}
.car-nav.prev{left:-10px}
.car-nav.next{right:-10px}
@media(max-width:640px){.car-track > .product-card{flex-basis:72%}}

/* ページを開いたときにふわっと出す */
main.wrap > *{animation:rise .5s var(--ease) both}
main.wrap > *:nth-child(2){animation-delay:.05s}
main.wrap > *:nth-child(3){animation-delay:.1s}
main.wrap > *:nth-child(4){animation-delay:.15s}
main.wrap > *:nth-child(n+5){animation-delay:.2s}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes flash-in{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}

/* ヘッダー: スクロールすると少し影 */
.site-header{transition:box-shadow .3s ease,background-color .35s ease}
.site-header.scrolled{box-shadow:0 6px 24px -12px rgba(0,0,0,.35)}
.bell,.avatar-link{transition:transform .2s var(--ease)}
.bell:hover,.avatar-link:hover{transform:translateY(-1px)}
.bell-count{animation:pop .4s var(--ease) both}
@keyframes pop{from{transform:scale(0)}to{transform:scale(1)}}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
  .product-card:hover,.btn:hover{transform:none}
}

/* 商品カードをコンパクトに（画像を低く、1列に多く見せる） */
.product-card .thumb{aspect-ratio:16/9}
.car-track > .product-card{flex:0 0 205px}
.product-card .body{padding:12px 14px 14px;gap:5px}
.product-card h3{font-size:.92rem;line-height:1.45;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.product-card .desc{font-size:.78rem;line-height:1.55;margin:0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.product-card .price{font-size:1rem}
.product-card .btn.sm{padding:5px 12px;font-size:.78rem}
.product-card .tag,.product-card .stock{font-size:.68rem}
.soldout-overlay{font-size:.95rem}
.grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}
@media(max-width:640px){.car-track > .product-card{flex-basis:58%}}

/* ---------------------------------------------------------------- プロフィール（SNS 風） */
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.profile-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);overflow:hidden;margin-bottom:28px}
.profile-cover{position:relative;height:190px;
  background:linear-gradient(135deg,#5b8dff 0%,#8b6dff 50%,#ff8fb1 100%)}
.profile-cover img{width:100%;height:100%;object-fit:cover;display:block}
.profile-main{padding:0 24px 22px}
.profile-top{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:-54px;margin-bottom:10px}
.profile-avatar{position:relative;display:inline-flex;border-radius:50%;
  box-shadow:0 0 0 5px var(--surface);background:var(--surface)}
.profile-avatar .avatar{width:108px;height:108px}
.profile-name{margin:0;font-size:1.45rem;line-height:1.3}
.profile-email{margin:2px 0 0;color:var(--muted);font-size:.85rem}
.profile-bio{margin:12px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.profile-meta{display:flex;align-items:center;gap:6px;margin:12px 0 0;color:var(--muted);font-size:.85rem}
.profile-stats{display:flex;gap:28px;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}
.profile-stats div{display:flex;flex-direction:column}
.profile-stats strong{font-size:1.15rem;line-height:1.3}
.profile-stats strong small{font-size:.75rem;color:var(--muted)}
.profile-stats span{font-size:.78rem;color:var(--muted)}
@media(max-width:640px){
  .profile-cover{height:130px}
  .profile-main{padding:0 18px 18px}
  .profile-top{margin-top:-44px}
  .profile-avatar .avatar,.profile-avatar .avatar-initial{width:88px!important;height:88px!important}
}

/* 編集画面 */
.profile-editor{max-width:640px;margin:0 auto 28px}
.editor-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;
  border-bottom:1px solid var(--border)}
.editor-bar h1{margin:0;font-size:1.05rem}
.cover-actions{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:14px;
  background:rgba(0,0,0,.28)}
.icon-btn{width:46px;height:46px;border-radius:50%;border:0;display:inline-flex;align-items:center;justify-content:center;
  background:rgba(15,20,25,.6);color:#fff;cursor:pointer;margin:0;
  transition:background-color .2s,transform .2s var(--ease)}
.icon-btn:hover{background:rgba(15,20,25,.8);transform:scale(1.06)}
.icon-btn:active{transform:scale(.94)}
.icon-btn input,.avatar-picker input{display:none}
.avatar-picker{cursor:pointer;margin:0}
.avatar-cam{position:absolute;inset:0;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.35);color:#fff;transition:background-color .2s}
.avatar-picker:hover .avatar-cam{background:rgba(0,0,0,.5)}
.counter{font-size:.75rem;color:var(--muted);font-variant-numeric:tabular-nums}
.counter.near{color:var(--warn);font-weight:700}
.readonly{margin:0;padding:11px 14px;border-radius:var(--radius-sm);background:var(--bg);color:var(--muted);
  border:1px dashed var(--border)}
.error-text{color:var(--danger);margin:12px 0 0}

/* 商品カード さらにコンパクトに（携帯: 2 枚 + 3 枚目の商品名が見える幅） */
.car-track > .product-card{flex:0 0 185px}
@media(max-width:640px){
  .car-track{gap:10px}
  .car-track > .product-card{flex-basis:38%}
  .car-track.can-right{--fade-r:14px}
  .car-track.can-left{--fade-l:14px}
  .product-card .body{padding:8px 10px 10px;gap:3px}
  .product-card h3{font-size:.8rem;line-height:1.4}
  .product-card .desc{font-size:.7rem;-webkit-line-clamp:1}
  .product-card .price{font-size:.88rem}
  .product-card .price.sale .was{display:none}
  .product-card .sale-badge{font-size:.6rem;padding:0 5px;margin-left:3px}
  .product-card .sale-until{display:none}
  .product-card .tag,.product-card .stock{font-size:.6rem;padding:1px 6px}
  .product-card .body > .between:last-child{flex-direction:column;align-items:stretch;gap:6px}
  .product-card .btn.sm{padding:5px 8px;font-size:.72rem}
  .soldout-overlay{font-size:.75rem;letter-spacing:.06em}
  .row-sec{margin:22px 0}
}

/* 管理画面: 商品の並べ替え */
.reorder-bar{position:sticky;top:64px;z-index:5;display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:10px 14px;margin-bottom:12px;border-radius:var(--radius-sm);background:var(--surface);
  border:1px solid var(--primary);box-shadow:var(--shadow)}
.reorder-cell{white-space:nowrap}
.drag-handle{cursor:grab;color:var(--muted);font-weight:700;letter-spacing:-2px;padding:4px 6px;user-select:none}
.icon-mini{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:8px;
  font-size:.7rem;padding:2px 6px;cursor:pointer}
.icon-mini:hover{border-color:var(--primary);color:var(--primary)}
tr.dragging-row{opacity:.45}
tr.moved{background:rgba(47,109,246,.08);transition:background-color .4s}

/* ================================================================ 商品カード（大きめ・オリジナル）
   携帯: 1 枚が画面の約 7 割、次のカードが少しのぞく。画像の上にすりガラスの札、下に価格と丸い購入ボタン */
.product-card{border-radius:22px;overflow:hidden}
.pc-media{position:relative;display:block;overflow:hidden;background:var(--bg)}
.pc-media:hover{text-decoration:none}
.product-card .thumb{aspect-ratio:3/2;display:block}
.pc-media::after{content:"";position:absolute;left:0;right:0;bottom:0;height:45%;pointer-events:none;
  background:linear-gradient(180deg,transparent,rgba(12,16,24,.22))}
.pc-chip{position:absolute;top:10px;z-index:2;font-size:.68rem;font-weight:700;letter-spacing:.02em;
  padding:3px 10px;border-radius:999px;color:#1c2530;background:rgba(255,255,255,.74);
  border:1px solid rgba(255,255,255,.65);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.pc-cat{left:10px}
.pc-flag{right:10px;color:#fff;border-color:transparent}
.pc-sale{background:linear-gradient(135deg,#ff5f6d,#d93838)}
.pc-low{background:linear-gradient(135deg,#f5b53d,#d98a0b)}
[data-theme="dark"] .pc-cat{background:rgba(18,22,28,.6);color:#fff;border-color:rgba(255,255,255,.12)}
.product-card .soldout-overlay{z-index:3;letter-spacing:.14em}
.product-card .body{padding:14px 16px 16px;gap:4px}
.product-card h3{font-size:.98rem;line-height:1.45;font-weight:800;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.product-card .desc{font-size:.8rem;-webkit-line-clamp:1;margin:0}
.pc-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:10px}
.pc-price{display:flex;align-items:baseline;gap:4px;flex-wrap:wrap;color:var(--primary);font-weight:800;line-height:1.1}
.pc-price strong{font-size:1.28rem;letter-spacing:.01em}
.pc-price small{font-size:.78rem;font-weight:700;opacity:.85}
.pc-price s{color:var(--muted);font-size:.76rem;font-weight:500;width:100%}
.pc-price.sale strong,.pc-price.sale small{color:var(--danger)}
.pc-buy{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:84px;
  padding:9px 20px;border-radius:999px;color:#fff;font-weight:800;font-size:.9rem;letter-spacing:.06em;
  background:linear-gradient(135deg,var(--primary),#8b5cf6);box-shadow:0 10px 20px -10px rgba(91,92,246,.75);
  transition:transform .2s var(--ease),box-shadow .25s var(--ease),filter .2s}
.pc-buy:hover{text-decoration:none;transform:translateY(-1px);filter:brightness(1.06)}
.pc-buy:active{transform:scale(.95)}
.pc-buy.is-out{background:var(--surface);color:var(--muted);border:1px solid var(--border);box-shadow:none}
.car-track > .product-card{flex:0 0 250px}
/* セクション見出しのしるし */
.row-head h2::before{content:"";width:10px;height:10px;border-radius:50%;flex:none;
  background:linear-gradient(135deg,var(--primary),#8b5cf6);box-shadow:0 0 0 4px rgba(91,141,255,.16)}
@media(max-width:640px){
  .car-track{gap:14px}
  .car-track > .product-card{flex-basis:72%}
  .car-track.can-right{--fade-r:18px}
  .car-track.can-left{--fade-l:18px}
  .product-card .body{padding:12px 14px 14px;gap:3px}
  .product-card h3{font-size:.95rem}
  .product-card .desc{display:none}
  .pc-price strong{font-size:1.2rem}
  .pc-buy{padding:9px 18px;font-size:.88rem}
  .product-card .soldout-overlay{font-size:.95rem}
  .row-sec{margin:26px 0}
}

/* ---------------------------------------------------------------- 売上ページ */
.sales-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:8px}
.month-nav{display:flex;align-items:center;gap:10px}
.month-nav strong{font-size:1.05rem;min-width:7.5em;text-align:center}
.icon-mini.is-disabled{opacity:.35;cursor:default}
a.icon-mini:hover{text-decoration:none}
.stat-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin:14px 0 18px}
.stat{padding:16px 18px}
.stat-label{font-size:.8rem;color:var(--muted);font-weight:600}
.stat-value{font-size:1.6rem;font-weight:800;line-height:1.25;margin-top:4px}
.stat-value small{font-size:.9rem;margin-left:2px;color:var(--muted)}
.stat-sub{font-size:.78rem;color:var(--muted);margin-top:2px}
.stat-main{border-color:var(--primary)}
.delta{font-weight:800}
.delta.up{color:var(--success)}
.delta.down{color:var(--danger)}
.chart-panel{margin-bottom:18px}
.chart-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.chart-head h3{margin:0}
/* 縦棒グラフ（HTML で描画・1 系列なので凡例なし） */
.colchart{display:grid;grid-template-columns:auto 1fr;gap:8px;height:230px;padding-bottom:22px}
.cc-axis{position:relative;width:44px}
.cc-axis span{position:absolute;right:0;transform:translateY(50%);font-size:.68rem;color:var(--muted);
  font-variant-numeric:tabular-nums;white-space:nowrap}
.cc-plot{position:relative;border-bottom:1px solid var(--border)}
.cc-grid{position:absolute;left:0;right:0;height:0;border-top:1px solid var(--border);opacity:.6}
.cc-bars{position:absolute;inset:0;display:grid;gap:2px;align-items:end}
.cc-slot{position:relative;height:100%;display:flex;align-items:flex-end;justify-content:center;
  outline:none;border-radius:6px;cursor:default}
a.cc-slot{cursor:pointer}
a.cc-slot:hover{text-decoration:none}
.cc-bar{display:block;width:min(100%,24px);min-height:0;border-radius:4px 4px 0 0;
  background:var(--primary);opacity:.55;transition:opacity .15s,filter .15s}
.cc-slot.is-accent .cc-bar{opacity:1}
.cc-slot:hover .cc-bar,.cc-slot:focus-visible .cc-bar{opacity:1;filter:brightness(1.12)}
.cc-slot:focus-visible{box-shadow:0 0 0 2px var(--primary)}
.cc-x{position:absolute;top:100%;left:50%;transform:translateX(-50%);margin-top:5px;
  font-size:.68rem;color:var(--muted);white-space:nowrap}
.cc-slot.is-accent .cc-x{color:var(--text);font-weight:800}
.cc-tip{position:fixed;z-index:50;pointer-events:none;padding:8px 12px;border-radius:12px;
  background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);font-size:.8rem;line-height:1.4}
.cc-tip strong{display:block;font-size:1rem}
.chart-table{margin-top:10px}
.chart-table summary{cursor:pointer;font-size:.85rem;color:var(--muted);font-weight:600}
.chart-table table{margin-top:8px}
.total-row td{font-weight:800;border-top:2px solid var(--border)}
@media(max-width:640px){
  .colchart{height:190px}
  .cc-axis{width:38px}
  .cc-bars{gap:1px}
  .stat-value{font-size:1.25rem}
  .stat-tiles{grid-template-columns:repeat(2,1fr);gap:10px}
  .stat{padding:12px 14px}
}

/* カートの点数バッジ（ヘッダー） */
.cart-count{background:var(--primary)}
.cart-dot{background:var(--primary)}

/* お問い合わせの見えない入力欄（スパム対策） */
.hp-field{position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
.contact-item{margin-bottom:12px}
.contact-item.is-handled{opacity:.7}
.contact-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 12px}

/* ---------------------------------------------------------------- 2FA コード表示 */
.totp{max-width:560px;margin:0 auto;display:grid;gap:14px}
.totp-head h1{margin:0}
.totp-head p{margin:4px 0 0}
.totp-card{display:grid;gap:10px}
.totp-card label{margin:0}
.totp-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.totp-row input{flex:1;min-width:0;font-family:"IBM Plex Mono",ui-monospace,Menlo,monospace;letter-spacing:.06em}
.totp-center{justify-content:center}
.totp-error{color:var(--danger);margin:0;font-size:.85rem}
.totp-insecure{display:grid;gap:6px;line-height:1.6}
.totp-ack{display:flex;align-items:center;gap:8px;margin-top:4px;color:var(--text);font-weight:700;cursor:pointer}
.totp-code-card{text-align:center}
.totp-meta{display:flex;justify-content:space-between;font-size:.8rem;color:var(--muted)}
.totp-code{margin:0;font-family:"IBM Plex Mono",ui-monospace,Menlo,monospace;font-weight:700;
  font-size:clamp(2.6rem,13vw,4.2rem);letter-spacing:.08em;line-height:1.1;font-variant-numeric:tabular-nums;user-select:all}
.totp-gap{display:inline-block;width:.45em}
.totp-code.is-empty{color:var(--border);user-select:none}
.totp-code.is-masked{filter:blur(14px);user-select:none}
.totp-bar{height:8px;border-radius:99px;background:var(--bg);border:1px solid var(--border);overflow:hidden}
.totp-bar i{display:block;height:100%;background:var(--primary);border-radius:99px;transform-origin:left;
  transition:transform .25s linear,background-color .3s}
.totp-bar.is-late i{background:var(--warn)}
.totp-remain{font-size:.9rem;color:var(--muted);font-variant-numeric:tabular-nums}
.totp-remain strong{color:var(--text);font-size:1.05rem}
.totp-remain.is-late strong{color:var(--warn)}
.totp-status{min-height:1.4em;margin:0;font-size:.84rem;color:var(--success)}
.totp-card summary{cursor:pointer;font-weight:700}
.totp-pill{display:inline-block;font-size:.72rem;font-weight:800;border-radius:99px;padding:1px 9px;margin-left:6px;
  border:1px solid var(--success);color:var(--success)}
.totp-pill.bad{border-color:var(--danger);color:var(--danger)}
.totp-tablewrap{overflow-x:auto}
.totp-tablewrap td{white-space:nowrap;font-variant-numeric:tabular-nums}
.totp-tablewrap td.mono{font-family:"IBM Plex Mono",ui-monospace,Menlo,monospace}
.totp-tablewrap td.ok{color:var(--success);font-weight:800}
.totp-tablewrap td.ng{color:var(--danger);font-weight:800}
.totp-notes{margin:0;padding-left:1.1em;font-size:.84rem;color:var(--muted)}
.totp-notes li+li{margin-top:6px}
@media (prefers-reduced-motion: reduce){.totp-bar i{transition:none}}
