/* ===== 기본 ===== */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Noto Sans KR', system-ui, sans-serif;
  color: #2B2118;
  background: #FFF6E9;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #2A66D9; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading { min-height: 100vh; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #6B5A48; padding: 24px; text-align: center; }
.plain { list-style: none; margin: 0; padding: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack6 { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 8px; align-items: flex-end; }
.row.gap6 { gap: 6px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hint { margin: 0; font-size: 13px; color: #6B5A48; line-height: 1.5; }
.empty { margin: 0; font-size: 14px; color: #6B5A48; }
.empty.light { color: #FFFFFF; }
.error { margin: 0; color: #B3261E; font-weight: 700; font-size: 14px; }

/* ===== 버튼·입력 ===== */
.btn { border: none; border-radius: 14px; min-height: 46px; padding: 0 16px; font-weight: 700; font-size: 15px; color: #FFFFFF; background: #2B2118; flex: none; }
.btn.big { min-height: 54px; font-size: 17px; width: 100%; }
.btn.primary { background: #FF8A3D; box-shadow: 0 4px 0 #D96A20; }
.btn.dark { background: #2B2118; }
.btn.ghost { background: #FFFFFF; color: #3A3F52; border: 1.5px solid #E0D2C0; }
.btn.sm { min-height: 40px; font-size: 14px; padding: 0 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 46px; border: 1.5px solid #EADBC6; border-radius: 14px; padding: 10px 14px; font-size: 16px; background: #FFFBF5;
}
textarea { resize: vertical; line-height: 1.5; }
input.num { width: 64px; text-align: center; padding: 0 6px; }
.row input[type=text] { flex: 1; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #6B5A48; }
.del { flex: none; width: 36px; height: 36px; border: none; border-radius: 10px; background: transparent; color: #8A7A68; display: flex; align-items: center; justify-content: center; }
.bar { height: 10px; border-radius: 999px; background: #FFE7D2; overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; background: #FF8A3D; transition: width .3s; }

/* ===== 로그인 ===== */
.login { max-width: 420px; margin: 0 auto; min-height: 100vh; padding: 48px 24px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.login h1 { margin: 0; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 34px; }
.logo-mark { width: 64px; height: 64px; border-radius: 20px; background: #FF8A3D; color: #FFFFFF; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 0 #D96A20; }
.logo-mark.sm { width: 56px; height: 56px; border-radius: 18px; }

/* ===== 폰 ===== */
.phone { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.ph-head { padding: calc(20px + env(safe-area-inset-top)) 18px 8px; display: flex; align-items: center; justify-content: space-between; }
.ph-head .sub { font-size: 14px; color: #6B5A48; font-weight: 500; }
.ph-head h1 { margin: 0; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 28px; }
.badge { font-size: 12px; font-weight: 900; background: #2B2118; color: #FFFFFF; border-radius: 999px; padding: 4px 10px; }
.ph-main { flex: 1; padding: 8px 16px 110px; display: flex; flex-direction: column; gap: 16px; }
.ph-nav { position: fixed; left: 0; right: 0; bottom: 0; background: #FFFFFF; border-top: 1px solid #EFE3D3; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); }
.tab { border: none; background: none; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: #6B5A48; }
.tab.on { color: #B4500F; }

.card { background: #FFFFFF; border-radius: 24px; padding: 16px; box-shadow: 0 5px 0 #EADBC6; display: flex; flex-direction: column; gap: 12px; }
.card h2 { margin: 0; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 23px; }
.card.orange { background: #FF8A3D; box-shadow: 0 5px 0 #D96A20; }
.card.orange .on-dark { color: #FFFFFF; }
.card.orange input { background: #FFF1E4; border-color: #FFF1E4; }

.goal-row { background: #FFFFFF; border-radius: 18px; padding: 10px 8px 10px 14px; display: flex; align-items: center; gap: 8px; }
.goal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.goal-top { display: flex; justify-content: space-between; gap: 8px; }
.goal-title { font-size: 15px; font-weight: 700; }
.goal-num { font-size: 13px; font-weight: 900; color: #B4500F; white-space: nowrap; }
.sq { flex: none; width: 46px; height: 46px; border: none; border-radius: 14px; background: #FF8A3D; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.sq.ok { background: #1E9E5A; }

.chips5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chip-m { border: none; border-radius: 16px; min-height: 64px; background: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 700; color: #5E4E3E; }
.chip-m.on { color: #2B2118; }
.chip-m .dot { width: 26px; height: 26px; border-radius: 50%; color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; }
.pg { border-radius: 16px; display: flex; align-items: center; padding-right: 6px; }
.pg-btn { flex: 1; border: none; background: none; text-align: left; padding: 12px 14px; min-height: 52px; display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; }
.box { flex: none; width: 26px; height: 26px; border-radius: 9px; border: 2.5px solid; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.struck { text-decoration: line-through; opacity: .6; }
.st-row { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }
.st-top { display: flex; justify-content: space-between; font-size: 14px; }

.day { margin: 8px 4px 6px; font-size: 15px; font-weight: 900; }
.ev { border-radius: 16px; padding: 10px 6px 10px 14px; display: flex; align-items: center; gap: 12px; }
.ev-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-meta { font-size: 13px; font-weight: 700; }
.ev-title { font-size: 16px; font-weight: 700; }

#toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px); background: #2B2118; color: #FFFFFF; padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 700; opacity: 0; pointer-events: none; transition: all .25s; z-index: 10; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 거실 태블릿 ===== */
body.is-tablet { overflow: hidden; }
.tablet { height: 100vh; padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.t-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.t-logo { display: flex; align-items: center; gap: 14px; }
.t-title { display: block; font-family: 'Jua', sans-serif; font-size: 32px; line-height: 1.1; }
.t-sub { display: block; font-size: 15px; color: #6B5A48; font-weight: 500; }
.t-goals { display: flex; align-items: center; gap: 10px; min-width: 0; }
.t-goals-label { font-family: 'Jua', sans-serif; font-size: 20px; color: #B4500F; white-space: nowrap; }
.t-goal { background: #FFFFFF; border-radius: 18px; padding: 8px 14px; box-shadow: 0 4px 0 #EADBC6; display: flex; flex-direction: column; gap: 4px; min-width: 150px; max-width: 230px; }
.t-goal-top { display: flex; justify-content: space-between; gap: 10px; font-family: 'Jua', sans-serif; font-size: 17px; }
.t-goal-top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-goal-top .o { color: #B4500F; }
.t-goal .bar { height: 8px; }
.t-goal-empty { font-size: 15px; color: #6B5A48; }
.t-clock { background: #FFFFFF; border-radius: 22px; padding: 8px 20px; box-shadow: 0 5px 0 #EADBC6; display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.t-date { font-size: 16px; font-weight: 700; color: #6B5A48; }
.t-time { font-family: 'Jua', sans-serif; font-size: 34px; line-height: 1.1; }
.t-body { flex: 1; min-height: 0; display: flex; gap: 22px; }
.t-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rts { display: flex; gap: 12px; }
.rt { flex: 1; border: none; border-radius: 20px; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; font-family: 'Jua', sans-serif; font-size: 24px; background: #FFFFFF; color: #6B5A48; box-shadow: 0 5px 0 #E6D6C0; }
.rt.on { background: #FF8A3D; color: #FFFFFF; box-shadow: 0 5px 0 #D96A20; }
.kids { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.kid { border-radius: 30px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.kid-head { display: flex; align-items: center; gap: 12px; }
.kid-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kid-name .nm { font-family: 'Jua', sans-serif; font-size: 30px; line-height: 1.1; }
.kid-name .meta { font-size: 14px; font-weight: 700; color: #5E4E3E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.praise { background: #FFFFFF; border-radius: 16px; padding: 8px 12px; font-family: 'Jua', sans-serif; font-size: 18px; flex: none; }
.stars { display: flex; align-items: center; gap: 3px; background: #FFFFFF; border-radius: 18px; padding: 8px 12px; flex-wrap: wrap; }
.reward { margin-left: auto; font-size: 13px; font-weight: 700; color: #6B5A48; }
.tiles { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.tile { position: relative; border: none; border-radius: 24px; padding: 8px; min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #FFFFFF; color: #2B2118; box-shadow: 0 6px 0 #E6D6C0; font-family: 'Jua', sans-serif; font-size: 22px; transition: transform .08s; }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 #E6D6C0; }
.tile.done { color: #FFFFFF; }
.tick { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; background: #FFC93C; display: flex; align-items: center; justify-content: center; }
.t-right { width: 318px; flex: none; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.t-card { background: #FFFFFF; border-radius: 28px; padding: 14px 18px; box-shadow: 0 6px 0 #EADBC6; display: flex; flex-direction: column; gap: 10px; }
.t-card h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 24px; color: #2B2118; }
.t-card h2 svg { color: #FF8A3D; }
.t-evs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.t-evs li { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 8px 12px; }
.t-evs li div { display: flex; flex-direction: column; min-width: 0; }
.t-evs .none { color: #6B5A48; font-size: 15px; padding: 4px 0; }
.t-card.word { background: #DDF0FF; box-shadow: 0 6px 0 #A8D3F5; flex: 1; }
.w-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; color: #1F55B8; }
.pill { font-size: 12px; background: #FFFFFF; border-radius: 999px; padding: 3px 10px; }
.w-body { display: flex; align-items: center; gap: 14px; flex: 1; }
.w-art { width: 112px; height: 112px; flex: none; border-radius: 30px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.w-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.w-en { font-family: 'Jua', sans-serif; font-size: 32px; line-height: 1; color: #1A3A7A; overflow-wrap: anywhere; }
.w-ko { font-family: 'Jua', sans-serif; font-size: 22px; }
.speak { margin-top: 4px; border: none; background: #2A66D9; color: #FFFFFF; border-radius: 16px; min-height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: center; gap: 6px; font-family: 'Jua', sans-serif; font-size: 18px; box-shadow: 0 4px 0 #1B4BA8; }
.t-card.note { background: #D9F5E6; box-shadow: 0 6px 0 #A9DDC1; transform: rotate(-1deg); gap: 4px; }
.note-by { font-size: 14px; font-weight: 700; color: #167443; }
.t-card.note p { margin: 0; font-family: 'Jua', sans-serif; font-size: 19px; line-height: 1.35; color: #1E3B2C; overflow-wrap: anywhere; }

/* 작은 태블릿·세로 화면 */
@media (max-width: 1000px) {
  body.is-tablet { overflow: auto; }
  .tablet { height: auto; min-height: 100vh; }
  .t-head { flex-wrap: wrap; }
  .t-body { flex-direction: column; }
  .t-right { width: auto; }
  .tile { min-height: 110px; }
}

/* ===== 2차: 공통 ===== */
.row.between { justify-content: space-between; }
.row.center, .center { align-items: center; }
.small { font-size: 13px; color: #5E4E3E; }
.small.b, .b { font-weight: 700; }
.muted { color: #6B5A48; font-size: 13px; }
.posi { color: #047857; }
.neg { color: #B45309; }
.hint.dark { color: #1F2A10; }
.sec { margin: 6px 4px 4px; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 23px; }
.me-btn { width: 44px; height: 44px; border: none; border-radius: 50%; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.tab { position: relative; }
.ph-nav .tab span { white-space: nowrap; }
.nbadge { position: absolute; top: 4px; left: 54%; min-width: 18px; height: 18px; border-radius: 9px; background: #E5484D; color: #FFFFFF; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.notice { width: 100%; border: none; border-radius: 18px; background: #2B2118; color: #FFFFFF; min-height: 52px; padding: 0 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; text-align: left; }
.btn.white { background: #FFFFFF; color: #3A2DB0; }
.btn.deep { background: #4B3CC4; color: #FFFFFF; }
.btn.lime { background: #C6F432; color: #10172A; }
.btn:disabled { opacity: .55; }
.btn.grow, .grow { flex: 1; }
.btn svg { vertical-align: -4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid #E0D2C0; background: #FFFFFF; font-size: 14px; font-weight: 700; color: #3E3428; }
.chip.on.dark { background: #2B2118; border-color: #2B2118; color: #FFFFFF; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #3E3428; min-height: 40px; }
.check input { width: 20px; height: 20px; }
input.num.wide { width: 110px; }
.tag { display: inline-block; font-size: 12px; font-weight: 900; color: #FFFFFF; border-radius: 8px; padding: 2px 8px; vertical-align: 1px; }
.ok-line { margin: 0; font-size: 13px; font-weight: 700; color: #047857; }
.icon-btn { width: 44px; height: 44px; border: none; border-radius: 12px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.icon-btn:disabled { opacity: .35; }

/* 포인트 카드 */
.card.lime { background: #DDF7A8; box-shadow: 0 5px 0 #B5DB6E; }
.card.lime h2 { color: #1F2A10; }
.pts { font-family: 'Jua', sans-serif; font-size: 28px; color: #1F2A10; }
.bar.dark { background: rgba(31, 42, 16, .15); }
.bar.dark > div { background: #3F6A00; }
.money-big { font-family: 'Jua', sans-serif; font-size: 36px; color: #1F2A10; }
.mini { flex: 1; background: rgba(255, 255, 255, .55); border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; font-size: 12px; color: #1F2A10; }
.mini b { font-size: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mini2 { background: #FFF6E9; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; font-size: 12px; color: #6B5A48; }
.mini2 b { font-size: 16px; color: #2B2118; }

/* 공부 */
.dday { border: none; border-radius: 22px; background: #2B2118; color: #FFFFFF; min-height: 64px; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; text-align: left; }
.dd-t { font-size: 15px; font-weight: 700; }
.dd-n { font-family: 'Jua', sans-serif; font-size: 30px; color: #FFC93C; }
.card.purple { background: #6D5CF0; box-shadow: 0 5px 0 #4B3CC4; color: #FFFFFF; }
.w-label { font-size: 13px; font-weight: 900; color: #EDEAFF; }
.w-streak { font-size: 12px; font-weight: 700; background: #4B3CC4; border-radius: 999px; padding: 4px 10px; }
.w-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.w-big { font-size: 38px; font-weight: 900; letter-spacing: -.5px; }
.w-ipa { font-size: 14px; color: #EDEAFF; }
.w-mean { background: #FFFFFF; color: #1A1640; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.w-mean b { font-size: 18px; }
.timer { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring-t { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.big-num { font-size: 17px; font-weight: 900; }
.more summary { cursor: pointer; font-size: 14px; font-weight: 700; color: #6B5A48; min-height: 36px; display: flex; align-items: center; }
.more form { margin-top: 6px; }
.pl { display: flex; align-items: center; background: #F6FBEA; border-radius: 14px; padding-right: 4px; }
.pl-btn { flex: 1; border: none; background: none; text-align: left; padding: 10px 12px; min-height: 50px; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.hbar { display: flex; align-items: center; gap: 10px; }
.hb-l { width: 36px; font-size: 13px; font-weight: 700; flex: none; }
.hb-t { flex: 1; height: 12px; border-radius: 999px; background: #F1EADF; overflow: hidden; }
.hb-t > div { height: 100%; border-radius: 999px; }
.hb-v { width: 70px; text-align: right; font-size: 12px; font-weight: 700; color: #5E4E3E; flex: none; }

/* 학교생활 */
.ach { background: #FFFFFF; border-radius: 16px; padding: 10px 6px 10px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 0 #EADBC6; }
.kind { flex: none; font-size: 11px; font-weight: 900; color: #6B5A48; background: #F3EADC; border-radius: 8px; padding: 3px 8px; }
.ach-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ach-t { font-size: 15px; font-weight: 700; }
.ach-m { font-size: 12px; color: #6B5A48; }
.st { flex: none; font-size: 12px; font-weight: 900; border-radius: 999px; padding: 4px 10px; }
.st.ok { background: #C6F432; color: #1F2A10; }
.st.wait { background: #FFF0DE; color: #B45309; }
.st.held { background: #EEE; color: #555; }
.appr { background: #FFF6E9; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.trend { display: flex; align-items: flex-end; gap: 12px; padding: 4px 0; }
.tr-bars { display: flex; align-items: flex-end; gap: 10px; flex: 1; }
.tr-b { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; }
.tr-b div { width: 26px; border-radius: 6px 6px 3px 3px; }
.tr-b em { font-style: normal; font-weight: 500; color: #6B5A48; font-size: 11px; }

/* 용돈 */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #F3EADC; border-radius: 14px; padding: 4px; }
.seg button { border: none; border-radius: 11px; min-height: 42px; background: transparent; font-weight: 900; color: #5E4E3E; }
.seg button.on.out { background: #FFB86B; color: #2B2118; }
.seg button.on.in { background: #5FE0A8; color: #10241A; }
.mrow { background: #FFFFFF; border-radius: 14px; padding: 8px 4px 8px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 0 #EADBC6; }
.m-d { width: 40px; font-size: 12px; font-weight: 700; color: #6B5A48; flex: none; }
.m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-t { font-size: 15px; font-weight: 700; }
.m-c { font-size: 12px; color: #6B5A48; }
.month-nav { margin-bottom: 6px; }

/* 채팅 */
.phone.chatmode .ph-main { padding-bottom: 0; }
.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 150px; height: calc(100vh - 150px); }
.c-day { align-self: center; font-size: 12px; color: #6B5A48; background: #F3EADC; border-radius: 999px; padding: 3px 12px; margin: 4px 0; }
.c-msg { display: flex; gap: 8px; align-items: flex-start; }
.c-msg.mine { justify-content: flex-end; }
.c-av { width: 34px; height: 34px; border-radius: 50%; color: #FFFFFF; font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; font-size: 14px; }
.c-col { display: flex; flex-direction: column; gap: 2px; max-width: 78%; }
.c-name { font-size: 12px; font-weight: 700; color: #5E4E3E; }
.c-line { display: flex; align-items: flex-end; gap: 6px; }
.c-msg.mine .c-line { flex-direction: row-reverse; }
.c-bub { background: #FFFFFF; border-radius: 16px; padding: 9px 13px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.c-msg.mine .c-bub { background: #FF8A3D; color: #FFFFFF; }
.c-time { font-size: 11px; color: #8A7A68; white-space: nowrap; }
.chat-in { position: fixed; left: 0; right: 0; bottom: calc(72px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; display: flex; gap: 8px; padding: 8px 12px; background: #FFF6E9; }
.chat-in input { flex: 1; min-width: 0; border-radius: 999px; }
.send { width: 48px; height: 48px; border: none; border-radius: 50%; background: #FF8A3D; color: #FFFFFF; display: flex; align-items: center; justify-content: center; flex: none; }

/* 태블릿 축하 배너 */
.t-cel { position: relative; background: #FFD54A; border-radius: 26px; padding: 12px 18px; display: flex; align-items: center; gap: 16px; box-shadow: 0 6px 0 #E6B422; }
.cel-ic { width: 58px; height: 58px; flex: none; border-radius: 50%; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.cel-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cel-s { font-size: 14px; font-weight: 700; color: #6A4B00; }
.cel-m { font-family: 'Jua', sans-serif; font-size: 25px; color: #3A2A00; }
.cel-b { flex: none; border: none; background: #FFFFFF; color: #3A2A00; border-radius: 18px; padding: 10px 16px; min-height: 54px; display: flex; align-items: center; gap: 8px; font-family: 'Jua', sans-serif; font-size: 19px; box-shadow: 0 5px 0 #E6B422; }
[data-hold="logout"] { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* ===== 3차: 게시판 · 달력 ===== */
.card.board { border: 2px solid #FFD9BD; }
.nnew { font-family: 'Noto Sans KR', sans-serif; font-size: 12px; font-weight: 900; background: #E5484D; color: #FFFFFF; border-radius: 999px; padding: 3px 9px; vertical-align: 3px; }
.post { display: flex; align-items: flex-start; gap: 10px; background: #FFF8F0; border-radius: 16px; padding: 10px 4px 10px 10px; }
.post.fresh { background: #FFF0DE; box-shadow: inset 0 0 0 2px #FFB86B; }
.post-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.post-meta { font-size: 12px; color: #6B5A48; }
.post-t { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.new { font-size: 10px; font-weight: 900; color: #FFFFFF; background: #E5484D; border-radius: 6px; padding: 1px 5px; vertical-align: 1px; }
.link-btn { border: none; background: none; color: #B4500F; font-weight: 700; font-size: 14px; min-height: 40px; align-self: flex-start; padding: 0 4px; }

.cal { gap: 8px; }
.cal h2 { font-size: 22px; }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; font-size: 12px; font-weight: 700; color: #6B5A48; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.sun { color: #D23C4E !important; }
.sat { color: #2A66D9 !important; }
.cd { min-height: 64px; border: none; border-radius: 10px; background: #FFF8F0; padding: 4px 3px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; text-align: left; overflow: hidden; color: #2B2118; }
.cd.empty { background: transparent; }
.cd-n { font-size: 13px; font-weight: 700; text-align: center; }
.cd.today .cd-n { background: #FF8A3D; color: #FFFFFF; border-radius: 999px; width: 24px; height: 24px; line-height: 24px; align-self: center; }
.cd.sel { box-shadow: inset 0 0 0 2px #2B2118; background: #FFFFFF; }
.cd-ev { font-size: 10px; line-height: 1.3; color: #FFFFFF; border-radius: 4px; padding: 1px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-more { font-size: 10px; font-weight: 700; color: #6B5A48; text-align: center; }
.ev-when { font-size: 12px; font-weight: 900; color: #2B2118; }

/* 태블릿 게시판 */
.t-right { overflow-y: auto; }
.t-card.note { transform: none; gap: 8px; }
.t-card.note h2 { color: #1E3B2C; }
.t-card.note h2 svg { color: #167443; }
.t-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.t-board li { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 255, 255, .7); border-radius: 14px; padding: 8px 10px; }
.t-board li div { display: flex; flex-direction: column; min-width: 0; }
.tb-meta { font-size: 12px; font-weight: 700; color: #167443; }
.tb-t { font-family: 'Jua', sans-serif; font-size: 18px; line-height: 1.35; color: #1E3B2C; overflow-wrap: anywhere; }
.t-board .none { color: #3F6B55; font-size: 15px; }
.t-card.note input { background: #FFFFFF; min-height: 44px; }
