/* Kumo's own app pages (/studio, /me), on top of home.css tokens. 8px grid, one card system. */
[hidden] { display: none !important; }
.page { padding-top: 32px; padding-bottom: 48px; }
.page-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-h h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; }
.page-h p { margin-top: 8px; max-width: 640px; color: var(--ink-2); }
.page-h .usage { margin: 0; color: var(--ink-3); font-size: 14px; }
.page-art { width: 320px; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--r); box-shadow: var(--sh-1); }
@media (max-width: 960px) { .page-art { display: none; } }
.hint { margin: 0; color: var(--ink-3); font-size: 14px; }
.hint.center { text-align: center; margin-top: 12px; }
.hint a { color: var(--ink); font-weight: 700; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.btn.sm { height: 36px; padding: 0 16px; font-size: 14px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.sm:hover { box-shadow: inset 0 0 0 1px rgba(60, 70, 120, .25); }
.btn.sm.primary { color: #fff; background: var(--brand); box-shadow: var(--sh-1); }
.btn.sm.danger { color: #c2344f; }
.btn.wide { width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost-link { background: none; box-shadow: none; color: var(--ink-2); padding: 0 8px; }
.btn.ghost-link:hover { color: var(--ink); box-shadow: none; }
.tnum { font-variant-numeric: tabular-nums; }

/* segmented choice, one selected style for the site: ring + tint */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--k-sunk, #eef1fa); background: #eef1fa; }
.seg button { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease); }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--ink-2); font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: #5b8cff; }
.field { display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; color: var(--ink-2); font-size: 15px; }
.field input { width: 88px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
textarea { display: block; width: 100%; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; line-height: 1.6; resize: vertical; }
textarea:focus, .field input:focus, .subs input:focus { outline: 2px solid #6b4fd8; outline-offset: 0; border-color: transparent; }

/* switch */
.switch { position: relative; margin-left: auto; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.switch i { width: 40px; height: 24px; border-radius: 999px; background: #d7dbe8; transition: background-color var(--t1) var(--ease); }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--t1) var(--ease); }
.switch input:checked + i { background: #5b8cff; }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid #6b4fd8; outline-offset: 2px; }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.steps-col { display: grid; gap: 24px; min-width: 0; }
.step { min-width: 0; }
.step { padding: 24px; border-radius: var(--r); background: var(--card); box-shadow: var(--sh-1); }
.step h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 20px; font-weight: 800; }
.step h2 > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 15px; }
.step h2 small { margin-left: auto; color: var(--ink-3); font: 500 14px/1 inherit; font-family: inherit; }
.step .seg { margin-top: 4px; }
.pics { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.pics-empty { margin: 0; padding: 24px; width: 100%; border-radius: 12px; background: #f3f5fb; color: var(--ink-3); text-align: center; }
.pic { margin: 0; width: 120px; }
.pic canvas { display: block; width: 120px; height: 120px; border-radius: 12px; background: #eef1fa; }
.pic figcaption { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: var(--ink-2); font-size: 13px; }
.pic figcaption button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f1f3fa; color: var(--ink-2); font: 600 15px/1 inherit; cursor: pointer; }
.pic figcaption button:hover:not(:disabled) { background: #e4e8f4; color: var(--ink); }
.pic figcaption button:disabled { opacity: .35; cursor: default; }
.audio-pick { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px; border-radius: 12px; background: #f6f7fc; }
.audio-pick .hint { padding: 4px; }
.audio-pick > div { flex: 1; min-width: 0; }
.audio-pick b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-pick span:not(.kc-ico) { color: var(--ink-3); font-size: 13px; }
.subs { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; max-height: 320px; overflow: auto; }
.subs:empty { display: none; }
.subs li { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 8px; }
.subs span { color: var(--ink-3); font-size: 13px; }
.subs input { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; min-width: 0; }
.preview-col { position: sticky; top: 24px; }
.preview { position: relative; width: min(100%, calc(62vh * var(--ar, .5625))); margin: 0 auto; border-radius: var(--r); overflow: hidden; background: #14162a; box-shadow: var(--sh-2); }
.preview canvas { display: block; width: 100%; height: 100%; }
.pv-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; background: linear-gradient(160deg, #eef3ff, #fdeff5); color: var(--ink-2); text-align: center; }
.pv-empty img { width: 60%; max-width: 200px; aspect-ratio: 1; border-radius: 24px; object-fit: cover; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--ink-2); font-size: 14px; }
.progress { height: 6px; margin-top: 12px; border-radius: 999px; background: #e4e8f4; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width 200ms linear; }

.picker { width: min(720px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 0; border: 0; border-radius: 20px; box-shadow: var(--sh-3); color: var(--ink); }
.picker::backdrop { background: rgba(20, 24, 50, .35); }
.picker-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 24px; }
.picker-h b { font: 800 18px/1.2 var(--round); }
.picker-h .kc-x { position: static; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 8px 24px; max-height: calc(min(80vh, 720px) - 140px); overflow: auto; }
.picker-grid .hint { grid-column: 1 / -1; padding: 24px 0; }
.pk { display: grid; gap: 8px; padding: 8px; border: 0; border-radius: 14px; background: #f4f6fb; cursor: pointer; text-align: left; font: inherit; color: var(--ink-2); font-size: 13px; }
.pk img, .pk .kc-ico { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; height: auto; }
.pk span:not(.kc-ico) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk[aria-pressed="true"] { background: #fff; box-shadow: inset 0 0 0 2px #5b8cff, 0 0 0 4px rgba(91, 140, 255, .15); color: var(--ink); }
.picker-f { display: flex; justify-content: flex-end; padding: 16px 24px 24px; }

/* ---------- my works ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; }
.filters button span { color: var(--ink-3); font-weight: 500; }
.filters button[aria-selected="true"] { border-color: transparent; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px #5b8cff; }
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.work { min-width: 0; display: flex; flex-direction: column; padding: 8px; border-radius: var(--r); background: var(--card); box-shadow: var(--sh-1); }
.w-media { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #14162a; display: grid; place-items: center; }
.w-media.chk { background: #eef1fa repeating-conic-gradient(#e3e7f3 0 25%, #f5f7fd 0 50%) 0 0 / 16px 16px; }
.w-media img, .w-media video { width: 100%; height: 100%; object-fit: contain; }
.w-media.aud { background: linear-gradient(135deg, #e8f0ff, #fdeef4); align-content: center; gap: 12px; padding: 16px; }
.w-media.aud .kc-ico { width: 64px; height: 64px; border-radius: 16px; background: #fff; }
.w-media audio { width: 100%; min-width: 0; height: 36px; }
.w-b { display: flex; flex: 1; flex-direction: column; padding: 12px 8px 8px; }
.w-b h3 { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-meta { display: flex; align-items: center; gap: 6px; margin: 4px 0 16px; color: var(--ink-3); font-size: 13px; }
.w-meta i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.w-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.menu-wrap { position: relative; }
.menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 10; min-width: 180px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: var(--sh-3); }
.menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; text-align: left; }
.menu button:hover { background: #f1f3fa; }
.menu button i { width: 8px; height: 8px; border-radius: 50%; }
.empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; padding: 48px 16px; text-align: center; }
.empty-art { width: 200px; aspect-ratio: 1; object-fit: cover; border-radius: 24px; }
.empty-art.wide { width: min(400px, 100%); aspect-ratio: 2 / 1; }
.empty-state h2 { font-size: 24px; font-weight: 800; }
.empty-state p { max-width: 420px; color: var(--ink-2); }
.empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.empty-acts .btn:not(.primary) { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

@media (max-width: 960px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; order: -1; }
  .preview { width: min(100%, calc(56vh * var(--ar, .5625))); }
}
@media (max-width: 640px) {
  .page { padding-top: 32px; }
  .step { padding: 16px; }
  .pic, .pic canvas { width: 96px; }
  .pic canvas { height: 96px; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .work { padding: 6px; }
  .w-b { padding: 8px 4px 4px; }
  .w-acts .btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
  .seg button { padding: 0 12px; }
}

/* ---------- text pages (privacy) ---------- */
.doc { max-width: 820px; }
.doc-sec { padding-top: 32px; }
.doc-sec h2 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.doc-sec p, .doc-sec li, .doc-dl dd { color: var(--ink-2); font-size: 16px; line-height: 1.7; max-width: 68ch; }
.doc-sec ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.doc-dl { margin: 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px 24px; }
.doc-dl dt { font: 700 16px/1.6 var(--round); color: var(--ink); }
.doc-dl dd { margin: 0; }
@media (max-width: 640px) { .doc-dl { grid-template-columns: minmax(0, 1fr); gap: 4px; } .doc-dl dd { margin-bottom: 12px; } }
