/* =============================================
   AIDISH Design System — Apple-inspired
   ============================================= */

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

:root {
  /* === Color Palette === */
  --brand:        #FF6B35;
  --brand-light:  rgba(255,107,53,.1);
  --brand-dark:   #E85420;

  --bg:           #F5F5F7;
  --surface:      #FFFFFF;
  --surface-2:    #FAFAFA;
  --overlay:      rgba(255,255,255,0.78);

  --label-1:      #1D1D1F;
  --label-2:      #3A3A3C;
  --label-3:      #6E6E73;
  --label-4:      #AEAEB2;

  --separator:    rgba(0,0,0,0.08);
  --separator-2:  rgba(0,0,0,0.05);

  --fill-1:       rgba(120,120,128,0.12);
  --fill-2:       rgba(120,120,128,0.08);

  --green:        #34C759;
  --green-bg:     rgba(52,199,89,0.1);
  --red:          #FF3B30;
  --red-bg:       rgba(255,59,48,0.08);
  --blue:         #007AFF;

  /* === 機能アクセント（動画スタジオ等・彩度を揃えた統一トーン 2026-07-13） === */
  --gold:         #B45309;
  --gold-light:   #D97706;
  --gold-bg:      #FDF8EE;
  --gold-line:    rgba(217,119,6,0.30);
  --violet:       #6D28D9;
  --violet-light: #7C3AED;
  --violet-bg:    #F8F5FE;
  --violet-line:  rgba(109,40,217,0.26);
  --sky:          #0284C7;
  --sky-light:    #0EA5E9;
  --teal:         #059669;
  --teal-light:   #10B981;
  --rose:         #DC2626;
  --rose-bg:      #FDF4F4;
  --rose-line:    rgba(220,38,38,0.26);

  /* === Shadows === */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);

  /* === Geometry === */
  --radius-xs:    6px;
  --radius-sm:    10px;
  --radius-md:    14px;
  --radius-lg:    18px;
  --radius-xl:    24px;

  /* === Sidebar === */
  --sidebar-w:    240px;

  /* === Motion === */
  --ease:         cubic-bezier(.36,.66,.04,1);
  --dur:          0.22s;
}

/* ─── Base ─── */
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text',
               'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--label-1);
  min-height: 100vh;
  display: flex;
  letter-spacing: -0.01em;
}

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-w);
  position: fixed; top: 0; left: 0; bottom: 0;
  background: var(--overlay);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--separator);
  display: flex; flex-direction: column;
  z-index: 200;
}

.sidebar-logo {
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--separator-2);
}

.sidebar-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(255,107,53,0.35);
}

.sidebar-logo h1 {
  font-size: 15px; font-weight: 700;
  color: var(--label-1); letter-spacing: -0.3px;
}

.sidebar-logo p {
  font-size: 12px; color: var(--label-3); margin-top: 2px;
  font-weight: 400;
}

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-section-label {
  font-size: 11px; font-weight: 600;
  color: var(--label-4); text-transform: uppercase;
  letter-spacing: 0.6px; padding: 8px 10px 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--label-2); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: all var(--dur) var(--ease);
  margin-bottom: 1px; position: relative;
}

.nav-item .nav-icon {
  width: 28px; height: 28px;
  background: var(--fill-1); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all var(--dur) var(--ease); flex-shrink: 0;
}

.nav-item:hover { background: var(--fill-2); color: var(--label-1); }
.nav-item:hover .nav-icon { background: var(--fill-1); }

.nav-item.active {
  background: var(--brand-light); color: var(--brand);
}
.nav-item.active .nav-icon { background: var(--brand); font-size: 14px; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--separator-2);
}

.sidebar-store-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--fill-1); border-radius: 24px;
  padding: 6px 10px; font-size: 12px; font-weight: 500;
  color: var(--label-2);
}

.sidebar-store-pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0;
}

/* ─── Main ─── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  padding: 0;
}

/* ─── Topbar ─── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--overlay);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
  padding: 0 32px;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
}

.topbar-title { font-size: 15px; font-weight: 600; color: var(--label-1); }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ─── Content area ─── */
.content {
  padding: 32px 32px 100px;
  max-width: 1100px;
}

.content-narrow { max-width: 680px; }

/* ─── Page header ─── */
.page-title {
  font-size: 28px; font-weight: 700; color: var(--label-1);
  letter-spacing: -0.5px; line-height: 1.2;
}

.page-subtitle {
  font-size: 14px; color: var(--label-3); margin-top: 6px; line-height: 1.5;
}

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--separator);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease);
}

.card:hover { box-shadow: var(--shadow-md); }

.card + .card { margin-top: 16px; }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 15px; font-weight: 600; color: var(--label-1);
}

.card-subtitle { font-size: 13px; color: var(--label-3); margin-top: 2px; }

/* ─── Stat cards ─── */
.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--separator);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-label {
  font-size: 12px; font-weight: 600; color: var(--label-3);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.stat-value {
  font-size: 36px; font-weight: 700; color: var(--label-1);
  letter-spacing: -1px; margin: 8px 0 4px; line-height: 1;
}

.stat-desc { font-size: 12px; color: var(--label-4); }

/* ─── Quick actions ─── */
.quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 28px;
}

.quick-card {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none; color: inherit;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur) var(--ease);
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,107,53,0.3);
}

.quick-icon {
  width: 44px; height: 44px;
  background: var(--brand-light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}

.quick-label { font-size: 14px; font-weight: 600; color: var(--label-1); }
.quick-desc { font-size: 12px; color: var(--label-3); margin-top: 4px; line-height: 1.4; }

/* ─── Forms ─── */
.form-section { margin-bottom: 28px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { margin-bottom: 16px; }

label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--label-2); margin-bottom: 7px;
}

.label-hint { font-weight: 400; color: var(--label-3); margin-left: 4px; font-size: 12px; }

input[type="text"],
input[type="number"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--label-1);
  transition: all var(--dur) var(--ease);
  outline: none;
  -webkit-appearance: none;
}

input:focus, textarea:focus, select:focus {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255,107,53,0.12);
}

input::placeholder, textarea::placeholder { color: var(--label-4); }

textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

.field-hint { font-size: 12px; color: var(--label-3); margin-top: 6px; line-height: 1.4; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  border: none; outline: none;
  transition: all var(--dur) var(--ease);
  white-space: nowrap; text-decoration: none;
  letter-spacing: -0.1px;
  -webkit-user-select: none; user-select: none;
}

.btn-primary {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,107,53,0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
}

.btn-primary:active { transform: scale(0.97); box-shadow: none; }

.btn-secondary {
  background: var(--fill-1); color: var(--label-2);
}

.btn-secondary:hover { background: var(--fill-2); color: var(--label-1); }

.btn-ghost {
  background: transparent; color: var(--label-3); padding: 7px 14px; font-size: 13px;
}

.btn-ghost:hover { color: var(--label-1); background: var(--fill-2); }

.btn-danger {
  background: var(--red-bg); color: var(--red); font-size: 13px; padding: 7px 14px;
}

.btn-danger:hover { background: var(--red); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-md); }
.btn-full { width: 100%; }

.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-loading { position: relative; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes shimmer { from { background-position:-200% 0; } to { background-position:200% 0; } }

/* ─── Tone selector ─── */
.tone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.tone-option {
  padding: 14px 10px;
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-md);
  text-align: center; cursor: pointer;
  transition: all var(--dur) var(--ease);
  background: var(--surface-2);
}

.tone-option:hover { border-color: rgba(255,107,53,0.4); background: var(--surface); }

.tone-option.selected {
  border-color: var(--brand);
  background: var(--brand-light);
}

.tone-emoji { font-size: 24px; margin-bottom: 6px; }
.tone-label { font-size: 13px; font-weight: 600; color: var(--label-1); }
.tone-desc { font-size: 11px; color: var(--label-3); margin-top: 3px; }

/* ─── Platform chips ─── */
.platform-row { display: flex; gap: 8px; flex-wrap: wrap; }

.platform-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--separator);
  border-radius: 24px;
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--dur) var(--ease);
  background: var(--surface); color: var(--label-2);
  -webkit-user-select: none; user-select: none;
}

.platform-chip:hover { border-color: rgba(255,107,53,0.4); color: var(--label-1); }

.platform-chip.selected {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand); font-weight: 600;
}

/* ─── Result cards ─── */
.result-card {
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: fadeUp 0.28s var(--ease);
  margin-bottom: 12px;
}

.result-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--separator);
}

.result-platform-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--label-1);
}

.result-card-body {
  padding: 16px;
  font-size: 14px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
  color: var(--label-1); min-height: 72px;
}

.copy-btn {
  padding: 5px 12px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--separator);
  border-radius: 20px;
  background: var(--surface); color: var(--label-2);
  cursor: pointer; font-family: inherit;
  transition: all var(--dur) var(--ease);
}

.copy-btn:hover { background: var(--label-1); color: #fff; border-color: var(--label-1); }
.copy-btn.copied { background: var(--green); color: #fff; border-color: var(--green); }

/* ─── Empty state ─── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 64px 24px; text-align: center;
}

.empty-state-icon {
  width: 64px; height: 64px;
  background: var(--fill-1); border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 20px;
}

.empty-state-title { font-size: 17px; font-weight: 600; color: var(--label-1); }
.empty-state-desc { font-size: 14px; color: var(--label-3); margin-top: 8px; line-height: 1.5; max-width: 320px; }

/* ─── Alerts ─── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px; line-height: 1.5;
  margin-bottom: 20px;
  animation: fadeUp 0.2s var(--ease);
}

.alert-success { background: var(--green-bg); color: #1a5c30; }
.alert-error   { background: var(--red-bg);   color: #8a1a14; }
.alert-info    { background: rgba(0,122,255,0.08); color: #0047ab; }

.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ─── Table ─── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead th {
  padding: 10px 14px;
  font-size: 11px; font-weight: 600; color: var(--label-3);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--separator);
  white-space: nowrap; text-align: left;
}

tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--separator-2);
  vertical-align: middle; color: var(--label-1);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--dur) var(--ease); }
tbody tr:hover td { background: var(--fill-2); }

/* ─── Badge / Tag ─── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
}

.badge-green { background: var(--green-bg); color: #1a5c30; }
.badge-gray  { background: var(--fill-1);   color: var(--label-3); }
.badge-brand { background: var(--brand-light); color: var(--brand); }

/* ─── Toggle switch ─── */
.toggle {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 24px;
  background: var(--fill-1);
  border-radius: 12px; cursor: pointer;
  position: relative; flex-shrink: 0;
  transition: background var(--dur) var(--ease);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left var(--dur) var(--ease);
}

.toggle:checked { background: var(--green); }
.toggle:checked::after { left: 19px; }

/* ─── Menu item row ─── */
.menu-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--separator-2);
  transition: background var(--dur);
}

.menu-row:last-child { border-bottom: none; }

.menu-row-info { flex: 1; min-width: 0; }

.menu-row-name {
  font-size: 14px; font-weight: 600; color: var(--label-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.menu-row-meta { font-size: 12px; color: var(--label-3); margin-top: 3px; }
.menu-row-price { font-size: 14px; font-weight: 600; color: var(--brand); min-width: 64px; text-align: right; }

.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; opacity: 0.25; transition: opacity 0.15s; padding: 4px;
}
.star-btn.on { opacity: 1; }
.star-btn:hover { opacity: 0.7; }

/* ─── History item ─── */
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--separator-2);
}

.history-item:last-child { border-bottom: none; }

.history-text {
  flex: 1; font-size: 14px; color: var(--label-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.history-time { font-size: 12px; color: var(--label-4); white-space: nowrap; }

/* ─── Setup screen ─── */
.setup-screen {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 60% 0%, rgba(255,107,53,0.08) 0%, transparent 60%),
              var(--bg);
  padding: 24px;
}

.setup-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--separator);
  padding: 48px 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.setup-logo {
  width: 52px; height: 52px;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
}

.setup-title { font-size: 26px; font-weight: 700; color: var(--label-1); text-align:center; letter-spacing: -0.5px; }
.setup-sub   { font-size: 14px; color: var(--label-3); text-align: center; margin-top: 8px; line-height: 1.5; }

.setup-divider { height: 1px; background: var(--separator); margin: 28px 0; }

/* ─── Skeleton loading ─── */
.skeleton {
  background: linear-gradient(90deg, var(--fill-1) 25%, var(--fill-2) 50%, var(--fill-1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-xs);
}

/* ─── Divider ─── */
.divider { height: 1px; background: var(--separator); margin: 20px 0; }

/* ─── Tip box ─── */
.tip-box {
  background: rgba(255,107,53,0.06);
  border: 1px solid rgba(255,107,53,0.15);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.tip-box-title { font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 8px; }
.tip-box ul { font-size: 13px; color: var(--label-3); line-height: 1.9; padding-left: 18px; }

/* ─── Layout helpers ─── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--label-3); }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ─── Two-col layout ─── */
.two-col { display: grid; grid-template-columns: 400px 1fr; gap: 24px; align-items: start; }

/* ─── Category tabs ─── */
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }

.cat-tab {
  padding: 5px 14px; border-radius: 20px;
  border: 1px solid var(--separator);
  background: var(--surface-2); color: var(--label-2);
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all var(--dur) var(--ease);
}

.cat-tab:hover { border-color: rgba(255,107,53,0.4); color: var(--label-1); }
.cat-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ─── Menu add row ─── */
.menu-add-grid {
  display: grid; grid-template-columns: 1fr 100px 1.4fr 130px; gap: 10px; align-items: end;
}

/* ─── Mobile Bottom Navigation ─── */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--overlay);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--separator);
  z-index: 300;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav-inner { display: flex; height: 56px; }
.mobile-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--label-4);
  font-size: 10px; font-weight: 500;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-item.active { color: var(--brand); }
.mobile-nav-icon { font-size: 20px; line-height: 1; }

/* ─── Buzz type cards ─── */
.buzz-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.buzz-card {
  padding: 12px 14px;
  border: 1.5px solid var(--separator); border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--dur) var(--ease);
  background: var(--surface-2);
}
.buzz-card:hover { border-color: rgba(255,107,53,0.4); background: var(--surface); }
.buzz-card.selected { border-color: var(--brand); background: var(--brand-light); }
.buzz-card-icon { font-size: 20px; margin-bottom: 5px; }
.buzz-card-label { font-size: 13px; font-weight: 600; color: var(--label-1); }
.buzz-card-desc { font-size: 11px; color: var(--label-3); margin-top: 2px; line-height: 1.4; }

/* ─── Hook chips ─── */
.hook-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hook-chip {
  padding: 5px 12px;
  border: 1.5px solid var(--separator); border-radius: 20px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  background: var(--surface); color: var(--label-2);
  font-family: inherit; transition: all var(--dur) var(--ease);
  -webkit-user-select: none; user-select: none;
}
.hook-chip:hover { border-color: rgba(255,107,53,0.4); }
.hook-chip.selected { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }

/* ─── Generation type tabs ─── */
.gen-tabs {
  display: flex; border-bottom: 1px solid var(--separator);
  margin: 12px 0 0; gap: 0; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.gen-tabs::-webkit-scrollbar { display: none; }
.gen-tab {
  padding: 9px 14px; font-size: 13px; font-weight: 500;
  color: var(--label-3); border-bottom: 2px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: all var(--dur) var(--ease);
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: inherit;
}
.gen-tab:hover { color: var(--label-1); }
.gen-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ─── Buzz metrics ─── */
.buzz-metrics { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.buzz-metric { background: var(--fill-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.buzz-metric-label { font-size: 10px; color: var(--label-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.buzz-metric-val { font-size: 18px; font-weight: 700; color: var(--label-1); margin-top: 2px; }
.buzz-metric-sub { font-size: 10px; color: var(--label-4); margin-top: 1px; }

/* ─── Trend bars ─── */
.trend-item { margin-bottom: 12px; }
.trend-name { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.trend-title { font-size: 13px; font-weight: 600; color: var(--label-1); }
.trend-desc { font-size: 11px; color: var(--label-3); margin-top: 2px; }
.trend-bar { height: 4px; background: var(--fill-1); border-radius: 2px; }
.trend-fill { height: 100%; border-radius: 2px; }

/* ─── Buzzword cloud ─── */
.buzzword-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.buzzword-tag { padding: 4px 10px; background: var(--fill-1); border-radius: 20px; font-size: 12px; color: var(--label-2); }

/* ─── Movie / upload ─── */
.upload-zone {
  border: 2px dashed var(--separator); border-radius: var(--radius-md);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: all var(--dur) var(--ease); background: var(--surface-2);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--brand); background: var(--brand-light); }
.upload-zone-icon { font-size: 40px; margin-bottom: 12px; }
.upload-zone-text { font-size: 15px; font-weight: 600; color: var(--label-1); }
.upload-zone-sub { font-size: 13px; color: var(--label-3); margin-top: 6px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.media-thumb { position: relative; aspect-ratio: 9/16; border-radius: var(--radius-sm); overflow: hidden; background: var(--fill-1); }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb-num {
  position: absolute; top: 4px; left: 4px;
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 11px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.media-thumb-del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.55); color: #fff; border: none; cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .menu-add-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-nav { display: block; }
  .main { margin-left: 0; }
  .topbar { left: 0; padding: 0 16px; }
  .content { padding: 16px 16px 80px; }
  .content-narrow { max-width: 100%; padding-bottom: 80px; }
  .save-bar { margin-left: 0; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0)); }
  .two-col { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .tone-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 16px; }
  .page-title { font-size: 22px; }
  .buzz-grid { grid-template-columns: 1fr 1fr; }
  .topbar { height: 48px; }
  .stat-value { font-size: 28px; }
}
@media (max-width: 480px) {
  .setup-card { padding: 32px 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .buzz-metrics { grid-template-columns: 1fr 1fr; }
}

/* ─── 振り返りAI 数値入力グリッド（375px崩壊対策） ─── */
.review-input-grid { grid-template-columns: repeat(3, 1fr); }
.review-metric-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) {
  .review-input-grid { grid-template-columns: 1fr 1fr; }
  .review-metric-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .review-input-grid { grid-template-columns: 1fr 1fr; }
  .review-metric-grid { grid-template-columns: 1fr 1fr; }
}
