:root{color-scheme:light;--bg:#f4f7fb;--paper:#fff;--ink:#0f172a;--muted:#526178;--line:#e5eaf2;--blue:#2563eb;--hover:#eef4ff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}
.topbar{height:68px;position:sticky;top:0;z-index:20;display:flex;align-items:center;background:var(--paper);border-bottom:1px solid var(--line);padding:0 28px;gap:32px}
.brand{display:flex;align-items:center;gap:12px;min-width:184px;color:var(--ink)}
.brand img{width:98px}
.brand span{font-size:17px;font-weight:500;border-left:1px solid var(--line);padding-left:12px;color:#56647a}
.top-context{display:flex;align-items:center;gap:18px;min-width:0;font-weight:500}
.context-divider{color:#b1bdce;font-size:24px;font-weight:300}
.environment{font:10px/1.2 ui-monospace,monospace;color:#64748b;border:1px solid #dce3ed;border-radius:4px;padding:4px 7px;letter-spacing:.06em}
.top-actions{margin-left:auto;display:flex;gap:22px;align-items:center;white-space:nowrap}
.top-actions>a{color:var(--muted);font-size:13px}
.avatar{width:32px;height:32px;background:#e7efff;color:#245ac7;border-radius:50%;display:grid;place-items:center;cursor:pointer;font-weight:600;list-style:none}
.account-menu{position:relative}
.account-popover{position:absolute;right:0;top:42px;background:white;box-shadow:0 8px 28px #172b4d18;border:1px solid var(--line);padding:20px;width:240px;border-radius:10px}
.account-popover small{display:block;margin-bottom:16px}
.console-shell{display:flex;min-height:calc(100vh - 68px)}
.sidebar{width:232px;flex-shrink:0;background:var(--paper);border-right:1px solid var(--line);padding:26px 14px;position:sticky;top:68px;height:calc(100vh - 68px);display:flex;flex-direction:column;gap:4px}
.sidebar-heading{font-size:10px;letter-spacing:.09em;font-weight:650;color:#8591a3;margin:18px 14px 8px;text-transform:uppercase}
.sidebar-heading:first-child{margin-top:0}
.nav-item{min-height:42px;padding:10px 14px;border-radius:7px;color:#576579;display:flex;gap:12px;align-items:center;font-weight:500}
.nav-item:hover{background:#f6f8fc;text-decoration:none}
.nav-item.active{color:#245dcc;background:#eaf1ff}
.nav-icon{display:inline-grid;width:20px;text-align:center;font-size:18px;line-height:1}
.project-context{display:flex;align-items:center;gap:10px;padding:22px 12px 12px}
.project-context strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.project-avatar{display:grid;place-items:center;width:30px;height:30px;flex-shrink:0;border-radius:8px;background:#eff2f7;color:#526580;font-weight:600}
.sidebar-bottom{margin-top:auto;padding:24px 12px 0;font-size:11px;color:var(--muted)}
.sidebar-bottom small{display:block;font-size:10px;color:#98a1b0}
.status-dot{display:inline-block;width:6px;height:6px;background:#22a777;border-radius:50%;margin-right:8px}main{width:100%;min-width:0;max-width:1480px;padding:40px 48px 80px;margin:0 auto}
.eyebrow{font-size:12px;color:#7b879a;margin:0 0 8px}
.page-heading{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:32px}
.page-heading h1{margin:0 0 8px}h1{font-size:28px;letter-spacing:-.035em;font-weight:650;line-height:1.3;margin:0 0 12px;color:var(--ink)}h2{font-size:16px;font-weight:650;letter-spacing:-.015em;margin:0 0 10px}h3{font-size:14px;margin:0 0 8px}p{margin:8px 0 18px}
.muted{color:var(--muted)}section,.panel{margin:24px 0;background:var(--paper);padding:26px;border:1px solid var(--line);border-radius:12px}
.panel-header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:8px}
.panel-header h2{margin:0}
.panel-header a{font-size:12px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:20px}
.grid section{margin:0}
.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:28px 0}
.metric{padding:22px 24px;background:white;border:1px solid var(--line);border-radius:10px}
.metric>span{display:block;font-size:12px;color:var(--muted)}
.metric strong{display:block;font-size:28px;letter-spacing:-.035em;margin:6px 0;font-weight:600}
.metric small{font-size:11px}
.welcome-panel{display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(110deg,#fff,#f0f5ff);border:1px solid #dce6f8;padding:28px;border-radius:12px}
.welcome-panel h2{font-size:19px}
.welcome-panel p{margin:8px 0 0;max-width:620px}
.badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;white-space:nowrap;padding:4px 9px;border-radius:20px;background:#f1f4f8;color:#64748b}
.badge.pending_review{background:#fff5df;color:#a36c0d}
.badge.approved{background:#e9f7ef;color:#268357}
.badge.rejected{background:#fff0ed;color:#b55d40}
.badge.connected{background:#e9f7ef;color:#268357}
.row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:18px 0;border-bottom:1px solid #edf0f5;flex-wrap:wrap}
.row:last-child{border-bottom:0}
.row-title{display:flex;gap:12px;align-items:center}
.row strong{font-weight:550}
.row small{display:block;font-size:11px}
.empty-state{text-align:center;padding:46px 24px}
.empty-icon{display:inline-grid;place-items:center;width:50px;height:50px;background:#f1f5fb;border-radius:14px;color:#8495b0;font-size:25px;margin-bottom:16px}
.empty-state h3{font-size:15px}
.empty-state p{font-size:13px;max-width:400px;margin:8px auto 22px;color:var(--muted)}button,.button{display:inline-flex;align-items:center;justify-content:center;background:var(--blue);color:white;border:1px solid transparent;border-radius:7px;padding:9px 16px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;min-height:44px;white-space:nowrap}
.button:hover{background:#1d4ed8;text-decoration:none}
.secondary{background:white;color:#526178;border:1px solid #dce3ed}
.secondary:hover{background:#f5f8fc}
.stack{display:grid;gap:18px}label{display:block;font-weight:550;font-size:13px}input,textarea{display:block;width:100%;max-width:660px;background:white;color:var(--ink);border:1px solid #d8e0ec;border-radius:7px;padding:11px 12px;font:inherit;margin-top:7px}input:focus,textarea:focus{border-color:#6190ed;outline:3px solid #2563eb12}pre{padding:18px;background:#f6f8fb;color:#334767;border:1px solid #e6ebf2;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere;margin:16px 0}code{font:12px/1.85 ui-monospace,SFMono-Regular,monospace}small{color:var(--muted)}:focus-visible{outline:3px solid #86b4ff;outline-offset:3px}
.notice{padding:14px 18px;border:1px solid #d6e3fb;border-radius:8px;background:#eef5ff}
.error{border-color:#f5c7c7;background:#fff4f4}
.setup-number{display:grid;place-items:center;width:28px;height:28px;background:#eaf1ff;color:#3c6ecc;border-radius:50%;font-size:12px;font-weight:600;margin-bottom:18px}
.setup-step{position:relative}
.setup-step p{font-size:13px;color:var(--muted)}details>summary{cursor:pointer;font-weight:500;padding:10px 0}
.auth-panel{max-width:480px}
.auth-panel .button,.auth-panel button{width:100%}
.project-card{display:block;padding:24px;background:white;border:1px solid var(--line);border-radius:12px;color:var(--ink);transition:border-color .15s,box-shadow .15s}
.project-card:hover{border-color:#b9cdec;box-shadow:0 4px 14px #172b4d07;text-decoration:none}
.project-card .project-avatar{width:42px;height:42px;background:#eaf1ff;color:#2e67ce;margin-bottom:20px}
.project-card h2{font-size:16px}
.project-card small{font-size:11px}
.card-bottom{display:flex;justify-content:space-between;margin-top:28px;align-items:center}iframe{width:100%;height:420px;border:1px solid var(--line);border-radius:8px;background:white}dl{display:grid;grid-template-columns:150px 1fr;gap:8px;font-size:13px}dt{color:var(--muted)}dd{margin:0;overflow-wrap:anywhere}
.create-panel{max-width:640px}
.section-kicker{font-size:11px;color:var(--muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.06em}
@media(min-width:1500px){main{padding-left:64px;padding-right:64px}}
@media(max-width:1050px){main{padding:28px}
.sidebar{width:204px}
.topbar{gap:16px}
.brand{min-width:160px}
.top-context .environment{display:none}
.welcome-panel{align-items:flex-start;flex-direction:column}}
@media(max-width:760px){.topbar{padding:0 18px;height:60px}
.brand{min-width:0}
.brand img{width:82px}
.brand span{font-size:14px}
.top-context{display:none}
.top-actions{gap:14px}
.sidebar{width:100%;position:static;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:8px 12px;flex-direction:row;overflow:auto;gap:3px}
.sidebar-heading,.sidebar-bottom,.project-context{display:none}
.nav-item{white-space:nowrap;padding:9px 12px;font-size:12px}
.nav-icon{display:none}
.console-shell{display:block}
.metrics{gap:8px}
.metric{padding:14px}
.metric strong{font-size:24px}
.metric small{display:none}main{padding:26px 18px 60px}
.page-heading{margin-bottom:24px;gap:12px}h1{font-size:24px}
.page-heading>.button{font-size:11px;padding:8px 12px}
.grid{grid-template-columns:1fr}section,.panel{padding:20px}
.welcome-panel{padding:22px}dl{display:block}dd{margin-bottom:12px}
.top-actions>a:first-child{display:none}}

.sandbox-delete-confirm{display:flex;align-items:center;gap:8px;margin:16px 0}
.sandbox-delete-confirm input{width:auto;margin:0}
.sandbox-history{overflow-x:auto}
.sandbox-history td small{display:block;color:var(--muted,#64748b)}

/* Console chrome: persistent context, quiet navigation, clear working surface. */
[hidden] { display: none !important; }
body { word-break: normal; overflow-wrap: anywhere; }
.topbar { height: 64px; gap: 24px; padding: 0 24px; }
.brand { min-width: 192px; }
.top-context { overflow: hidden; }
.top-context > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { gap: 20px; }
.top-actions > a { display: inline-flex; align-items: center; min-height: 44px; }
.locale-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.locale-switch a { display: grid; place-items: center; min-height: 36px; padding: 0 9px; color: var(--muted); font-size: 12px; border-radius: 5px; }
.locale-switch a[aria-current] { background: var(--hover); color: var(--blue); font-weight: 650; }
.avatar { width: 40px; height: 40px; padding: 0; }
.account-popover { top: 48px; }
.console-shell { min-height: calc(100dvh - 64px); }
.sidebar { top: 64px; height: calc(100dvh - 64px); width: 240px; padding: 24px 12px; }
.sidebar-heading { color: var(--muted); font-size: 11px; }
.nav-item { min-height: 44px; border-radius: 6px; }
.nav-item.active { box-shadow: inset 3px 0 var(--blue); }
main { padding: 44px 48px 72px; }
main:focus { outline: none; }
h1 { font-size: 30px; font-weight: 600; }
h2, h3 { font-weight: 600; }
.page-heading { align-items: center; }
.page-heading p:last-child { margin-bottom: 0; }
button, .button { gap: 10px; transition: background .15s; }
button:hover { background: #1d4ed8; }
button.secondary:hover { background: #f5f8fc; }
button:disabled { opacity: .6; cursor: wait; }
input[aria-invalid="true"] { border-color: #bf3030; }
.field-error { color: #b42318; font-size: 13px; margin: 4px 0 0; }
.field-help { margin-top: -12px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.quiet-link, .back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
/* Authentication is an entry point, independent from the signed-in work area. */
.auth-layout .console-shell { align-items: center; }
.auth-layout main { max-width: 1120px; padding: 64px 40px; }
.auth-frame { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 88px; }
.auth-intro > .auth-heading { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.2; letter-spacing: -.045em; font-weight: 600; white-space: pre-line; margin: 18px 0 24px; text-wrap: balance; }
.auth-intro > p:not(.eyebrow):not(.auth-heading) { color: var(--muted); font-size: 16px; max-width: 420px; }
.auth-intro > a { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; }
.auth-panel { width: 100%; margin: 0; padding: 36px; border-radius: 16px; box-shadow: 0 12px 40px #172b4d08; }
.auth-panel h1 { font-size: 24px; }
.auth-panel > p { margin-bottom: 28px; }
.auth-panel input { min-height: 46px; }
.auth-panel .stack { gap: 16px; }
.auth-panel #password-error:empty { display: none; }
.auth-panel .auth-switch { margin: 24px 0 0; border-top: 1px solid var(--line); padding-top: 22px; font-size: 13px; color: var(--muted); }
.auth-switch a { display: inline-flex; align-items: center; min-height: 44px; }
.journey-list { list-style: none; padding: 0; margin: 32px 0 20px; display: grid; gap: 24px; }
.journey-list li { display: flex; gap: 16px; }
.journey-list li > span { color: var(--blue); font: 12px/28px ui-monospace, monospace; border-top: 1px solid #b9cdec; width: 28px; flex-shrink: 0; }
.journey-list strong { font-weight: 600; }
.journey-list p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
/* Project selection and first-use journey. */
.projects-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.project-card { padding: 26px; border-radius: 10px; }
.project-card h2 { font-size: 18px; overflow-wrap: anywhere; }
.project-card .card-bottom { border-top: 1px solid var(--line); padding-top: 16px; color: var(--blue); font-size: 13px; }
.project-card:focus-visible { border-color: var(--blue); }
.project-welcome { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; padding: 52px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; align-items: center; }
.project-welcome h2 { font-size: 32px; line-height: 1.3; letter-spacing: -.035em; }
.project-welcome .button { margin-top: 12px; }
.project-welcome .journey-list { margin: 0; padding-left: 40px; border-left: 1px solid var(--line); }
.docs-footer { display: inline-flex; align-items: center; min-height: 44px; margin-top: 24px; color: var(--muted); font-size: 13px; }
/* Focused creation: naming, review, then the actual server-side creation. */
.focused-layout main { max-width: 1100px; }
.creation-frame > .back-link { margin-bottom: 36px; }
.creation-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 64px; }
.creation-guide h1 { font-size: 32px; }
.creation-guide > p { max-width: 280px; }
.creation-steps { list-style: none; padding: 0; margin: 36px 0; display: grid; gap: 24px; }
.creation-steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.creation-steps span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 12px; }
.creation-steps [aria-current] { color: var(--blue); font-weight: 600; }
.creation-steps [aria-current] span { background: var(--blue); color: white; border-color: var(--blue); }
.creation-panel { margin: 0; padding: 36px; border-radius: 12px; align-self: start; }
.creation-panel h2 { font-size: 22px; margin-bottom: 16px; }
.creation-panel label { margin-top: 28px; }
.creation-panel input { margin-bottom: 8px; }
.creation-panel [data-step] { min-height: 260px; }
.creation-actions { border-top: 1px solid var(--line); padding-top: 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.creation-actions .quiet-link { margin-right: auto; }
.creation-note { padding: 18px; background: var(--bg); border-radius: 8px; font-size: 13px; }
.creation-note p { margin: 6px 0 0; color: var(--muted); }
.project-preview { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.project-preview .project-avatar { width: 44px; height: 44px; color: var(--blue); background: var(--hover); }
.project-preview strong { display: block; font-size: 18px; }
#creation-status:empty { display: none; }
@media (max-width: 1050px) {
    .top-context .environment { display: none; }
    main { padding: 32px; }
    .auth-frame { gap: 40px; }
    .project-welcome { padding: 32px; gap: 32px; }
    .creation-layout { gap: 32px; }
}
@media (max-width: 760px) {
    .topbar { padding: 0 16px; gap: 12px; flex-wrap: wrap; height: auto; min-height: 64px; padding-block: 8px; }
    .brand { min-width: 0; }
    .top-actions { gap: 8px; }
    .top-actions > a { display: none; }
    .locale-switch a { min-height: 38px; padding: 0 8px; }
    .sidebar { width: 100%; height: auto; padding: 8px 12px; position: static; }
    main { padding: 28px 20px 56px; }
    .page-heading { align-items: flex-start; flex-wrap: wrap; }
    .page-heading > .button { font-size: 13px; }
    .auth-layout main { padding: 28px 20px; max-width: 520px; }
    .auth-frame { grid-template-columns: 1fr; gap: 24px; }
    .auth-intro > .auth-heading { font-size: 30px; margin: 8px 0 12px; }
    .auth-intro .journey-list, .auth-intro > a { display: none; }
    .auth-panel { max-width: none; padding: 26px; }
    .project-welcome { grid-template-columns: 1fr; padding: 28px; gap: 32px; }
    .project-welcome h2 { font-size: 28px; }
    .project-welcome .journey-list { border-left: 0; border-top: 1px solid var(--line); padding: 28px 0 0; }
    .creation-layout { grid-template-columns: 1fr; gap: 24px; }
    .creation-frame > .back-link { margin-bottom: 20px; }
    .creation-steps { display: flex; gap: 24px; margin: 24px 0 0; font-size: 13px; }
    .creation-panel { padding: 26px; }
    .creation-guide > p { max-width: none; }
    .creation-panel [data-step] { min-height: 230px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
/* Account connections and project membership. */
.social-login { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0 16px; }
.social-login .button { white-space: normal; text-align: center; }
.social-login button:disabled { cursor: not-allowed; }
.form-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0; }
.form-divider::before, .form-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.link-panel { max-width: 580px; margin: 32px auto; }
.link-panel > form, .link-panel > .button { margin-top: 20px; }
.account-popover > a { display: block; margin-bottom: 16px; }
select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #d8e0ec; border-radius: 7px; min-height: 44px; padding: 8px 12px; }
.invite-form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.invite-form label:first-child { flex: 1; min-width: min(100%, 240px); }
.invite-form select { display: block; margin-top: 7px; }
.member-actions, .member-actions > form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member-actions details { position: relative; }
.member-actions details > form { position: absolute; right: 0; top: 44px; width: min(300px, 75vw); z-index: 5; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 30px #172b4d18; }
.member-actions details p { margin-top: 0; }
.role-guide { margin-top: 16px; }
.danger { color: #b42318; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media(max-width: 760px) {
    .social-login { grid-template-columns: 1fr; }
    .invite-form { align-items: stretch; flex-direction: column; }
    .member-actions { width: 100%; }
    .member-actions details > form { position: static; width: 100%; }
}
/* Consent is independent of project actions and never covers the form. */
.analytics-consent { max-width: 70rem; margin: 1rem auto; padding: 1rem 1.5rem; border-top: 1px solid #e2e8f0; font-size: .875rem; }
.analytics-consent [hidden] { display: none; }
