:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #eef3ff;
  --text: #172033;
  --muted: #667085;
  --line: #d8deea;
  --primary: #315efb;
  --primary-dark: #2148c7;
  --danger: #e5484d;
  --success: #16a34a;
  --warning: #f59e0b;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(20, 33, 61, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  box-shadow: 0 10px 22px rgba(49,94,251,.25);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}
.nav a:hover, .nav a.active { background: var(--panel-2); color: var(--primary); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 70px;
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: stretch;
}
.hero-card, .panel, .card {
  background: var(--panel);
  border: 1px solid rgba(216,222,234,.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card {
  min-height: 370px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at top right, rgba(49,94,251,.18), transparent 38%),
    linear-gradient(135deg, #fff, #f9fbff);
}
.hero-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -.04em;
}
.hero-card p { margin: 0 0 26px; color: var(--muted); font-size: 17px; max-width: 700px; }
.hero-side { display: grid; gap: 16px; }
.live-box {
  padding: 26px;
  background: linear-gradient(135deg, #111827, #24304c);
  color: #fff;
}
.live-box .muted { color: rgba(255,255,255,.72); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--line); }
.btn.secondary:hover { background: #f8fafc; }
.btn.danger { background: var(--danger); }
.btn.ghost { background: transparent; color: var(--primary); border-color: rgba(49,94,251,.25); }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 42px 0 16px;
}
.section-head h2, .page-title h1 { margin: 0; letter-spacing: -.03em; }
.page-title { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 20px; }
.page-title p { margin: 8px 0 0; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card { overflow: hidden; }
.card-body { padding: 18px; }
.card h3 { margin: 0 0 8px; line-height: 1.35; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.price { font-size: 24px; font-weight: 850; letter-spacing: -.02em; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--panel-2);
  color: var(--primary);
}
.badge.live { background: rgba(229,72,77,.1); color: var(--danger); }
.badge.success { background: rgba(22,163,74,.12); color: var(--success); }
.badge.warning { background: rgba(245,158,11,.14); color: #a16207; }
.badge.gray { background: #eef2f7; color: #475467; }

.image-placeholder {
  min-height: 170px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.92);
  font-weight: 850;
  letter-spacing: .08em;
  background:
    linear-gradient(135deg, rgba(49,94,251,.88), rgba(124,58,237,.78)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 12px, transparent 12px 24px);
}
.image-placeholder.alt { background: linear-gradient(135deg, #0f766e, #06b6d4); }
.image-placeholder.warm { background: linear-gradient(135deg, #b45309, #f97316); }
.image-placeholder.dark { background: linear-gradient(135deg, #111827, #475569); }

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  margin: 18px 0 24px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}
.textarea { min-height: 120px; resize: vertical; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 13px; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }

.detail-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(320px, .45fr); gap: 22px; align-items: start; }
.detail-gallery .image-placeholder { min-height: 440px; border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 22px; }
.meta-list { display: grid; gap: 12px; margin: 18px 0; }
.meta-row { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.meta-row:last-child { border-bottom: 0; padding-bottom: 0; }

.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.live-stage {
  background: #0f172a;
  color: #fff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
}
.live-product {
  display: grid;
  grid-template-columns: .9fr 1fr;
  gap: 24px;
  align-items: center;
}
.live-product .image-placeholder { min-height: 360px; border-radius: 20px; }
.countdown-ring {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 18px 0;
  background: conic-gradient(var(--danger) 0deg, rgba(255,255,255,.12) 0deg);
  box-shadow: inset 0 0 0 12px rgba(255,255,255,.08);
}
.countdown-ring span { font-size: 54px; font-weight: 900; }
.bid-panel { display: grid; gap: 14px; }
.bid-log { max-height: 320px; overflow: auto; display: grid; gap: 10px; }
.bid-item { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.status-line { min-height: 28px; font-weight: 800; }

.mypage-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 22px; align-items: start; }
.sidebar { padding: 14px; position: sticky; top: 84px; }
.sidebar a { display: block; padding: 11px 12px; color: var(--muted); border-radius: 12px; }
.sidebar a:hover, .sidebar a.active { background: var(--panel-2); color: var(--primary); font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.stat strong { display: block; font-size: 25px; }
.footer { border-top: 1px solid var(--line); padding: 28px 20px; color: var(--muted); text-align: center; }

@media (max-width: 940px) {
  .hero, .detail-layout, .live-layout, .live-product, .mypage-layout { grid-template-columns: 1fr; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .sidebar { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .hero-card { padding: 28px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .filter-bar, .stats { grid-template-columns: 1fr; }
  .page-title, .section-head { align-items: start; flex-direction: column; }
}
