/* FrankVault — 블랙 & 골드 */
:root {
  --bg: #0E0D0C;
  --side: #121110;
  --card: #181614;
  --card-2: #1F1C19;
  --line: #2C2823;
  --line-2: #3D372F;
  --text: #ECE6DC;
  --muted: #A89F92;
  --dim: #8A8175;
  --gold: #C9A46A;
  --gold-2: #E3C28E;
  --gold-3: #F3DDB0;
  --up: #E8705F;      /* 증가 (빨강) */
  --down: #6EA8FE;    /* 감소 (파랑) */
  --good: #7DBE9A;    /* 소비 감소 등 좋은 변화 */
  --radius: 14px;
  --serif: 'Pretendard Variable', Pretendard, -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: 'Pretendard Variable', Pretendard, -apple-system, system-ui, 'Apple SD Gothic Neo', sans-serif; letter-spacing: -0.01em; font-size: 14px; line-height: 1.5; }
a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
h1, h2, h3 { margin: 0; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.up { color: var(--up); }
.down { color: var(--down); }
.good { color: var(--good); }
.gold { color: var(--gold-2); }
.num { font-variant-numeric: tabular-nums; }

/* 버튼 */
.btn { height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--gold); color: var(--gold-3); }
.btn-primary { background: linear-gradient(180deg, #E3C28E, #B8904F); border-color: #B8904F; color: #1A1612; font-weight: 700; }
.btn-primary:hover { filter: brightness(1.06); color: #1A1612; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 6px; }
.btn-ghost { width: 100%; margin-top: auto; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; }

/* 입력 */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); }
.input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea.input { height: auto; padding: 10px 12px; min-height: 90px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }

/* ───── 앱 틀: 왼쪽 메뉴 ───── */
.app { display: flex; min-height: 100vh; }
.side { width: 236px; align-self: flex-start; flex: 0 0 236px; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 26px 16px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 0 26px; }
.brand img { width: 52px; height: auto; }
.brand-t { font-family: var(--serif); font-size: 19px; letter-spacing: 1.5px; color: var(--text); margin-top: 6px; }
.brand-s { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--gold-2); }
.snav { display: flex; flex-direction: column; gap: 2px; }
.nl { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.nl:hover { color: var(--text); background: var(--card-2); }
.nl.on { color: #fff; font-weight: 700; background: linear-gradient(90deg, #4A3B28, #2A231B); box-shadow: inset 0 0 0 1px #5A4830; }
.nl.on svg { color: var(--gold-2); }
.ndiv { height: 1px; background: var(--line); margin: 12px 4px; }
.sfoot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.sfn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfn b { color: var(--text); font-weight: 500; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #E3C28E, #9C7A45); color: #1A1612; font-weight: 700; font-size: 13px; }
.side-dim { display: none; }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hdr { height: 64px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 28px; }
.hdr h1 { font-size: 20px; font-weight: 600; }
.hdr .muted { margin-left: auto; font-size: 13px; }
.nav-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.page { padding: 24px 28px 56px; display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 1640px; }

/* ───── 홈 배너 ───── */
.hero { position: relative; height: 170px; margin: -24px -28px 0; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,13,12,.92) 0%, rgba(14,13,12,.45) 32%, rgba(14,13,12,0) 60%), linear-gradient(180deg, rgba(14,13,12,0) 55%, #0E0D0C 100%), url('/img/hero.webp') center 60% / cover no-repeat, #1A1612; }
.hero-top { position: absolute; top: 14px; left: 20px; right: 24px; display: flex; align-items: center; gap: 18px; }
.hero-date { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.hero-ic { position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); border-radius: 50%; }
.hero-ic:hover { color: var(--gold-3); }
.hero-me { border: 1px solid rgba(236,230,220,.35); }
.hero-ic .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #E8A35F; }
.hero-txt { position: absolute; left: 36px; bottom: 34px; }
.hero-txt h1 { font-size: 34px; font-weight: 500; letter-spacing: .5px; color: #F5EFE4; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.hero-txt p { margin: 6px 0 0; font-family: var(--serif); font-size: 15px; color: #E5DCCD; }

/* ───── 카드 ───── */
.card { background: linear-gradient(180deg, #1B1916, #151311); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: 0 1px 0 rgba(255,255,255,.03) inset; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-head a, .card-head .link { font-size: 12px; color: var(--muted); cursor: pointer; background: none; border: 0; padding: 0; }
.card-head a:hover { color: var(--gold-2); }
.tip { color: var(--muted); display: inline-flex; }
.big { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.3px; }
.g { display: grid; gap: 16px; }
.g-top { grid-template-columns: minmax(0, 2.6fr) minmax(300px, 1fr); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g3 > .card:first-child { grid-column: span 1; }

/* 총자산 */
.total { flex-direction: row; align-items: stretch; gap: 28px; }
.total .tl { flex: 1 1 46%; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.total .tr { flex: 1 1 54%; min-width: 0; display: flex; align-items: flex-end; }
.tv { font-size: 44px; font-weight: 600; letter-spacing: -.5px; color: #F7F1E6; line-height: 1.15; }
.tsub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.pillg { display: inline-flex; gap: 6px; align-items: center; padding: 5px 14px; border-radius: 999px; border: 1px solid #6B5634; background: #2A2219; color: var(--gold-3); font-family: var(--serif); }
.pillg.neg { border-color: #33476B; background: #18202C; color: #B8D2FF; }

/* 목표 */
.g-b { display: flex; align-items: center; gap: 22px; flex: 1; }
.g-d { position: relative; width: 130px; height: 130px; flex: 0 0 130px; }
.g-d span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--gold-3); }
.g-t { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); padding-left: 18px; font-size: 12px; }
.g-t b { font-size: 18px; margin-bottom: 8px; }

/* 핵심 숫자 */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.kpi { background: linear-gradient(180deg, #1B1916, #151311); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.k-i { color: var(--gold); flex: 0 0 auto; margin-top: 2px; }
.k-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-l { font-size: 12px; color: var(--muted); }
.k-v { font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-s { font-size: 12px; }

/* 자산 구성 */
.comp { display: flex; align-items: center; gap: 22px; }
.c-d { position: relative; width: 140px; height: 140px; flex: 0 0 140px; }
.c-d span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.c-d small { font-size: 11px; color: var(--muted); }
.c-d b { font-size: 18px; }
.c-l { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lrow { display: grid; grid-template-columns: 10px minmax(64px, 1fr) 36px auto; gap: 10px; align-items: center; font-size: 13px; }
.lrow span:nth-child(2) { white-space: nowrap; }
.lrow i { width: 8px; height: 8px; border-radius: 50%; }

/* 지출 TOP 막대 */
.brow { display: grid; grid-template-columns: 22px 92px minmax(0, 1fr) 96px; gap: 12px; align-items: center; height: 30px; font-size: 13px; }
.brow b { text-align: right; }
.b-i { color: var(--muted); display: inline-flex; }
.b-bar { height: 8px; background: #26221E; border-radius: 4px; overflow: hidden; }
.b-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #9C7A45, #E3C28E); }

/* 소비 분석: 결제수단 줄 */
.mrow { display: grid; grid-template-columns: 22px minmax(110px, 1.2fr) minmax(0, 1fr) 100px 40px 54px; gap: 12px; align-items: center; min-height: 40px; width: 100%; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13px; text-align: left; cursor: pointer; }
.mrow:hover { background: var(--card-2); }
.mrow.on { background: #2A231B; box-shadow: inset 0 0 0 1px #5A4830; }
.mrow b { text-align: right; }
.m-n { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.m-n small { color: var(--muted); font-size: 11px; }
.m-p { color: var(--muted); text-align: right; font-size: 12px; }
.m-c { text-align: right; font-size: 12px; }
@media (max-width: 640px) { .mrow { grid-template-columns: 20px minmax(0, 1fr) 90px 44px; } .mrow .b-bar, .mrow .m-p { display: none; } }

/* 종목 · 계좌 */
.hrow { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; height: 30px; font-size: 13px; }
.h-n { width: 22px; height: 22px; border-radius: 50%; background: #26221E; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.h-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 34px; font-size: 13px; }
.arow span { display: flex; align-items: center; gap: 10px; color: var(--text); }
.arow svg { color: var(--gold); }

/* 일정 · 알림 */
.ev { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 34px; font-size: 13px; }
.ev > span:first-child { display: flex; align-items: center; gap: 6px; color: var(--text); }
.ev svg { color: var(--muted); }
.tag { display: inline-block; font-size: 11px; padding: 1px 10px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; color: var(--muted); }
.tag.red { border-color: #7A3A31; color: #F0A398; }
.tag.green { border-color: #3D6650; color: #A6DDBE; }
.tag.blue { border-color: #34507A; color: #A9C8FF; }

/* 예전 화면들이 쓰는 칸 */
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > .grow-3 { flex: 3 1 520px; min-width: 0; }
.row > .grow-2 { flex: 2 1 340px; min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 16px; }
.tile { background: linear-gradient(180deg, #1B1916, #151311); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; min-width: 0; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-family: var(--serif); font-size: 24px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .sub { font-size: 12px; color: var(--muted); }
.tile .col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile.ghost { background: var(--card-2); border-style: dashed; }

/* 표 */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 13px; }
table.t th { font-size: 12px; color: var(--muted); font-weight: 500; text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.t td { padding: 11px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t .r { text-align: right; }
table.t tr.excluded td { color: var(--dim); background: var(--card-2); }
.pill { display: inline-block; font-size: 12px; padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; }
.pill.solid { background: var(--gold); color: #1A1612; border-color: var(--gold); font-weight: 700; }
.pill.dash { border-style: dashed; border-color: var(--muted); }
.rank { display: grid; grid-template-columns: 30px 80px minmax(0, 1fr) 120px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rank:last-child { border-bottom: 0; }
.bar { height: 8px; background: var(--card-2); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button.on { background: #3A3024; color: var(--gold-3); font-weight: 700; }
.dropzone { border: 1px dashed var(--line-2); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); }
.empty { padding: 24px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ───── 로그인 ───── */
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.lg { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; position: relative; overflow: hidden;
  background: url('/img/login-bg.webp') center bottom / cover no-repeat, #0B0A09; }
@media (max-width: 899px) { .lg { background: linear-gradient(180deg, rgba(11,10,9,.25), rgba(11,10,9,.55)), url('/img/login-bg.webp') 18% bottom / cover no-repeat, #0B0A09; } }
.lg-in { position: relative; z-index: 1; width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 34px; }
.lg-logo { width: min(440px, 86vw); height: auto; filter: drop-shadow(0 6px 24px rgba(0,0,0,.6)); }
.lg-card { width: 100%; padding: 34px 40px; border-radius: 18px; border: 1px solid rgba(214,190,150,.38); background: rgba(22,20,18,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lg-btn { height: 54px; width: 100%; border: 1px solid #7D6448; border-radius: 10px; background: linear-gradient(180deg, #F1DDC9 0%, #E6D0B3 18%, #C4A688 52%, #A68B6C 78%, #8E7355 100%); box-shadow: inset 0 1px 0 rgba(255,248,236,.65), inset 0 -1px 0 rgba(70,53,35,.35), 0 6px 18px rgba(0,0,0,.35); color: #241A10; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; text-shadow: 0 1px 0 rgba(255,244,228,.35); }
.lg-btn:hover { filter: brightness(1.06); }
.lg-alt { height: 46px; width: 100%; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(31,28,25,.8); color: var(--text); cursor: pointer; }
.lg-note { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.7; }
.lg-note b { color: #E6D0B3; font-weight: 500; }
.lg-safe { border: 1px solid rgba(214,190,150,.22); border-radius: 12px; background: rgba(10,9,8,.45); padding: 10px 16px; }
.lg-safe-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #E6D0B3; cursor: pointer; list-style: none; min-height: 24px; }
.lg-safe-h::-webkit-details-marker { display: none; }
.lg-chev { margin-left: auto; display: inline-flex; color: var(--muted); transition: transform .15s; }
.lg-safe[open] .lg-chev { transform: rotate(180deg); }
.lg-safe[open] ul { margin-top: 8px; }
.lg-safe ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #CFC6B8; line-height: 1.6; }
.lg-safe b { color: var(--text); font-weight: 500; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #F3DDB0; color: #1A1612; padding: 10px 18px; border-radius: 999px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 30; }
#toast.show { opacity: 1; }

/* ───── 화면 크기별 ───── */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .side { position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .app.nav-open .side { transform: none; }
  .app.nav-open .side-dim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.55); border: 0; }
  .nav-btn { display: inline-flex; }
  .hdr { padding: 0 12px; }
  .g-top, .g3 { grid-template-columns: minmax(0, 1fr); }
  .total { flex-direction: column; }
}
@media (max-width: 640px) {
  .page { padding: 16px 14px 44px; gap: 12px; }
  .hero { margin: -16px -14px 0; height: 160px; }
  .hero-top { left: 6px; right: 14px; top: 10px; }
  .hero-txt { left: 20px; bottom: 26px; }
  .hero-txt h1 { font-size: 28px; }
  .hero-txt p { font-size: 13px; }
  .tv { font-size: 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; gap: 10px; }
  .kpi:last-child:nth-child(odd) { grid-column: span 2; }
  .k-v { font-size: 17px; }
  .card { padding: 16px; }
  .comp, .g-b { flex-direction: column; align-items: stretch; }
  .c-d, .g-d { margin: 0 auto; }
  .g-t { border-left: 0; padding-left: 0; text-align: center; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .value { font-size: 19px; }
  .brow { grid-template-columns: 20px 76px minmax(0, 1fr) 84px; gap: 8px; }
  .ev { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .rank { grid-template-columns: 26px 64px minmax(0, 1fr) 96px; }
  .lg-card { padding: 26px 22px; }
  .hide-mobile { display: none !important; }
}

/* 분류별 세부 항목 */
.sub-cat{padding:10px 0;border-top:1px solid rgba(255,255,255,.06)}
.sub-cat:first-of-type{border-top:0}
.sub-h{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px;font-size:14px}
.sub-h>span:first-child{display:inline-flex;align-items:center;gap:6px}
.sub-r{display:grid;grid-template-columns:92px 1fr 84px 84px;align-items:center;gap:8px;font-size:13px;padding:3px 0}
.sub-r .b-bar{height:6px;border-radius:3px;background:rgba(255,255,255,.06);overflow:hidden;display:block}
.sub-r .b-bar>span{display:block;height:100%;border-radius:3px}
.sub-v{text-align:right}
@media (max-width:560px){.sub-r{grid-template-columns:78px 1fr 70px 70px;font-size:12px}}

/* 메뉴 묶음 제목 */
.nh { margin: 14px 14px 4px; font-size: 11px; letter-spacing: .12em; color: var(--dim, #7d756a); font-weight: 700; }
/* 탭(링크형) */
.seg a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.seg a.on { background: #3A3024; color: var(--gold-3); font-weight: 700; }

/* 소비 캘린더 */
.sc-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 14px 0 8px; }
.sc-bar span { display: block; height: 100%; }
.sc-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.sc-leg span { display: inline-flex; align-items: center; gap: 6px; }
.sc-leg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.sc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.sc-wk { color: var(--dim); font-size: 12px; text-align: center; padding: 6px 0; border-top: 1px solid var(--line); }
.sc-c { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 6px 0; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.sc-c b { font-size: 15px; font-weight: 600; }
.sc-c i { font-style: normal; font-size: 11px; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-c:hover:not(:disabled) { background: rgba(255,255,255,.04); }
.sc-c.on { background: #3A3024; }
.sc-c.on b { color: var(--gold-3); }
.sc-c.today b { text-decoration: underline; text-underline-offset: 4px; }
.sc-c.fut b { color: var(--dim); opacity: .5; }
.sc-c:disabled { cursor: default; }
.sc-e { min-height: 64px; }
.sc-in { color: var(--down); }
.sc-out { color: var(--muted); }
.sc-out.big { color: var(--up); font-weight: 600; }
.sc-r { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.sc-r:first-of-type { border-top: 0; }
.sc-r.ex { opacity: .5; }
.sc-ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.05); display: grid; place-items: center; }
.sc-t { display: flex; flex-direction: column; min-width: 0; }
.sc-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .sc-c { min-height: 56px; } .sc-c b { font-size: 14px; } .sc-c i { font-size: 10px; } }

/* 일정 달력 (캘린더·패밀리 라운지) */
.ev-c { justify-content: flex-start; align-items: stretch; min-height: 78px; padding: 6px 3px; text-align: left; }
.ev-c > b { text-align: center; }
.ev-c.sun > b { color: #E5736B; }
.ev-c.sat > b { color: #6EA8FE; }
.ev-chip { display: block; font-style: normal; font-size: 11px; line-height: 1.35; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--c) 22%, transparent); border-left: 2px solid var(--c); color: var(--text, #EDE6DA); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-more { font-style: normal; font-size: 10px; color: var(--muted); text-align: center; }
@media (max-width: 560px) { .ev-c { min-height: 66px; padding: 4px 1px; } .ev-chip { font-size: 10px; padding: 0 2px; } }

/* 공휴일·명절 */
.sc-c.sun > b { color: #E5736B; }
.sc-c.sat > b { color: #6EA8FE; }
.sc-c.fut.sun > b, .sc-c.fut.sat > b { opacity: .55; }
.ev-hol, .ev-memo { display: block; font-style: normal; font-size: 10.5px; line-height: 1.3; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-hol { color: #E5736B; font-weight: 600; }
.ev-memo { color: var(--muted); }
@media (max-width: 560px) { .ev-hol, .ev-memo { font-size: 9.5px; } }

/* 가족 채팅방 */
.chat-card { display: flex; flex-direction: column; }
.chat-list { height: min(60vh, 560px); overflow-y: auto; padding: 8px 4px; display: flex; flex-direction: column; gap: 6px; background: rgba(0,0,0,.18); border-radius: 12px; overscroll-behavior: contain; }
.chat-day { text-align: center; margin: 10px 0 4px; }
.chat-day span { font-size: 11px; color: var(--muted); background: rgba(255,255,255,.06); padding: 3px 10px; border-radius: 999px; }
.chat-sys { text-align: center; font-size: 12px; color: var(--muted); margin: 4px 0; }
.chat-row { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.chat-row.mine { align-items: flex-end; }
.chat-name { font-size: 12px; color: var(--muted); margin: 0 0 2px 6px; }
.chat-line { display: flex; align-items: flex-end; gap: 6px; max-width: 82%; }
.chat-row.mine .chat-line { flex-direction: row-reverse; }
.chat-bubble { padding: 8px 12px; border-radius: 14px; border-top-left-radius: 4px; background: #2B2824; font-size: 14px; line-height: 1.45; word-break: break-word; white-space: normal; }
.chat-row.mine .chat-bubble { background: #C9A86A; color: #1A1611; border-radius: 14px; border-top-right-radius: 4px; }
.chat-bubble.media { padding: 4px; background: transparent; }
.chat-row.mine .chat-bubble.media { background: transparent; }
.chat-img { display: block; max-width: min(240px, 60vw); max-height: 320px; border-radius: 10px; object-fit: cover; }
.chat-file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #2B2824; color: inherit; text-decoration: none; }
.chat-file span { display: flex; flex-direction: column; }
.chat-file small { color: var(--muted); font-size: 11px; }
.chat-deleted { color: var(--muted); font-size: 13px; }
.chat-row.mine .chat-deleted { color: #4a3d28; }
.chat-meta { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.chat-del { border: 0; background: none; color: var(--muted); font-size: 10.5px; padding: 0; cursor: pointer; text-decoration: underline; }
/* 입력창: 한 줄 바 안에 [사진][파일] 입력 [보내기] */
.chat-form { display: flex; align-items: flex-end; gap: 4px; margin-top: 12px; padding: 5px; border: 1px solid var(--line); border-radius: 26px; background: rgba(255,255,255,.04); }
.chat-form:focus-within { border-color: rgba(201,168,106,.6); }
.chat-tools { display: flex; gap: 2px; flex: none; }
.chat-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; color: var(--gold-3, #C9A86A); flex: none; transition: background .15s; }
.chat-btn:hover { background: rgba(255,255,255,.08); }
.chat-input { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; line-height: 1.45; min-height: 44px; max-height: 140px; padding: 11px 6px; }
.chat-input::placeholder { color: var(--muted); }
.chat-send { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; flex: none; cursor: pointer; background: #C9A86A; color: #1A1611; transition: opacity .15s, transform .1s; }
.chat-send:active { transform: scale(.94); }
.chat-send:disabled { opacity: .5; cursor: default; }
.chat-hint { font-size: 11px; margin: 4px 0 0 18px; }
@media (hover: none) { .chat-hint { display: none; } }
.nl { position: relative; }
.nav-dot { position: absolute; top: 8px; left: 26px; width: 8px; height: 8px; border-radius: 50%; background: #E5736B; }

/* 입력한 자산 (카드형 줄) */
.asset-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.asset-row:first-of-type { border-top: 0; }
.asset-row.editing { background: rgba(201,168,106,.08); border-radius: 10px; padding: 10px 8px; }
.asset-main { min-width: 0; }
.asset-amt { white-space: nowrap; }
.asset-btns { display: flex; gap: 6px; }
#asset-form { scroll-margin-top: 80px; }
@media (max-width: 560px) {
  .asset-row { grid-template-columns: 1fr auto; }
  .asset-btns { grid-column: 1 / -1; justify-content: flex-end; }
}
.chat-list.full { height: calc(100vh - 260px); min-height: 360px; }
@media (max-width: 560px) { .chat-list.full { height: calc(100dvh - 230px); } }

/* 패밀리 게시판 */
.tag.gold { border-color: #6B5634; color: #D9BC84; }
.b-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.b-item:first-child { border-top: 0; }
.b-item:hover b { color: var(--gold-3, #D9BC84); }
.b-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.b-itxt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.b-itxt b { overflow-wrap: anywhere; }
.board-form { display: flex; flex-direction: column; gap: 12px; }
.seg-r { position: relative; }
.seg-r input { position: absolute; opacity: 0; pointer-events: none; }
.seg-r span { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.seg-r input:checked + span { background: #3A3024; color: var(--gold-3, #D9BC84); font-weight: 700; }
.seg-r input:focus-visible + span { outline: 2px solid var(--gold-3, #D9BC84); }
.b-event { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 12px; border-radius: 12px; background: rgba(229,115,107,.06); border: 1px solid rgba(229,115,107,.2); }
.b-event[hidden] { display: none; }
.b-pend { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.b-pend span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-pend.gone span { text-decoration: line-through; opacity: .5; }
.b-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.b-head .tag { align-self: flex-start; }
.b-title { font-size: 20px; margin: 0; overflow-wrap: anywhere; }
.b-info { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: rgba(229,115,107,.06); border: 1px solid rgba(229,115,107,.2); margin-bottom: 12px; font-size: 14px; }
.b-info > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.b-body { line-height: 1.7; font-size: 15px; overflow-wrap: anywhere; margin-bottom: 12px; }
.b-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.b-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.b-docs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.b-actions { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.b-cmt { padding: 10px 0; border-top: 1px solid var(--line); }
.b-cmt:first-of-type { border-top: 0; }
.b-chead { display: flex; gap: 8px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.b-chead .link { font-size: 12px; }
.b-cbody { margin-top: 4px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.b-cform { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.b-cform textarea { flex: 1; resize: vertical; min-height: 44px; }
.b-cbtns { display: flex; flex-direction: column; gap: 6px; }

/* 패밀리 메인보드 */
.fh-hello { display: flex; flex-direction: column; gap: 4px; }
.fh-ev { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fh-ev:first-of-type { border-top: 0; }
.fh-d { min-width: 58px; font-variant-numeric: tabular-nums; color: var(--gold-3, #D9BC84); }
.fh-chat { display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: baseline; padding: 6px 0; font-size: 14px; border-top: 1px solid var(--line); }
.fh-chat:first-of-type { border-top: 0; }
.fh-chat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fh-photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.fh-photos a { flex: none; scroll-snap-align: start; }
.fh-photos img { width: 104px; height: 104px; object-fit: cover; border-radius: 10px; display: block; }
.sfn-btn { border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 0; }
.sfn-btn:hover b { color: var(--gold-3, #D9BC84); }
/* 프로필 사진 */
.av-img { object-fit: cover; padding: 0; background: #2B2824; }
.av-pick { cursor: pointer; display: inline-flex; border-radius: 50%; }
.av-pick:hover .avatar { outline: 2px solid var(--gold-3, #D9BC84); outline-offset: 1px; }
.chat-name { display: flex; align-items: center; gap: 6px; }
.b-by { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.b-chead .avatar { margin-right: 2px; }

/* 요청 · 아이디어 */
.req-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.req-item:first-child { border-top: 0; }
.req-vote { flex: none; width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; font-size: 15px; }
.req-vote b { font-size: 13px; font-variant-numeric: tabular-nums; }
.req-vote.on { border-color: #6B5634; background: #3A3024; color: var(--gold-3, #D9BC84); }
.req-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 3px; }
.req-main b { overflow-wrap: anywhere; }
.req-main:hover b { color: var(--gold-3, #D9BC84); }
.req-reply { padding: 12px; border-radius: 12px; background: rgba(166,221,190,.06); border: 1px solid rgba(166,221,190,.22); margin-bottom: 12px; font-size: 14px; line-height: 1.6; display: flex; flex-direction: column; gap: 4px; }

/* 패밀리 연락처 */
.ct-emg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ct-emg-btn { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; border: 1px solid rgba(229,115,107,.3); background: rgba(229,115,107,.07); color: inherit; text-decoration: none; }
.ct-emg-btn a { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.ct-emg-btn b { font-size: 17px; color: #F0A398; }
.ct-emg-btn span { font-size: 12px; color: var(--muted); }
.ct-emg-act { display: flex; gap: 8px; margin-top: 4px; }
.ct-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.ct-row:first-child { border-top: 0; }
.ct-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ct-phone { align-self: flex-start; border: 0; background: none; color: inherit; font: inherit; font-variant-numeric: tabular-nums; padding: 0; cursor: pointer; letter-spacing: .02em; }
.ct-foot { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.ct-foot .link, .ct-emg-act .link { font-size: 12px; }
.ct-call { flex: none; align-self: center; }

/* 연락처 트리 (조직도처럼 접고 펼치기) */
.tr-roothead { font-size: 16px; padding: 4px 0 6px; }
.tr-arrow { display: inline-block; width: 14px; font-size: 11px; color: var(--muted); }
.tr-children { margin-left: 7px; padding-left: 18px; border-left: 1px solid var(--line-2); }
.tr-group { position: relative; }
.tr-group::before, .tr-leaf::before { content: ''; position: absolute; left: -18px; top: 18px; width: 14px; border-top: 1px solid var(--line-2); }
.tr-head { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 8px 0; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; }
.tr-head:hover b { color: var(--gold-3, #D9BC84); }
.tr-leaf { position: relative; padding: 6px 0; }
.tr-line { display: grid; grid-template-columns: minmax(64px, auto) 1fr auto; gap: 12px; align-items: baseline; }
.tr-name { white-space: nowrap; }
.tr-sub { color: var(--muted); font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.tr-tel { color: #8DB9FF; text-decoration: none; white-space: nowrap; font-size: 14px; }
.tr-tel:hover { text-decoration: underline; }
.tr-acts { display: flex; gap: 10px; align-items: center; font-size: 11px; margin-top: 2px; }
.tr-acts .link { font-size: 11px; }
@media (max-width: 560px) {
  .tr-line { grid-template-columns: 1fr auto; }
  .tr-sub { grid-column: 1 / -1; grid-row: 2; }
}
/* 비상 연락망 */
.ct-net { border-color: rgba(229,115,107,.35); }
.ct-net-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ct-net-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ct-net-row.done { opacity: .5; }
.ct-net-row.done b { text-decoration: line-through; }
.ct-called { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); }
.ct-emg-opt { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(229,115,107,.06); border: 1px solid rgba(229,115,107,.2); }
.tr-gacts { display: inline-flex; gap: 8px; margin-left: 8px; }
.tr-gacts .link { font-size: 11px; }
.ct-gpick { flex-wrap: wrap; }
.ps { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.ps .field { width: 100%; }
.ps-av { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.ps-av img, .ps-av span { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--line); font-size: 38px; font-weight: 600; }
.ps-av em { font-style: normal; font-size: 12px; color: var(--muted, #888); text-decoration: underline; }
/* 채팅: 지난 대화(날짜별) */
.chat-arch { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-arch-m b { font-size: 12px; color: var(--muted); }
.chat-arch-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-arch-d { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: inherit; border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; }
.chat-arch-d.on { border-color: #C9A86A; background: rgba(201,168,106,.18); }
.chat-arch-d .muted { font-size: 11px; margin-left: 2px; }
.chat-past { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 8px; }
.chat-past .btn-sm { margin-left: 8px; }
.chat-list.past { background: rgba(201,168,106,.06); }
/* 연락처: 회원 쪽 → 가족/지인 */
.tr-head .avatar { margin-right: 2px; }
.tr-add { font-size: 12px; margin-left: 8px; }
.ct-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ct-pick select { min-width: 160px; height: 40px; }
.tr-me { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; vertical-align: middle; }
.tr-me .tr-tel { font-size: 13px; }
.tr-me .link { font-size: 12px; }
/* 패밀리 대시보드 커버 사진 */
.fh-hello { position: relative; }
.fh-hello.has-cover { min-height: clamp(240px, 33vw, 520px); justify-content: flex-start; background-size: cover; background-position: center 55%; background-color: #0E0C0A; border-color: transparent; overflow: hidden; padding: 24px; }
.fh-hello.has-cover h2 { color: #fff; font-size: clamp(20px, 2.4vw, 28px); text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.fh-hello.has-cover .muted, .fh-hello.has-cover .link { color: rgba(255,255,255,.85); }
.fh-hello-txt { display: flex; flex-direction: column; gap: 4px; }
.fh-cover-btn { position: absolute; bottom: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; background: rgba(20,17,14,.55); color: #F1E6D4; border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.fh-hello:not(.has-cover) .fh-cover-btn { position: static; align-self: flex-start; margin-bottom: 8px; }
@media (max-width: 560px) { .fh-hello.has-cover { padding: 16px; } }

/* 폰트: Pretendard — 제목은 굵고 촘촘하게, 숫자는 자리 맞춤 */
.serif, h1, h2, h3 { letter-spacing: -0.025em; }
h1.serif { font-weight: 700; }
.big, .tile .value, .num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.brand-t { font-weight: 600; letter-spacing: 3px; }
.brand-s { font-style: normal; letter-spacing: 0.5px; font-size: 12px; }
.hero-txt p { font-weight: 500; }
/* 패밀리 대시보드: 가족 사진 슬라이드 — 사진이 카드 전체 배경(전처럼), 인사말은 위에 */
.fh-hello.has-cover { overflow: hidden; touch-action: pan-y; user-select: none; }
.fh-hello.has-cover .fh-img { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; transition: opacity .35s ease; }
.fh-hello.has-cover .fh-img.fading { opacity: .25; }
.fh-hello.has-cover .fh-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(14,12,10,.68) 0%, rgba(14,12,10,0) 42%, rgba(14,12,10,0) 82%, rgba(14,12,10,.75) 100%); }
.fh-hello.has-cover .fh-hello-txt { position: relative; z-index: 2; }
.fh-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(20,17,14,.45); color: #F1E6D4; font-size: 24px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); opacity: .8; }
.fh-nav:hover { opacity: 1; }
.fh-nav.prev { left: 12px; } .fh-nav.next { right: 12px; }
.fh-dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3; display: flex; justify-content: center; gap: 6px; }
.fh-dot { width: 7px; height: 7px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; }
.fh-dot.on { width: 18px; border-radius: 4px; background: #C9A86A; }
@media (hover: none) { .fh-nav { display: none; } }

/* 관리: 패밀리 초대하기 */
.inv-row { display: flex; gap: 18px; align-items: center; }
.inv-img { width: 160px; height: 160px; border-radius: 10px; border: 1px solid var(--line-2); flex: none; object-fit: cover; }
.inv-txt { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.inv-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-acts a.btn { display: inline-flex; align-items: center; }
@media (max-width: 640px) { .inv-row { flex-direction: column; align-items: stretch; } .inv-img { width: 100%; height: auto; } }

/* 앱 설치하기 안내 (대시보드 맨 위) */
.inst { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; padding: 14px 44px 14px 16px; margin-bottom: 16px; border-color: var(--gold); background: linear-gradient(90deg, rgba(201,164,106,.14), rgba(201,164,106,.03)); }
.inst-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: rgba(201,164,106,.16); color: var(--gold-2); }
.inst-t { min-width: 0; font-size: 13px; line-height: 1.45; word-break: keep-all; } .inst-t b { display: block; font-size: 15px; color: var(--gold-3); margin-bottom: 2px; }
.inst .btn { white-space: nowrap; }
.inst-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: 14px; }
.inst-x:hover { color: var(--text); }
.inst-dlg { max-width: 360px; width: calc(100% - 32px); border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); color: var(--text); padding: 22px; }
.inst-dlg::backdrop { background: rgba(0,0,0,.6); }
.inst-dlg h3 { color: var(--gold-3); margin-bottom: 12px; }
.inst-dlg ol { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; word-break: keep-all; }
.inst-dlg .btn { margin-top: 14px; width: 100%; }
.inst-share { display: inline-block; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 5px; font-size: 12px; }
@media (max-width: 640px) { .inst { grid-template-columns: 42px minmax(0, 1fr); padding: 14px 16px; } .inst-t { padding-right: 26px; } .inst .btn { grid-column: 1 / -1; width: 100%; height: 44px; font-size: 15px; } }
