:root {
  font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  background: #f2f7ff;
  color: #142542;
  color-scheme: light;
  --blue: #164fbc;
  --strong: #103b92;
  --muted: #52647d;
  --line: #d9e5f4;
  --tint: #e9f2ff;
  --white: #fff;
  --danger: #9f2537;
  --radius: 20px;
  -webkit-tap-highlight-color: #9cc5ff44;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #387df0; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.045em; }
h1 { font-size: 1.19rem; }
h2 { font-size: clamp(1.42rem, 6vw, 1.8rem); }
h3 { font-size: 1rem; }
svg { width: 20px; height: 20px; flex-shrink: 0; display: block; }
[data-icon] { display: inline-grid; place-items: center; vertical-align: middle; }
.top { position: sticky; top: 0; z-index: 2; background: #edf5ff; border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-inner, .bottom-inner, .workspace { width: min(100%, 680px); margin-inline: auto; }
.top-inner { min-height: 65px; display: flex; align-items: center; justify-content: space-between; padding-inline: 20px; }
.brand, .top-actions { display: flex; align-items: center; gap: 9px; }
.brand img { border-radius: 11px; }
.square, .primary, .secondary, .danger, .pill, .text-button {
  min-height: 44px; border: 1px solid transparent; border-radius: 12px; padding: 8px 13px;
  font-weight: 700; display: inline-flex; justify-content: center; align-items: center; gap: 7px; text-align: center;
}
.square { min-width: 44px; padding: 0; background: var(--white); border-color: var(--line); color: var(--strong); }
.square:hover, .secondary:hover, .pill:hover { background: var(--tint); }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--strong); }
.secondary, .pill { background: white; border-color: var(--line); color: var(--strong); }
.danger { color: var(--danger); border-color: #f1c5cb; background: #fff7f8; }
.danger:hover { background: #feecef; }
.text-button { color: var(--strong); background: transparent; }
.muted, .error, .notice { font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.error:empty { display: none; }
.notice { background: var(--tint); border-radius: 12px; padding: 12px 15px; color: var(--strong); }
.workspace { padding: 23px 18px calc(100px + env(safe-area-inset-bottom)); }
.intro { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 18px; }
.add-button { white-space: nowrap; font-size: .91rem; box-shadow: 0 4px 10px #164fbc28; }
.search-box { background: white; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; padding-inline: 13px; gap: 9px; color: #54709d; }
.search-box:focus-within { outline: 2px solid #76a8fb; }
.search-box input { display: block; width: 100%; min-width: 0; border: 0; background: transparent; outline: 0; color: #142542; min-height: 49px; }
.owner-tabs { display: flex; gap: 5px; overflow-x: auto; background: #e6effd; border-radius: 14px; padding: 5px; margin: 15px 0 13px; scrollbar-width: thin; }
.owner-tabs button { flex: 1 0 auto; border: 0; background: transparent; color: var(--muted); border-radius: 10px; min-height: 44px; padding: 0 9px; font-weight: 700; white-space: nowrap; }
.owner-tabs button[aria-pressed="true"] { color: var(--strong); background: white; box-shadow: 0 1px 5px #103b9220; }
.filter-line { display: flex; gap: 8px; align-items: center; }
.filter-line select { width: auto; max-width: 58%; }
.pill[aria-pressed="true"] { background: #dceaff; border-color: #b2cef9; }
.pill svg { width: 17px; height: 17px; }
.list-heading { margin: 23px 2px 10px; display: flex; justify-content: space-between; color: var(--muted); align-items: center; font-size: .84rem; }
.list-heading h3 { color: #142542; font-size: 1rem; }
.account-list { display: grid; gap: 8px; }
.account-row { display: flex; align-items: stretch; background: white; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.account-open { display: flex; min-width: 0; flex: 1; gap: 11px; align-items: center; padding: 12px 0 12px 12px; border: 0; background: white; text-align: left; }
.account-open:hover, .star-button:hover { background: #f7faff; }
.account-open:focus-visible, .star-button:focus-visible { outline-offset: -4px; }
.account-text { min-width: 0; display: grid; gap: 3px; flex: 1; }
.account-text > * { overflow-wrap: anywhere; }
.account-user { color: var(--muted); font-size: .86rem; white-space: pre-wrap; }
.account-meta { color: #38547f; font-size: .77rem; }
.star-button { border: 0; background: white; min-width: 48px; color: #697d9e; }
.star-button[aria-pressed="true"] { color: #9b5b02; }
.star-button[aria-pressed="true"] svg { fill: #ffd672; }
.service-logo { width: 42px; height: 42px; display: inline-grid; place-items: center; flex: 0 0 42px; border-radius: 12px; background: #e8f1ff; color: #184d9b; font-weight: 850; font-size: 1.04rem; }
.logo-naver { background: #e0f6e9; color: #087744; }
.logo-kakao { background: #ffeb89; color: #482d12; }
.logo-google { background: #eff3fc; color: #1856be; }
.logo-youtube { background: #ffe9ea; color: #ac1730; }
.logo-apple { background: #ecf0f6; color: #263750; }
.logo-microsoft { background: #e7f2fb; color: #005780; }
.empty { display: grid; place-items: center; gap: 8px; border: 1px dashed #b1c9ec; border-radius: var(--radius); padding: 31px 13px; text-align: center; }
.empty > [data-icon] { background: #e1edff; color: var(--blue); width: 48px; height: 48px; border-radius: 15px; margin-bottom: 4px; }
.surface { background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.panel { display: grid; gap: 13px; padding: 16px; margin-bottom: 11px; }
.panel > button { justify-self: start; }
.panel-title { display: flex; align-items: center; gap: 10px; }
.panel-icon { width: 37px; height: 37px; background: var(--tint); color: var(--strong); border-radius: 11px; }
.setting-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.setting-row select { width: auto; }
.manage-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; }
.manage-row + .manage-row { border-top: 1px solid var(--line); }
.manage-name { flex: 1 1 110px; overflow-wrap: anywhere; }
.manage-name small { display: block; margin-top: 2px; color: var(--muted); }
.manage-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.manage-actions button { padding: 0 8px; }
.bottom { position: fixed; inset: auto 0 0; z-index: 3; background: white; border-top: 1px solid var(--line); padding: 5px 10px calc(6px + env(safe-area-inset-bottom)); }
.bottom-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.bottom button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 53px; border: 0; background: transparent; border-radius: 12px; color: var(--muted); font-size: .74rem; font-weight: 700; padding: 4px 0; white-space: nowrap; }
.bottom button[aria-current="page"] { background: var(--tint); color: var(--strong); }
.gate { display: grid; justify-items: center; align-content: center; gap: 15px; min-height: calc(100dvh - 66px - env(safe-area-inset-top)); padding: 22px 16px max(28px, env(safe-area-inset-bottom)); }
.gate-card { background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 12px 36px #153f8b10; width: min(100%, 440px); padding: 25px 21px; display: grid; gap: 11px; }
#profile-options > summary { color: var(--strong); cursor: pointer; font-size: .9rem; }
#profile-options > label { margin-top: 8px; }
.gate-logo { border-radius: 20px; margin-bottom: 4px; }
.gate-caption { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .81rem; }
.gate-caption svg { width: 16px; height: 16px; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: .89rem; font-weight: 700; min-width: 0; }
input:not([type="checkbox"]), textarea, select { width: 100%; min-width: 0; color: inherit; }
form input:not([type="checkbox"]), textarea, select { min-height: 44px; border: 1px solid #bacde8; border-radius: 10px; padding: 8px 10px; background: white; font-size: 1rem; }
textarea { resize: vertical; }
input[type="file"] { font-size: .84rem !important; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--blue); }
.checkbox { display: flex; align-items: center; }
.inline-field { display: flex; gap: 6px; margin-top: 6px; }
dialog { width: min(510px, calc(100% - 22px)); max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 21px; padding: 16px; color: inherit; box-shadow: 0 15px 45px #06214a45; overscroll-behavior: contain; }
dialog::backdrop { background: #10254db0; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-bottom: 13px; }
.dialog-head h2 { font-size: 1.33rem; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.dialog-actions > button { min-width: 86px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
#owner-delete-info { margin: 0 0 12px; }
.detail-top { display: flex; gap: 10px; align-items: center; margin-bottom: 13px; }
.detail-field { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 5px; }
.detail-field strong { font-size: .83rem; color: var(--muted); }
.detail-value { min-width: 0; flex: 1 1 100px; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.detail-controls button { font-size: .84rem; }
.detail-controls a { color: var(--strong); }
.toast { position: fixed; inset: auto 0 calc(77px + env(safe-area-inset-bottom)); margin: auto; width: max-content; max-width: calc(100% - 26px); padding: 10px 15px; border: 0; border-radius: 13px; background: #15366e; color: white; box-shadow: 0 5px 15px #0c285a3c; pointer-events: none; font-size: .9rem; z-index: 10; }
body.concealed .workspace, body.concealed dialog, body.concealed #toast { visibility: hidden; }
@media (max-width: 370px) {
  .workspace { padding-inline: 12px; }
  .owner-tabs button { padding-inline: 8px; }
}
