:root {
  --cos-bg: #f8f4f2;
  --cos-card: #fffdfc;
  --cos-ink: #30222a;
  --cos-muted: #75666e;
  --cos-brand: #6e3c55;
  --cos-brand-dark: #452737;
  --cos-gold: #b38a52;
  --cos-line: #eadfdc;
  --cos-soft: #f2e8ec;
  --cos-success: #39715b;
  --cos-warning: #9a681f;
  --cos-danger: #a5444c;
  --cos-shadow: 0 14px 36px rgba(67, 39, 54, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.cos-next { margin: 0; color: var(--cos-ink); background: linear-gradient(180deg,#fcfaf9 0,#f7f1ef 100%); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif; font-size: 17px; line-height: 1.65; }
button,input,select,textarea { font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.cos-shell { width: min(1120px,100%); min-height: 100vh; margin: auto; background: rgba(255,255,255,.45); }
.cos-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px clamp(16px,4vw,30px); border-bottom: 1px solid rgba(234,223,220,.92); background: rgba(255,253,252,.94); backdrop-filter: blur(14px); }
.cos-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.cos-brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; color: #fff; background: linear-gradient(145deg,var(--cos-brand),var(--cos-brand-dark)); font-family: Georgia,serif; font-size: 25px; box-shadow: 0 8px 18px rgba(69,39,55,.2); }
.cos-brand-copy strong { display:block; font-size: 17px; line-height:1.25; }
.cos-brand-copy span { display:block; color:var(--cos-muted); font-size:12px; margin-top:2px; }
.cos-demo { padding: 7px 10px; border: 1px solid #dfcaa9; border-radius: 999px; color:#76511f; background:#fff8e8; font-size:12px; font-weight:800; white-space:nowrap; }
.cos-main { padding: clamp(22px,5vw,52px) clamp(16px,4vw,34px) 74px; }
.cos-hero { position:relative; overflow:hidden; padding: clamp(26px,6vw,58px); border-radius: 32px; color:#fff; background: radial-gradient(circle at 88% 10%,rgba(255,255,255,.23),transparent 30%),linear-gradient(135deg,#70425a,#452737); box-shadow:var(--cos-shadow); }
.cos-hero::after { content:""; position:absolute; right:-50px; bottom:-100px; width:260px; height:260px; border:1px solid rgba(255,255,255,.23); border-radius:50%; box-shadow:0 0 0 34px rgba(255,255,255,.045),0 0 0 68px rgba(255,255,255,.035); }
.cos-eyebrow { margin:0 0 8px; color:var(--cos-gold); font-size:12px; font-weight:900; letter-spacing:.15em; text-transform:uppercase; }
.cos-hero .cos-eyebrow { color:#ead6ad; }
.cos-hero h1 { position:relative; z-index:1; max-width:720px; margin:0; font-family:Georgia,"Noto Serif JP",serif; font-size:clamp(31px,6vw,55px); line-height:1.2; letter-spacing:.01em; }
.cos-hero p { position:relative; z-index:1; max-width:680px; margin:17px 0 0; color:rgba(255,255,255,.86); font-size:clamp(16px,2.5vw,19px); }
.cos-toolbar { display:grid; grid-template-columns:minmax(0,2fr) minmax(160px,1fr) minmax(160px,1fr) auto; gap:12px; margin:24px 0; padding:18px; border:1px solid var(--cos-line); border-radius:22px; background:rgba(255,253,252,.96); box-shadow:0 7px 22px rgba(67,39,54,.06); }
.cos-field { display:grid; gap:6px; }
.cos-field label { font-size:13px; font-weight:800; color:var(--cos-muted); }
.cos-field input,.cos-field select,.cos-field textarea { width:100%; min-height:48px; padding:11px 13px; color:var(--cos-ink); border:1px solid #d9ccca; border-radius:13px; background:#fff; outline:none; }
.cos-field textarea { min-height:100px; resize:vertical; }
.cos-field input:focus,.cos-field select:focus,.cos-field textarea:focus { border-color:var(--cos-brand); box-shadow:0 0 0 3px rgba(110,60,85,.12); }
.cos-btn { display:inline-flex; min-height:48px; align-items:center; justify-content:center; gap:8px; padding:11px 18px; border:1px solid transparent; border-radius:14px; text-decoration:none; font-weight:850; cursor:pointer; transition:.16s ease; }
.cos-btn:hover { transform:translateY(-1px); }
.cos-btn:disabled { opacity:.52; cursor:not-allowed; transform:none; }
.cos-btn.primary { color:#fff; background:linear-gradient(135deg,var(--cos-brand),var(--cos-brand-dark)); box-shadow:0 7px 17px rgba(69,39,55,.19); }
.cos-btn.secondary { color:var(--cos-brand-dark); border-color:#d9c7cf; background:#fff; }
.cos-btn.soft { color:var(--cos-brand-dark); background:var(--cos-soft); }
.cos-btn.danger { color:#fff; background:var(--cos-danger); }
.cos-btn.small { min-height:40px; padding:8px 13px; border-radius:11px; font-size:14px; }
.cos-section { margin-top:30px; }
.cos-section-head { display:flex; align-items:end; justify-content:space-between; gap:15px; margin-bottom:15px; }
.cos-section-head h2 { margin:0; font-size:clamp(23px,4vw,32px); line-height:1.3; }
.cos-section-head p { margin:0; color:var(--cos-muted); font-size:14px; }
.cos-product-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.cos-product-card { display:flex; flex-direction:column; overflow:hidden; min-width:0; border:1px solid var(--cos-line); border-radius:24px; background:var(--cos-card); box-shadow:0 8px 25px rgba(67,39,54,.07); }
.cos-product-image { position:relative; aspect-ratio:4/3; overflow:hidden; background:linear-gradient(135deg,#eee3e6,#faf7f5); }
.cos-product-image img { width:100%; height:100%; object-fit:cover; display:block; }
.cos-placeholder { display:grid; width:100%; height:100%; place-items:center; color:var(--cos-brand); font-size:54px; background:radial-gradient(circle at 50% 42%,#fff,transparent 33%),linear-gradient(135deg,#f2e7eb,#f9f5f2); }
.cos-chip-row { display:flex; flex-wrap:wrap; gap:7px; }
.cos-chip { display:inline-flex; align-items:center; min-height:27px; padding:4px 9px; border-radius:999px; color:#664557; background:#f2e8ec; font-size:12px; font-weight:800; }
.cos-chip.gold { color:#76511f; background:#fff4dd; }
.cos-card-body { display:flex; flex:1; flex-direction:column; gap:10px; padding:18px; }
.cos-card-body h3 { margin:0; font-size:21px; line-height:1.4; }
.cos-card-body p { margin:0; color:var(--cos-muted); }
.cos-card-meta { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:auto; padding-top:6px; }
.cos-price { color:var(--cos-brand-dark); font-size:19px; font-weight:900; }
.cos-count { color:var(--cos-muted); font-size:14px; }
.cos-empty,.cos-error,.cos-loading { padding:30px 20px; text-align:center; border:1px dashed #d8c9cc; border-radius:22px; background:rgba(255,255,255,.75); }
.cos-error { color:var(--cos-danger); border-color:#e6bfc3; background:#fff6f7; }
.cos-loading-spinner { width:38px; height:38px; margin:0 auto 12px; border:4px solid #eadde1; border-top-color:var(--cos-brand); border-radius:50%; animation:cos-spin .8s linear infinite; }
@keyframes cos-spin { to { transform:rotate(360deg); } }
.cos-detail { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:28px; margin-top:26px; }
.cos-gallery-main { overflow:hidden; aspect-ratio:1/1; border:1px solid var(--cos-line); border-radius:28px; background:#f2e8eb; box-shadow:var(--cos-shadow); }
.cos-gallery-main img { width:100%; height:100%; object-fit:cover; }
.cos-thumbs { display:flex; gap:9px; overflow:auto; margin-top:11px; padding:2px; }
.cos-thumb { flex:0 0 70px; width:70px; height:70px; overflow:hidden; padding:0; border:2px solid transparent; border-radius:13px; background:#eee; cursor:pointer; }
.cos-thumb.active { border-color:var(--cos-brand); }
.cos-thumb img { width:100%; height:100%; object-fit:cover; }
.cos-detail-copy { display:flex; flex-direction:column; gap:17px; }
.cos-detail-copy h1 { margin:0; font-family:Georgia,"Noto Serif JP",serif; font-size:clamp(30px,5vw,48px); line-height:1.22; }
.cos-detail-copy .brand { color:var(--cos-gold); font-size:14px; font-weight:900; letter-spacing:.08em; }
.cos-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.cos-info { padding:13px; border-radius:15px; background:#f8f3f4; }
.cos-info span { display:block; color:var(--cos-muted); font-size:12px; font-weight:800; }
.cos-info strong { display:block; margin-top:3px; font-size:16px; }
.cos-panel { padding:20px; border:1px solid var(--cos-line); border-radius:22px; background:var(--cos-card); box-shadow:0 7px 22px rgba(67,39,54,.055); }
.cos-panel h2,.cos-panel h3 { margin-top:0; }
.cos-actions { display:flex; flex-wrap:wrap; gap:10px; }
.cos-tabs { display:flex; gap:7px; overflow:auto; padding:5px; border-radius:16px; background:#eee5e7; }
.cos-tab { flex:1 0 auto; min-height:44px; padding:8px 14px; border:0; border-radius:12px; color:var(--cos-muted); background:transparent; font-weight:850; cursor:pointer; }
.cos-tab.active { color:#fff; background:var(--cos-brand); }
.cos-tab-panel { margin-top:18px; }
.cos-care-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.cos-care-card { padding:18px; border:1px solid var(--cos-line); border-radius:21px; background:#fff; box-shadow:0 7px 20px rgba(67,39,54,.05); }
.cos-care-product { display:grid; grid-template-columns:82px minmax(0,1fr); gap:14px; align-items:start; }
.cos-care-image { width:82px; height:82px; overflow:hidden; border-radius:16px; background:#f1e7ea; }
.cos-care-image img { width:100%; height:100%; object-fit:cover; }
.cos-care-card h3 { margin:0 0 4px; font-size:19px; line-height:1.4; }
.cos-care-card p { margin:4px 0; color:var(--cos-muted); font-size:14px; }
.cos-status { display:inline-flex; padding:4px 9px; border-radius:999px; font-size:12px; font-weight:900; }
.cos-status.using,.cos-status.active,.cos-status.published,.cos-status.interested { color:#245844; background:#def2e8; }
.cos-status.paused,.cos-status.snoozed,.cos-status.skipped { color:#78521c; background:#fff0d2; }
.cos-status.finished,.cos-status.ended,.cos-status.repurchased,.cos-status.purchased { color:#415f79; background:#e3eff8; }
.cos-status.not_needed,.cos-status.cancelled,.cos-status.declined,.cos-status.stopped { color:#804046; background:#f7e2e4; }
.cos-progress { height:9px; overflow:hidden; margin:12px 0; border-radius:999px; background:#eee5e7; }
.cos-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--cos-gold),var(--cos-brand)); }
.cos-inline-form { display:grid; grid-template-columns:1fr auto; gap:8px; margin-top:12px; }
.cos-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.cos-form-grid .full { grid-column:1/-1; }
.cos-dialog { width:min(680px,calc(100% - 24px)); max-height:calc(100vh - 30px); overflow:auto; padding:0; border:0; border-radius:25px; color:var(--cos-ink); box-shadow:0 25px 70px rgba(30,20,26,.3); }
.cos-dialog::backdrop { background:rgba(40,24,33,.55); backdrop-filter:blur(4px); }
.cos-dialog-inner { padding:24px; }
.cos-dialog-head { display:flex; align-items:start; justify-content:space-between; gap:15px; margin-bottom:18px; }
.cos-dialog-head h2 { margin:0; }
.cos-close { width:42px; height:42px; border:0; border-radius:50%; background:#f0e8ea; cursor:pointer; font-size:20px; }
.cos-recommend-hero { padding:26px; border:1px solid #e8d8c7; border-radius:26px; background:linear-gradient(135deg,#fffaf2,#fff); box-shadow:var(--cos-shadow); }
.cos-recommend-item { display:grid; grid-template-columns:150px minmax(0,1fr); gap:20px; padding:20px; border:1px solid var(--cos-line); border-radius:23px; background:#fff; }
.cos-recommend-image { height:150px; overflow:hidden; border-radius:18px; background:#f1e7ea; }
.cos-recommend-image img { width:100%; height:100%; object-fit:cover; }
.cos-response-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:15px; }
.cos-response { min-height:43px; border:1px solid #dccdd2; border-radius:12px; background:#fff; font-weight:800; cursor:pointer; }
.cos-response.selected { color:#fff; border-color:var(--cos-brand); background:var(--cos-brand); }
.cos-footer { padding:24px; color:var(--cos-muted); text-align:center; font-size:13px; }
.step13-member-links { margin-top:22px; }
@media (max-width: 820px) {
  body.cos-next { font-size:16px; }
  .cos-toolbar { grid-template-columns:1fr 1fr; }
  .cos-toolbar .search-wide { grid-column:1/-1; }
  .cos-product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cos-detail { grid-template-columns:1fr; }
  .cos-care-grid { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .cos-main { padding-inline:14px; }
  .cos-hero { padding:27px 21px; border-radius:24px; }
  .cos-toolbar,.cos-form-grid { grid-template-columns:1fr; }
  .cos-toolbar .search-wide,.cos-form-grid .full { grid-column:auto; }
  .cos-product-grid { grid-template-columns:1fr; }
  .cos-product-card { flex-direction:row; min-height:155px; }
  .cos-product-image { flex:0 0 132px; aspect-ratio:auto; }
  .cos-card-body { padding:14px; }
  .cos-card-body h3 { font-size:18px; }
  .cos-card-body p { display:-webkit-box; overflow:hidden; -webkit-line-clamp:2; -webkit-box-orient:vertical; font-size:14px; }
  .cos-card-meta { align-items:flex-start; flex-direction:column; gap:5px; }
  .cos-info-grid { grid-template-columns:1fr; }
  .cos-recommend-item { grid-template-columns:1fr; }
  .cos-recommend-image { height:210px; }
  .cos-response-grid { grid-template-columns:1fr 1fr; }
  .cos-care-product { grid-template-columns:70px minmax(0,1fr); }
  .cos-care-image { width:70px; height:70px; }
}


/* =========================================================
   STEP COSMETICS-13-R1
   Version: COSMETICS-13-R1-UI-SYSTEM-CHECK-15-20260721
   ========================================================= */

/* 濃色ヒーロー上の見出しを明示的に白へ固定 */
.cos-hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(34, 18, 28, .22);
}

/* 商品詳細の右側を少し広くし、商品名の1文字落ちを防ぐ */
.cos-detail {
  grid-template-columns: minmax(0, .94fr) minmax(390px, 1.06fr);
  align-items: start;
}
.cos-detail-copy {
  min-width: 0;
}
.cos-detail-copy h1 {
  max-width: 100%;
  color: var(--cos-ink);
  font-size: clamp(30px, 4.25vw, 46px);
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

/* 商品画像未登録時だけ、過大な正方形余白を抑える */
.cos-gallery-main.is-placeholder {
  aspect-ratio: 4 / 3;
  max-height: 520px;
}
.cos-gallery-main.is-placeholder .cos-placeholder {
  min-height: 100%;
  font-size: 46px;
}

/* 小さい画面では従来どおり1列 */
@media (max-width: 820px) {
  .cos-detail {
    grid-template-columns: 1fr;
  }
  .cos-gallery-main.is-placeholder {
    aspect-ratio: 4 / 3;
    max-height: none;
  }
  .cos-detail-copy h1 {
    font-size: clamp(30px, 8vw, 43px);
  }
}
