:root {
  --ink: #111318;
  --muted: #667085;
  --line: #e6e8ec;
  --soft: #f6f7f9;
  --pink: #fe2c55;
  --pink-dark: #df153d;
  --cyan: #25f4ee;
  --danger: #c52545;
  --shadow: 0 14px 40px rgba(22, 29, 37, .08);
}

* { box-sizing: border-box; }
html { background: #fff; }
body { margin: 0; color: var(--ink); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; z-index: 10; }
.logo { display: flex; gap: 11px; align-items: center; color: var(--ink); font-weight: 800; font-size: 16px; text-decoration: none; letter-spacing: -.02em; }
.logo img { width: 35px; height: 35px; border-radius: 10px; }
.sidebar nav { margin-top: 44px; display: grid; gap: 8px; }
.nav-item { border: 0; background: transparent; border-radius: 11px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; text-align: left; color: #596273; font-weight: 650; }
.nav-item span { font-size: 19px; width: 22px; text-align: center; }
.nav-item:hover { background: var(--soft); }
.nav-item.active { background: #111318; color: #fff; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 9px; padding: 16px 14px 0; border-top: 1px solid var(--line); }
.sidebar-bottom a { color: var(--muted); text-decoration: none; font-size: 13px; }

main { min-width: 0; padding: 0 48px 64px; background: #fbfbfc; }
.topbar { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.topbar h1 { margin: 1px 0 0; font-size: 25px; letter-spacing: -.025em; }
.eyebrow { margin: 0; color: #9198a5; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.account-area { display: grid; justify-items: end; gap: 6px; }
.account-area .text-danger { font-size: 12px; padding: 0 8px; cursor: pointer; }
.account-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px 7px 7px; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.account-chip img, .creator-row img { width: 38px; height: 38px; border-radius: 50%; background: #e8eaf0; object-fit: cover; }
.account-chip div { display: grid; line-height: 1.25; }
.account-chip strong { font-size: 13px; }
.account-chip span { color: #1a9b5d; font-size: 11px; }

.notice { max-width: 1180px; margin: 0 auto 20px; padding: 13px 16px; border: 1px solid #b8d7c7; background: #f1fbf6; color: #176b45; border-radius: 10px; }
.notice.error { border-color: #f0b8c3; background: #fff3f5; color: #9c1935; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.signed-out { max-width: 590px; margin: 8vh auto; padding: 54px 50px; text-align: center; }
.signed-out h2 { font-size: 30px; margin: 8px 0 12px; letter-spacing: -.03em; }
.signed-out > p:not(.eyebrow):not(.fineprint) { color: var(--muted); max-width: 430px; margin: 0 auto 25px; }
.connect-mark { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 22px; background: #111318; color: #fff; font-size: 33px; box-shadow: -5px 5px 0 var(--cyan), 5px -5px 0 var(--pink); }

.primary, .secondary { border: 0; border-radius: 9px; font-weight: 750; padding: 10px 16px; }
.primary { background: var(--pink); color: white; }
.primary:hover { background: var(--pink-dark); }
.primary:disabled { background: #d9dce2; color: #8c939f; cursor: not-allowed; }
.secondary { background: #fff; border: 1px solid #d7dae0; color: var(--ink); }
.large { padding: 13px 28px; font-size: 16px; }
.full { width: 100%; padding: 13px 18px; }
.fineprint { color: #89919e; font-size: 12px; }
.legal-links { margin-top: 6px; line-height: 1.7; }
.legal-links a { color: inherit; text-decoration: underline; }
.center { text-align: center; }
.muted { color: var(--muted); margin-top: 5px; }

.view { max-width: 1180px; margin: 0 auto; }
.welcome-row, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.welcome-row h2 { font-size: 26px; margin: 2px 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 38px; }
.stats.account-stats { margin-bottom: 0; }
.stats.account-stats + .stats { margin-top: 14px; }
.stats article { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.stats span { display: block; color: var(--muted); font-size: 12px; }
.stats strong { display: block; margin-top: 7px; font-size: 28px; letter-spacing: -.03em; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { font-size: 19px; margin: 0; }
.section-heading p { color: var(--muted); margin: 0; font-size: 12px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 15px; }
.video-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.035); }
.video-card .cover { aspect-ratio: 9 / 11; background: #eceef1; position: relative; overflow: hidden; }
.video-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.video-card .cover span { position: absolute; right: 9px; bottom: 9px; padding: 3px 7px; border-radius: 5px; background: rgba(0,0,0,.7); color: white; font-size: 11px; }
.video-card .details { padding: 13px 14px 15px; }
.video-card h3 { margin: 0 0 12px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.metrics strong { color: var(--ink); font-weight: 700; }
.empty-state { padding: 45px 20px; text-align: center; color: var(--muted); }
.empty-state p { margin-bottom: 0; }
.text-danger { color: var(--danger); border: 0; background: transparent; font-weight: 700; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 20px; }
.post-main { display: grid; gap: 18px; }
.form-section { padding: 25px; }
.step { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.step > span { display: grid; place-items: center; width: 28px; height: 28px; background: #111318; color: white; border-radius: 50%; font-size: 12px; font-weight: 800; }
.step h2 { font-size: 18px; margin: 0; }
.step p { color: var(--muted); margin: 0; font-size: 12px; }
.drop-zone { min-height: 210px; border: 1.5px dashed #cbd0d8; border-radius: 13px; background: #fafbfc; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: .15s ease; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--pink); background: #fff7f8; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { margin-top: 10px; }
.drop-zone small { color: var(--muted); margin-top: 2px; }
.upload-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 24px; }
.file-summary { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: center; }
.file-summary video { width: 180px; max-height: 220px; border-radius: 11px; background: #111; }
.file-summary div { display: grid; gap: 7px; }
.file-summary span { color: var(--muted); font-size: 13px; }
.file-summary button { width: fit-content; border: 0; background: transparent; color: var(--pink-dark); padding: 0; font-weight: 700; }

fieldset { border: 0; padding: 0; margin: 0; }
legend, .field > span { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 750; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.mode-switch legend { grid-column: 1 / -1; }
.mode-switch label { position: relative; }
.mode-switch input { position: absolute; opacity: 0; }
.mode-switch label > span { display: grid; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.mode-switch small { color: var(--muted); }
.mode-switch input:checked + span { border-color: #171a20; box-shadow: inset 0 0 0 1px #171a20; background: #f7f7f8; }
.field { display: block; margin: 20px 0; }
.field textarea, .field select { width: 100%; border: 1px solid #ccd1d9; border-radius: 9px; background: #fff; padding: 11px 12px; color: var(--ink); outline: none; }
.field textarea:focus, .field select:focus { border-color: #333b48; box-shadow: 0 0 0 3px rgba(17,19,24,.07); }
.field small { display: block; color: var(--muted); text-align: right; margin-top: 4px; }
.checks { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.checks legend { grid-column: 1 / -1; }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.checks input { width: 17px; height: 17px; accent-color: #111318; }
.checks input:disabled + span { color: #a3a8b1; }
.disclosures { grid-template-columns: 1fr; }
.disclosures label { padding: 8px 0; }
.disclosures span { display: grid; }
.disclosures small { color: var(--muted); }
.info-box { background: #f1f8ff; border: 1px solid #c8def6; color: #315978; border-radius: 10px; padding: 13px 15px; font-size: 13px; }

.publish-card { position: sticky; top: 22px; padding: 23px; }
.creator-row { display: flex; align-items: center; gap: 11px; padding: 15px 0 18px; border-bottom: 1px solid var(--line); }
.creator-row div { display: grid; }
.creator-row span { color: var(--muted); font-size: 12px; }
.summary-list { margin: 6px 0 20px; }
.summary-list div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #eff0f2; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; max-width: 175px; text-align: right; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consent { display: flex; gap: 9px; align-items: flex-start; padding: 12px; margin: 0 0 16px; border-radius: 9px; background: var(--soft); font-size: 11px; }
.consent input { margin-top: 3px; accent-color: #111318; }
.consent a { color: inherit; }

dialog { width: min(460px, calc(100vw - 32px)); border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.22); padding: 0; }
dialog::backdrop { background: rgba(16,18,22,.58); backdrop-filter: blur(3px); }
.progress-content { padding: 42px; text-align: center; }
.progress-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 20px; border-radius: 18px; background: #111318; color: white; font-size: 29px; }
.progress-content h2 { margin: 7px 0; }
.progress-content p:not(.eyebrow) { color: var(--muted); }
.progress-track { overflow: hidden; height: 7px; background: #eceef2; border-radius: 99px; margin: 25px 0 9px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width .25s ease; }
#progress-percent { font-size: 13px; }
#progress-close { margin-top: 22px; }
.icon-button { border: 0; background: transparent; font-size: 21px; }
.mobile-only { display: none; }

@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; width: 260px; }
  .sidebar.open { display: flex; }
  .mobile-only { display: inline-block; }
  main { padding: 0 22px 45px; }
  .topbar { justify-content: flex-start; }
  .account-area { margin-left: auto; }
  .post-layout { grid-template-columns: 1fr; }
  .publish-card { position: static; }
}

@media (max-width: 650px) {
  main { padding-inline: 15px; }
  .topbar { min-height: 86px; }
  .topbar .eyebrow { display: none; }
  .account-chip div { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .welcome-row, .section-heading { align-items: flex-start; }
  .section-heading { flex-direction: column; }
  .signed-out { padding: 40px 24px; }
  .file-summary { grid-template-columns: 1fr; }
  .file-summary video { width: 100%; }
  .checks { grid-template-columns: 1fr; }
}
