/* AppFlea — Shared Styles v0.2 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #F1EFE8;
  --surface: #FFFFFF;
  --surface-2: #F8F6EF;
  --ink: #2C2C2A;
  --ink-2: #444441;
  --ink-3: #5F5E5A;
  --ink-4: #888780;
  --line: rgba(0,0,0,0.10);
  --line-2: rgba(0,0,0,0.18);
  --accent: #2C2C2A;
  --green-50: #E1F5EE; --green-700: #0F6E56; --green-900: #085041;
  --amber-50: #FAEEDA; --amber-700: #854F0B; --amber-900: #633806;
  --blue-50: #E6F1FB; --blue-700: #185FA5; --blue-900: #0C447C;
  --pink-50: #FBEAF0; --pink-700: #99355A; --pink-900: #4B1528;
  --purple-50: #EEEDFE; --purple-100: #CECBF6; --purple-900: #26215C;
  --red: #E24B4A;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

html, body { margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ─── Navigation ─── */
.nav {
  background: var(--surface);
  border-bottom: 0.5px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo .alpha {
  font-size: 10px;
  padding: 2px 7px;
  background: var(--purple-50);
  color: var(--purple-900);
  border-radius: 999px;
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
}
.nav-cta:hover { opacity: 0.9; }
@media (max-width: 640px) {
  .nav-links { gap: 14px; font-size: 13px; }
  .nav-links .hide-sm { display: none; }
}

/* ─── Container ─── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Hero ─── */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}
.hero h1 {
  font-size: 36px;
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.hero h1 .accent {
  background: var(--purple-50);
  color: var(--purple-900);
  padding: 0 8px;
  border-radius: 6px;
}
.hero .tagline {
  font-size: 16px;
  color: var(--ink-3);
  margin: 0 0 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 12px;
}
.hero-stats .stat {
  text-align: center;
}
.hero-stats .stat-num {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
}
.hero-stats .stat-lbl {
  font-size: 11px;
  color: var(--ink-4);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 640px) {
  .hero h1 { font-size: 26px; }
  .hero { padding: 2rem 0 1.5rem; }
  .hero-stats { gap: 20px; }
}

/* ─── Section label ─── */
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin: 0 0 12px;
  font-weight: 500;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 16px;
}
.section-head h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}
.section-head .more {
  font-size: 13px;
  color: var(--blue-700);
}

/* ─── Category chips (filter) ─── */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  background: var(--surface);
  border: 0.5px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--line-2); }
.chip.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* ─── Card grid ─── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
  padding-bottom: 3rem;
}

/* ─── Card ─── */
.card {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-media {
  position: relative;
  height: 170px;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B4B2A9;
}
.card-media .play-icon { font-size: 36px; }
.media-tag {
  position: absolute;
  top: 10px;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
}
.media-tag.left { left: 10px; }
.media-tag.right { right: 10px; }
.media-tag.alert { background: var(--red); color: white; }
.media-tag.status-running { background: var(--green-50); color: var(--green-900); }
.media-tag.status-half { background: var(--amber-50); color: var(--amber-900); }
.media-tag.status-idea { background: var(--blue-50); color: var(--blue-900); }
.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-cat {
  font-size: 10px;
  color: var(--ink-4);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-title {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.4;
}
.card-desc {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0 0 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badges-mini {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.badge-mini {
  flex: 1;
  padding: 6px 4px;
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 10px;
}
.badge-mini i { font-size: 14px; display: block; margin-bottom: 2px; }
.badge-mini .v { font-weight: 500; }
.badge-mini.scan { background: var(--green-50); color: var(--green-900); }
.badge-mini.attention { background: var(--amber-50); color: var(--amber-900); }
.badge-mini.time { background: var(--blue-50); color: var(--blue-900); }
.card-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 0.5px solid var(--line);
}
.card-price .lbl {
  font-size: 9px;
  color: var(--ink-4);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-price .p {
  font-size: 17px;
  font-weight: 500;
  margin: 0;
}
.card-price .auction {
  font-size: 10px;
  color: var(--ink-3);
  margin: 2px 0 0;
}
.card-action {
  display: flex;
  gap: 6px;
}
.btn-watch {
  background: transparent;
  border: 0.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-3);
}
.btn-watch.active {
  background: var(--pink-50);
  color: var(--pink-700);
  border-color: var(--pink-700);
}
.btn-buy {
  background: var(--ink);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.btn-buy:hover { opacity: 0.9; }

/* ─── Buttons (generic) ─── */
.btn {
  border-radius: var(--radius-md);
  padding: 11px 18px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  border: 0.5px solid var(--ink-3);
  background: var(--surface);
  color: var(--ink);
  transition: all 0.15s;
}
.btn:hover { background: var(--surface-2); }
.btn-primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.btn-primary:hover { opacity: 0.9; }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ─── Footer ─── */
.footer {
  background: var(--surface);
  border-top: 0.5px solid var(--line);
  margin-top: 3rem;
  padding: 2.5rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  font-size: 13px;
}
.footer h4 {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  margin: 0 0 12px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 0.5px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
  font-size: 11px;
  color: var(--ink-4);
  text-align: center;
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ─── Form (出品フォーム共通) ─── */
.form-wrap {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem auto;
}
.form-step {
  margin-bottom: 1.75rem;
}
.form-step-num {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: var(--ink);
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 11px;
  line-height: 22px;
  margin-right: 8px;
  vertical-align: middle;
}
.form-step h3 {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  vertical-align: middle;
}
.form-step .hint {
  font-size: 12px;
  color: var(--ink-4);
  margin: 6px 0 12px 30px;
}
.field {
  margin-left: 30px;
  margin-top: 8px;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="url"],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid var(--line-2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--ink-2);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.option {
  border: 0.5px solid var(--line-2);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  cursor: pointer;
  background: var(--surface);
  text-align: left;
  font-family: inherit;
  color: var(--ink);
}
.option:hover { background: var(--surface-2); }
.option.selected {
  border-color: var(--ink);
  background: var(--purple-50);
  color: var(--purple-900);
  border-width: 1px;
}
.option strong { display: block; font-size: 13px; margin-bottom: 2px; }
.option small { font-size: 11px; color: var(--ink-4); }
.option.selected small { color: var(--purple-900); opacity: 0.8; }

/* ─── Info notice ─── */
.notice {
  background: var(--blue-50);
  color: var(--blue-900);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  margin: 1rem 0;
  display: flex;
  gap: 10px;
}
.notice i { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.notice.warn { background: var(--amber-50); color: var(--amber-900); }
.notice.danger { background: var(--pink-50); color: var(--pink-700); }
