:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --card: #22223a;
  --accent: #7c5cff;
  --accent2: #00d4aa;
  --text: #f0f0f5;
  --muted: #9898b0;
  --border: #2e2e48;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body {
  font-family: "Apple SD Gothic Neo", "Pretendard", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px calc(24px + var(--safe-bottom));
}

.header {
  text-align: center;
  padding: 28px 0 20px;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo span { color: var(--accent2); }

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.screen { display: none; }
.screen.active { display: block; }

h2 { font-size: 1.35rem; margin-bottom: 6px; }
h3 { font-size: 1.05rem; margin-bottom: 10px; }

.sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 14px 0 6px;
}

input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

textarea { resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.btn:active { opacity: 0.85; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #5a3fd4);
  color: #fff;
  width: 100%;
  margin-top: 20px;
}

.btn.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
  margin-top: 12px;
}

.btn.text {
  background: none;
  color: var(--accent2);
  padding: 6px 10px;
  font-size: 0.85rem;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.type-chip {
  padding: 12px 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s, background 0.15s;
}

.type-chip .icon { font-size: 1.4rem; display: block; margin-bottom: 4px; }
.type-chip.selected { border-color: var(--accent2); background: #1a2e2a; }

.store-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 8px;
}

.badge {
  display: inline-block;
  background: var(--card);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--accent2);
  margin-left: 6px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin: 12px 0 16px;
  background: var(--surface);
  padding: 4px;
  border-radius: 12px;
}

.tabs-scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tabs-scroll::after {
  content: "›";
  position: sticky;
  right: 0;
  align-self: center;
  padding: 0 6px;
  color: var(--muted);
  pointer-events: none;
  font-size: 1.1rem;
}

.tabs-scroll .tab {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 10px 12px;
}

.tab {
  flex: 1;
  padding: 10px 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.tab.active {
  background: var(--card);
  color: var(--text);
}

.tab-panel { display: block; }

.mega-panel { display: none; }
.mega-panel.active { display: block; }

.tabs-mega {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.tab-mega {
  padding: 12px 8px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.tab-mega.active {
  border-color: var(--accent2);
  background: linear-gradient(160deg, #2a2548, #1e2838);
  color: #fff;
}

.mega-section {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.mega-section > summary {
  padding: 13px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  user-select: none;
}

.mega-section > summary::-webkit-details-marker {
  display: none;
}

.mega-section > summary::after {
  content: "▸";
  float: right;
  color: var(--muted);
  font-size: 0.85rem;
}

.mega-section[open] > summary::after {
  content: "▾";
}

.mega-section[open] > summary {
  border-bottom: 1px solid var(--border);
  background: #1a1f2e;
}

.mega-section-body {
  padding: 10px 12px 12px;
}

.mega-sub {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.mega-sub > summary {
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  background: #151a26;
}

.mega-sub > summary::-webkit-details-marker {
  display: none;
}

.mega-sub-body {
  padding: 10px 12px;
}

.mega-sub-nested {
  margin-top: 8px;
  font-size: 0.82rem;
}

.mega-sub-nested > summary {
  cursor: pointer;
  padding: 6px 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.card.highlight {
  border-color: #3a3a6a;
  background: linear-gradient(160deg, #252545, #1e1e38);
}

.muted { color: var(--muted); font-size: 0.9rem; }
.time-hint { margin: 10px 0; font-size: 0.88rem; color: var(--muted); }
.mt { margin-top: 12px; }

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--muted);
  text-align: center;
}

.upload-zone:hover { border-color: var(--accent); }
.upload-icon { font-size: 2.5rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
}

.content-list { display: flex; flex-direction: column; gap: 10px; }

.content-item {
  padding: 12px;
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}

.content-item:hover { border-color: var(--border); }

.content-item .title {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.content-item .meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.status-draft { color: #f0c040; }
.status-approved { color: var(--accent2); }
.status-published { color: #60a0ff; }

.commerce-grid {
  display: grid;
  gap: 12px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.stat-card h4 {
  font-size: 0.82rem;
  color: var(--accent2);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-sub { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.tips-list {
  list-style: none;
  margin-top: 8px;
}

.tips-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.tips-list li:last-child { border-bottom: none; }

.calendar-list { display: flex; flex-direction: column; gap: 8px; }

.cal-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.cal-day {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent2);
}

.shorts-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

.shorts-card {
  padding: 14px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.shorts-card h4 { margin: 0 0 8px; font-size: 1rem; }

.shorts-pillar {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent2);
  margin-bottom: 8px;
}

.shorts-hook {
  font-size: 0.9rem;
  padding: 10px;
  background: rgba(255, 179, 71, 0.12);
  border-radius: 8px;
  margin: 8px 0;
}

.shorts-meta { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }

.shorts-copy-row { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.shorts-agency-hero {
  padding: 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(255, 179, 71, 0.12));
  border-radius: 14px;
  border: 1px solid var(--border);
}

.shorts-agency-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  margin-bottom: 10px;
}

.shorts-agency-headline {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.45;
}

.agency-section {
  padding: 14px;
  margin-bottom: 10px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.agency-section h4 { margin: 0 0 10px; font-size: 0.95rem; }

.agency-lead {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 8px;
}

.agency-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 0;
}

.agency-stat {
  padding: 8px 10px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.82rem;
}

.agency-stat span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.agency-opportunity {
  font-size: 0.88rem;
  padding: 10px;
  background: rgba(0, 184, 148, 0.1);
  border-radius: 8px;
  margin-top: 8px;
}

.agency-category-pick {
  margin: 8px 0;
}

.agency-conversion {
  font-size: 0.85rem;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(255, 179, 71, 0.12);
  border-radius: 8px;
}

.agency-timeline { margin-top: 12px; }

.agency-timeline-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

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

.agency-time {
  flex-shrink: 0;
  width: 52px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent2);
}

.agency-kpi {
  font-size: 0.8rem;
  margin-top: 10px;
  padding: 8px;
  background: var(--surface);
  border-radius: 8px;
  color: var(--muted);
}

.agency-signals li { font-size: 0.85rem; }

.agency-shoot { margin-top: 4px; }

.daily-pulse-hero {
  padding: 14px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(0, 184, 148, 0.12), rgba(108, 92, 231, 0.1));
  border-radius: 12px;
  border: 1px solid var(--border);
}

.pulse-signal {
  font-size: 0.88rem;
  margin: 0 0 6px;
}

.pulse-shift {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 8px 0;
  padding: 8px;
  background: var(--surface);
  border-radius: 8px;
}

.pulse-action {
  font-size: 0.88rem;
  margin: 6px 0 0;
  color: var(--accent2);
}

.kw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kw-chip {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface);
}

.kw-rising { color: #00b894; }
.kw-cooling { color: var(--muted); }

.pillars-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pillar-chip {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.photo-pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.photo-pick-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
}

.photo-pick-item.selected { border-color: var(--accent2); }

.photo-pick-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-preview {
  width: 100%;
  max-height: 360px;
  border-radius: 10px;
  background: #000;
}

.brief-block {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.brief-block:last-child { border-bottom: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#modal-assist {
  z-index: 110;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0,0,0,0.6);
}

.modal-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  width: 100%;
  max-width: 480px;
  max-height: 85dvh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 14px;
  max-height: 200px;
  object-fit: cover;
}

.caption-preview {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  background: var(--surface);
  padding: 14px;
  border-radius: 10px;
  margin: 12px 0;
  border: none;
  color: var(--text);
}

.modal-algo-hint {
  font-size: 0.82rem;
  color: var(--accent, #7c6cf0);
  background: rgba(124, 108, 240, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 8px;
  line-height: 1.45;
}

/* 채널별 일일 알고리즘·키워드 (상단 고정 품질) */
.channel-algo-daily-panel {
  margin-bottom: 12px;
}

.channel-algo-hero {
  padding: 14px 14px 10px;
  margin-bottom: 0;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.14), rgba(0, 184, 148, 0.12));
  border-radius: 14px 14px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.channel-algo-hero h3 {
  margin: 6px 0 4px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.channel-algo-body {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0 0 14px 14px;
  padding: 12px 14px 14px;
}

.channel-briefing-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.channel-briefing-tabs .ch-brief-tab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
}

.channel-briefing-tabs .ch-brief-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.channel-briefing-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
}

.channel-briefing-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.channel-briefing-verdict {
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0 0 10px;
  color: var(--text);
}

.channel-briefing-meta {
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 6px 0;
}

.channel-briefing-meta strong {
  color: var(--accent2);
}

.modal-channel-briefing {
  margin: 8px 0 10px;
}

.modal-channel-briefing .channel-briefing-card {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 184, 148, 0.08));
  border-color: rgba(108, 92, 231, 0.35);
}

.btn-copy-briefing {
  margin-top: 10px;
  width: 100%;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .btn {
  flex: 1;
  margin-top: 0;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a4a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.toast.hidden { display: none; }

.mini-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
}

.mini-stat-row strong { color: var(--accent2); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.highlight-card {
  background: linear-gradient(160deg, #2a2548, #1e2838);
  border-color: #4a4080;
}

.savings { color: var(--accent2); font-size: 1.2rem; margin-top: 6px; }

.channel-list { display: flex; flex-direction: column; gap: 8px; }

.channel-hub-ads {
  position: static;
  margin-bottom: 10px;
}

.strategy-media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.strategy-media-col {
  padding: 12px !important;
  margin-bottom: 0 !important;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.strategy-media-title {
  margin: 0 0 6px;
  font-size: 0.88rem;
}

.video-platform-pick .btn {
  flex: 1;
  margin-top: 0;
  font-size: 0.72rem;
  padding: 8px 4px;
}

.video-platform-pick .btn.active {
  border-color: var(--accent2);
  background: #1a2e2a;
}

.video-platform-review {
  border: 1px solid var(--border);
  border-radius: 10px;
}

.photo-pick-horizontal {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  flex: 1;
  min-height: 100px;
  align-items: stretch;
}

.photo-pick-horizontal .photo-pick-item {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
}

.ads-photo-strip {
  margin-bottom: 10px;
  padding: 12px !important;
}

.ads-photo-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.upload-zone-wide {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.upload-zone-label {
  font-size: 0.82rem;
  text-align: center;
}

.ads-photo-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.ads-photo-side .btn {
  width: 100%;
}

.photo-grid-strip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  margin-top: 10px;
  padding-bottom: 4px;
}

.photo-grid-strip img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.shorts-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.shorts-hub-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #1a1f2e;
}

.shorts-hub-summary {
  padding: 10px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.shorts-hub-summary::-webkit-details-marker {
  display: none;
}

.shorts-hub-icon {
  flex-shrink: 0;
}

.shorts-hub-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.shorts-hub-body {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
}

.shorts-hub-desc {
  font-size: 0.72rem;
  max-height: 80px;
  overflow: auto;
  margin: 4px 0 8px;
}

.shorts-hub-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.shorts-hub-actions .btn {
  flex: 1;
  font-size: 0.68rem;
  padding: 4px 6px;
}

.review-list-compact .review-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.review-list-compact .review-item:last-child {
  border-bottom: none;
}

.agency-hub-wrap {
  padding: 0;
}

.agency-hub-lead {
  margin: 0 0 10px;
  font-size: 0.82rem;
}

.agency-hub-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.agency-hub-card {
  flex: 0 0 148px;
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #1a1f2e;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
  transition: border-color 0.15s;
}

.agency-hub-card:hover {
  border-color: #4a4080;
}

.agency-hub-card.active {
  border-color: var(--accent2);
  background: linear-gradient(160deg, #2a2548, #1e2838);
}

.agency-hub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.agency-hub-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.agency-hub-label {
  flex: 1;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
}

.agency-hub-badge {
  font-size: 0.62rem;
  padding: 2px 5px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.agency-hub-ok {
  background: #1a2e2a;
  color: #7ee8b8;
  border: 1px solid #2a5a48;
}

.agency-hub-warn {
  background: #2a2218;
  color: #ffb347;
  border: 1px solid #5a4020;
}

.agency-hub-card-desc {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.agency-detail-panel {
  margin-top: 10px;
  padding: 14px !important;
}

.agency-detail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.agency-detail-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.agency-detail-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 10px;
}

.agency-reviews-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.agency-review-card {
  flex: 0 0 min(300px, 42vw);
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.agency-review-card .review-head {
  margin-bottom: 6px;
}

.agency-review-card p {
  font-size: 0.82rem;
  margin: 4px 0;
}

.agency-review-card .ai-reply {
  margin-top: 8px;
  padding: 8px;
}

.agency-review-card .ai-reply pre {
  font-size: 0.78rem;
  max-height: 100px;
  overflow-y: auto;
}

@media (max-width: 520px) {
  .strategy-media-row,
  .ads-photo-row {
    grid-template-columns: 1fr;
  }

  .shorts-hub-grid {
    grid-template-columns: 1fr;
  }
}

.channel-hub-wrap {
  position: sticky;
  top: 0;
  z-index: 6;
  margin-bottom: 10px;
}

.channel-hub-sub {
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.channel-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.channel-hub-item {
  background: #1a1f2e;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ch-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.ch-hub-label {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.ch-hub-mode {
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--muted);
  margin-left: 2px;
}

.ch-hub-badge {
  font-size: 0.62rem;
  padding: 2px 5px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ch-hub-ok {
  background: #1a2e2a;
  color: #7ee8b8;
  border: 1px solid #2a5a48;
}

.ch-hub-warn {
  background: #2a2218;
  color: #ffb347;
  border: 1px solid #5a4020;
}

.ch-hub-status {
  font-size: 0.68rem;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-hub-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ch-hub-actions::-webkit-scrollbar {
  display: none;
}

.ch-hub-btn {
  flex: 0 0 auto;
  padding: 3px 7px;
  font-size: 0.68rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.ch-hub-btn:hover {
  border-color: var(--accent2);
}

.ch-hub-btn.ch-hub-setup {
  color: var(--muted);
}

.channel-detail {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.channel-detail summary {
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  list-style: none;
  user-select: none;
}

.channel-detail summary::-webkit-details-marker {
  display: none;
}

.channel-detail summary::after {
  content: "▸";
  float: right;
  color: var(--muted);
  font-size: 0.8rem;
}

.channel-detail[open] summary::after {
  content: "▾";
}

.channel-detail[open] summary {
  border-bottom: 1px solid var(--border);
  background: #1a1f2e;
}

.channel-detail-body {
  padding: 0;
}

.channel-detail-card {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.channel-detail-card .sub {
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.compact-profile {
  font-size: 0.85rem;
  padding: 8px 0;
}

.compact-market {
  font-size: 0.82rem;
}

.compact-tips {
  display: none;
}

.channel-list-compact .channel-row {
  padding: 8px 0;
}

.channel-list-compact .ch-url {
  margin-bottom: 4px;
}

.channel-posts-compact .content-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.channel-posts-compact .content-item .title {
  font-size: 0.85rem;
}

.channel-posts-compact .content-item .meta {
  font-size: 0.72rem;
}

.channel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.channel-info { display: flex; gap: 10px; align-items: center; }
.ch-icon { font-size: 1.4rem; }

.ch-url {
  margin-bottom: 8px;
  font-size: 0.85rem;
  padding: 8px 10px;
}

.channel-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0;
  padding-bottom: 4px;
}

.channel-tabs .ch-tab {
  flex-shrink: 0;
  white-space: nowrap;
}

.ch-tab {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}

.ch-tab.active {
  border-color: var(--accent2);
  background: #1a2e2a;
}

.ch-tab-carrot {
  border-color: #ff6f0f55;
}

.ch-tab-carrot.active {
  border-color: #ff6f0f;
  background: #2a2218;
}

.carrot-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.carrot-link-item {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ff6f0f44;
  background: #2a2218;
  color: #ffb347;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.carrot-link-item:hover {
  border-color: #ff6f0f;
  background: #352818;
}

.cafe-policy-box {
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.cafe-policy-notice {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.55;
  background: #1a1f2e;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
  color: #d8e0f0;
}

.cafe-policy-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  cursor: pointer;
}

.cafe-policy-agree input {
  margin-top: 4px;
  flex-shrink: 0;
}

#naver-cafe-policy-banner.policy-warn {
  color: #ffb347;
}

#naver-cafe-policy-banner.policy-banned {
  color: #ff6b6b;
}

.channel-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

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

.agency-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.agency-item {
  padding: 12px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.review-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.review-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.ai-reply {
  margin-top: 10px;
  padding: 10px;
  background: var(--surface);
  border-radius: 8px;
}

.ai-reply pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.85rem;
  margin: 6px 0;
  color: var(--muted);
}

.naver-profile {
  padding: 12px;
  background: var(--surface);
  border-radius: 10px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.market-brief {
  padding: 12px;
  background: #2a2218;
  border: 1px solid #ff6f0f33;
  border-radius: 10px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.market-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.market-summary {
  margin: 8px 0 0;
  line-height: 1.5;
  color: var(--text);
}

.assist-photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.assist-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border);
}

.search-results { margin-top: 12px; }

.search-item {
  padding: 16px;
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  border: 2px solid var(--border);
  -webkit-tap-highlight-color: rgba(3, 199, 90, 0.3);
}

.search-item:hover,
.search-item:active { border-color: #03c75a; background: #1a2e24; }

.btn-link-place {
  width: 100%;
  margin-top: 12px !important;
  font-size: 1rem;
  padding: 14px !important;
}

.naver-success-banner {
  background: #03c75a;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 14px;
}

.next-steps {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.next-steps .btn {
  margin-top: 0 !important;
  pointer-events: auto;
  touch-action: manipulation;
  position: relative;
  z-index: 2;
}

button, .btn, .tab, .search-item, a.btn {
  touch-action: manipulation;
  cursor: pointer;
}

.search-item strong { display: block; margin-bottom: 4px; }
.search-item .muted { font-size: 0.8rem; }

.instr-list {
  margin: 10px 0;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--muted);
}

.instr-list li { margin-bottom: 6px; }

.hidden { display: none !important; }

.kid-guide {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #2a4a3a;
}

.kid-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: #7dffb8;
}

.kid-steps {
  margin: 0 0 14px 0;
  padding-left: 22px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
}

.kid-steps li { margin-bottom: 4px; }

.kid-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

.btn.naver-green {
  background: #03c75a;
  color: #fff;
  width: 100%;
  margin-top: 4px;
  text-decoration: none;
}

.api-key-hero {
  border: 3px solid #03c75a !important;
  background: linear-gradient(160deg, #1a2e24, #1a1a2e) !important;
  position: relative;
  margin-bottom: 16px;
}

.api-key-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: #03c75a;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 20px;
}

.api-warn {
  background: #3a2a10;
  border: 1px solid #c9a020;
  color: #ffd966;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.api-input {
  font-size: 1rem !important;
  border-color: #03c75a !important;
}

.api-help {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.api-help summary {
  cursor: pointer;
  color: var(--accent2);
  font-weight: 600;
}

/* PWA 설치 배너 */
.pwa-install {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #1e3a2f, #1a1a2e);
  border: 1px solid #03c75a55;
  border-radius: var(--radius);
}

.pwa-install-text {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.4;
}

.pwa-install-text strong {
  display: block;
  margin-bottom: 2px;
}

.pwa-install-btn {
  flex-shrink: 0;
  padding: 8px 12px !important;
  font-size: 0.85rem !important;
}

.pwa-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
}

html.pwa-standalone .pwa-install {
  display: none !important;
}

html.pwa-standalone .header {
  padding-top: calc(28px + env(safe-area-inset-top, 0px));
}

.install-page .install-url {
  word-break: break-all;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent2);
  margin: 12px 0;
  padding: 12px;
  background: var(--bg);
  border-radius: 10px;
}

.qr-wrap {
  text-align: center;
  margin: 12px 0;
}

.qr-wrap img {
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.assist-box .assist-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.assist-box .assist-actions .btn {
  flex: 1;
  min-width: 90px;
}

.publish-result-box {
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
}

.publish-result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.publish-result-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.publish-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.publish-result-badge {
  font-size: 0.72rem;
  font-weight: 500;
  color: #9ecfff;
  white-space: nowrap;
}

.publish-result-note {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #b8b8c8;
  line-height: 1.4;
}

.publish-result-url {
  margin: 6px 0 0;
  font-size: 0.7rem;
  word-break: break-all;
  color: #7eb8ff;
}

.publish-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.publish-result-actions .btn {
  flex: 1;
  min-width: 100px;
  text-align: center;
  text-decoration: none;
}

/* 소비자 테스트 페이지 */
.test-page .test-hero h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.test-status {
  font-size: 0.9rem;
  margin: 10px 0 4px;
}

.test-ok { color: var(--accent2); font-weight: 700; }
.test-bad { color: #ff8a8a; font-weight: 700; }

.test-progress-wrap { margin-top: 14px; }

.test-progress-track {
  height: 8px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
}

.test-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 0.25s ease;
}

.test-scenarios {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 16px;
}

.test-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.test-card.done {
  border-color: rgba(0, 212, 170, 0.35);
  background: rgba(0, 212, 170, 0.06);
}

.test-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 8px;
}

.test-check {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent2);
}

.test-check-title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.4;
}

.test-goal {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 10px 30px;
}

.test-steps {
  margin: 0 0 12px 30px;
  font-size: 0.84rem;
}

.test-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 30px;
}

.test-card-actions .btn {
  font-size: 0.88rem;
  padding: 10px 14px;
}

.test-feedback-card textarea {
  margin-top: 4px;
}

.test-feedback-card textarea {
  margin-top: 4px;
}

/* ── 매장 사진 진단 온보딩 ── */
.audit-photo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.audit-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 140px;
  padding: 12px !important;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.audit-slot.has-photo {
  padding: 0 !important;
}

.audit-slot-icon {
  font-size: 1.6rem;
}

.audit-slot strong {
  font-size: 0.88rem;
}

.audit-slot-hint {
  font-size: 0.72rem;
}

.audit-slot.has-photo .audit-slot-icon,
.audit-slot.has-photo strong,
.audit-slot.has-photo .audit-slot-hint {
  display: none;
}

.audit-preview {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
}

.audit-results {
  margin-top: 14px;
}

.audit-score-card {
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(160deg, #2a2548, #1e2838);
  border: 1px solid #4a4080;
  margin-bottom: 12px;
}

.audit-score-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.audit-score-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent2);
  line-height: 1;
}

.audit-cat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.audit-cat-item {
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}

.audit-cat-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.audit-cat-item strong {
  font-size: 1.1rem;
  color: var(--accent2);
}

.audit-problem-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audit-problem {
  padding: 12px;
  background: #1a1f2e;
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

.audit-problem.severity-high {
  border-left-color: #ff6b6b;
}

.audit-problem.severity-medium {
  border-left-color: #ffb347;
}

.audit-problem.severity-low {
  border-left-color: var(--accent2);
}

.audit-problem h5 {
  margin: 0 0 4px;
  font-size: 0.88rem;
}

.audit-observed {
  margin: 4px 0;
  font-size: 0.8rem;
  color: var(--accent2);
  line-height: 1.45;
}

.audit-problem p {
  margin: 4px 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.audit-problem .fix-line {
  color: var(--text);
  font-size: 0.8rem;
}

.audit-quick-wins {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 10px;
  font-size: 0.8rem;
}

.audit-quick-wins ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

@media (max-width: 520px) {
  .audit-photo-row,
  .audit-cat-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .audit-photo-row {
    min-height: 180px;
  }

  .audit-slot {
    min-height: 180px;
  }

  .audit-preview {
    height: 180px;
  }

  .audit-problem-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* ── 데스크톱 / 넓은 창: 가로 한눈에 ── */
@media (min-width: 900px) {
  #app {
    max-width: min(98vw, 1440px);
    padding: 0 24px 20px;
  }

  .header {
    padding: 14px 0 10px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
  }

  .logo { font-size: 1.55rem; }
  .tagline { margin-top: 0; font-size: 0.85rem; }

  #screen-dashboard.active {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 24px;
    align-items: center;
  }

  #screen-dashboard > .store-bar {
    grid-column: 1;
    padding: 4px 0 0;
  }

  #screen-dashboard > .tabs-mega {
    grid-column: 2;
    margin: 4px 0 0;
    min-width: 340px;
  }

  #screen-dashboard > .mega-panel {
    grid-column: 1 / -1;
  }

  /* 광고: 사진 촬영 + 채널 허브 나란히 */
  #mega-ads.active {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
  }

  #mega-ads > .ads-photo-strip {
    grid-column: 1;
    margin-bottom: 0;
    min-height: 240px;
  }

  #mega-ads > .channel-hub-wrap {
    grid-column: 2;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  #mega-ads > .channel-hub-wrap h3 {
    margin-bottom: 8px;
    font-size: 0.95rem;
  }

  #mega-ads > .mega-section {
    grid-column: 1 / -1;
  }

  #mega-ads .channel-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 1;
    align-content: start;
  }

  #mega-ads .channel-hub-item {
    padding: 10px;
    min-height: 88px;
  }

  .ads-photo-row {
    grid-template-columns: 1.6fr 1fr;
    min-height: 200px;
  }

  .upload-zone-wide {
    min-height: 200px;
  }

  .photo-grid-strip {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .photo-grid-strip img {
    width: 72px;
    height: 72px;
  }

  /* 홍보전략: 미디어 + 숏츠 허브 3열 */
  #section-shorts > summary {
    display: none;
  }

  #section-shorts {
    border: none;
    background: transparent;
    margin-bottom: 0;
  }

  #section-shorts[open] > summary {
    border-bottom: none;
  }

  #section-shorts .mega-section-body {
    padding: 0;
  }

  #tab-shorts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }

  #tab-shorts > .hidden {
    display: none !important;
  }

  #strategy-media-row {
    grid-column: 1 / 3;
    min-height: 220px;
  }

  #strategy-actions-row {
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0 !important;
  }

  #strategy-actions-row .btn {
    width: 100%;
    margin-top: 0;
  }

  #shorts-hub-wrap {
    grid-column: 3;
    grid-row: 1 / span 5;
    margin-top: 0 !important;
    min-height: 260px;
    display: flex;
    flex-direction: column;
  }

  #shorts-hub-wrap .shorts-hub-grid {
    flex: 1;
    grid-template-columns: 1fr;
    align-content: start;
  }

  #video-brief-box,
  #shorts-week-meta,
  #shorts-tips,
  #daily-algo-strategy-box,
  #openai-key-box,
  #openai-status-line {
    grid-column: 1 / 3;
  }

  .strategy-media-col {
    min-height: 220px;
  }

  .photo-pick-horizontal .photo-pick-item {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
  }

  /* 대행: 허브 한 줄 */
  #section-agency > summary {
    display: none;
  }

  #section-agency {
    border: none;
    background: transparent;
  }

  #section-agency .mega-section-body {
    padding: 0;
  }

  .agency-hub-strip {
    flex-wrap: nowrap;
    overflow-x: visible;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
  }

  .agency-hub-card {
    flex: none;
    min-height: 96px;
  }

  .agency-detail-panel {
    min-height: 140px;
  }

  .agency-reviews-row {
    flex-wrap: nowrap;
  }
}

@media (min-width: 1200px) {
  #mega-ads .channel-hub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #mega-ads > .ads-photo-strip {
    min-height: 260px;
  }

  .upload-zone-wide {
    min-height: 220px;
  }

  .shorts-hub-summary {
    padding: 12px 10px;
    font-size: 0.82rem;
  }

  .ch-hub-label {
    font-size: 0.85rem;
  }

  #tab-shorts {
    grid-template-columns: 1.1fr 1.1fr 1fr;
  }
}
