/* 생활 계산기 (Life Calculators) v1.0.0 */
.lc-hub, .lc-single {
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: #16283f;
  --lc-blue: #1665d8;
  --lc-blue-d: #0d47a1;
  --lc-navy: #0b2e59;
  --lc-line: #dde7f2;
  --lc-bg: #f2f6fb;
  --lc-sub: #54687f;
  --lc-mute: #8ba0b8;
}
.lc-hub *, .lc-single * { box-sizing: border-box; }
.lc-hub { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }

/* ── 왼쪽 메뉴 ─────────────────────────── */
.lc-side { width: 302px; flex: none; background: #fff; border: 1px solid var(--lc-line); border-radius: 20px; padding: 20px 16px 14px; box-shadow: 0 6px 22px rgba(13,54,110,.06); position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.lc-side-head { display: flex; align-items: center; padding: 0 6px 12px; }
.lc-side-head b { font-size: 17px; font-weight: 800; color: var(--lc-navy); }
.lc-side-head span { margin-left: 8px; background: #e8f1fd; color: var(--lc-blue); font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.lc-search { width: 100%; margin: 0 0 4px; background: var(--lc-bg); border: 1px solid #e0e9f4; border-radius: 12px; padding: 10px 13px; font-size: 14px; color: #243b57; font-family: inherit; outline: none; }
.lc-search:focus { border-color: var(--lc-blue); background: #fff; }
.lc-grp { font-size: 12.5px; font-weight: 800; color: var(--lc-mute); letter-spacing: .4px; padding: 13px 8px 7px; }
.lc-nav-btn { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: #f6f9fd; border: 1px solid #e4edf7; color: #243b57; font-size: 14.5px; font-weight: 600; padding: 10.5px 13px; border-radius: 12px; margin-bottom: 6px; cursor: pointer; font-family: inherit; }
.lc-nav-btn i { width: 7px; height: 7px; border-radius: 50%; background: #b9cde6; flex: none; }
.lc-nav-btn:hover { border-color: #bcd3f2; background: #eef5ff; }
.lc-nav-btn.on { background: linear-gradient(120deg, #1b6de0, #0f56c4); border-color: #0f56c4; color: #fff; box-shadow: 0 5px 14px rgba(22,101,216,.35); }
.lc-nav-btn.on i { background: #fff; }
.lc-nav-btn.hide, .lc-grp.hide { display: none; }
.lc-side-note { margin-top: 14px; background: #eef5ff; border: 1px solid #d7e7fd; border-radius: 14px; padding: 12px 14px; font-size: 12.8px; line-height: 1.55; color: #38618f; }

/* ── 오른쪽 본문 ───────────────────────── */
.lc-main { flex: 1; min-width: 0; }
.lc-clock-time, .lc-big-display b, .lc-a-time, .lc-alarm-set input[type="time"] { white-space: nowrap; }
.lc-tinput { min-width: 0; }
.lc-tinput input { min-width: 0; }
.lc-card { background: #fff; border: 1px solid var(--lc-line); border-radius: 20px; box-shadow: 0 6px 22px rgba(13,54,110,.06); padding: 26px 30px; margin-bottom: 22px; }
.lc-card h2 { font-size: 20px; font-weight: 800; color: var(--lc-navy); display: flex; align-items: center; gap: 9px; margin: 0 0 6px; }
.lc-card h2 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lc-blue); flex: none; }
.lc-desc { font-size: 14px; color: var(--lc-sub); line-height: 1.6; margin: 0 0 18px; }
.lc-row2 { display: flex; gap: 22px; }
.lc-row2 > .lc-card { flex: 1; min-width: 0; }

/* 시계 */
.lc-card-label { font-size: 13.5px; font-weight: 800; color: var(--lc-blue); letter-spacing: .3px; }
.lc-clock-flex { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.lc-clock-time { font-size: 76px; font-weight: 800; letter-spacing: 1px; color: var(--lc-navy); font-variant-numeric: tabular-nums; line-height: 1.05; }
.lc-clock-time small { font-size: 34px; color: #7d99bd; font-weight: 700; }
.lc-clock-date { margin-top: 6px; font-size: 17px; color: var(--lc-sub); font-weight: 600; }
.lc-world { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.lc-w-tile { background: var(--lc-bg); border: 1px solid #e0e9f4; border-radius: 15px; padding: 13px 18px; text-align: center; min-width: 112px; }
.lc-w-tile b { display: block; font-size: 20px; color: var(--lc-navy); font-variant-numeric: tabular-nums; }
.lc-w-tile span { font-size: 12.5px; color: #7d8fa8; font-weight: 600; }

/* 타이머 · 스톱워치 */
.lc-big-display { margin: 18px 0 16px; background: var(--lc-bg); border: 1px solid #e0e9f4; border-radius: 16px; text-align: center; padding: 20px 0 16px; }
.lc-big-display b { font-size: 54px; font-weight: 800; color: var(--lc-navy); font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.lc-big-display.flash { animation: lcflash .5s ease-in-out 6; }
@keyframes lcflash { 50% { background: #ffd9d9; } }
.lc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lc-chip { background: #eef3fa; border: 1px solid var(--lc-line); color: #33506f; font-size: 13.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.lc-chip.sel { background: var(--lc-blue); border-color: var(--lc-blue); color: #fff; }
.lc-tinputs { display: flex; gap: 8px; margin-top: 14px; }
.lc-tinput { flex: 1; }
.lc-tinput input { width: 100%; border: 1.5px solid #d8e3f0; border-radius: 12px; padding: 10px 8px; font-size: 16px; font-weight: 700; color: #243b57; text-align: center; font-family: inherit; outline: none; }
.lc-tinput span { display: block; text-align: center; color: #93a7bd; font-weight: 600; font-size: 12.5px; margin-top: 3px; }
.lc-actions { display: flex; gap: 10px; margin-top: 16px; }
.lc-btn-main { flex: 1; background: linear-gradient(120deg, #1b6de0, #0f56c4); color: #fff; font-size: 15.5px; font-weight: 800; padding: 13px 0; border: none; border-radius: 13px; text-align: center; cursor: pointer; box-shadow: 0 5px 14px rgba(22,101,216,.3); font-family: inherit; }
.lc-btn-sub { min-width: 100px; background: #eef3fa; color: #33506f; font-size: 15px; font-weight: 700; padding: 13px 16px; border: none; border-radius: 13px; text-align: center; cursor: pointer; font-family: inherit; }
.lc-laps { margin-top: 14px; max-height: 180px; overflow-y: auto; }
.lc-laps div { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid #eef3f9; font-variant-numeric: tabular-nums; font-size: 14.5px; color: #33506f; font-weight: 600; }

/* 알람 */
.lc-alarm-set { display: flex; gap: 10px; margin-top: 16px; align-items: stretch; flex-wrap: wrap; }
.lc-alarm-set input[type="time"] { background: var(--lc-bg); border: 1.5px solid #d8e3f0; border-radius: 12px; padding: 8px 14px; font-size: 21px; font-weight: 800; color: var(--lc-navy); font-family: inherit; outline: none; }
.lc-alarm-set input[type="text"] { flex: 1; min-width: 140px; border: 1.5px solid #d8e3f0; border-radius: 12px; padding: 0 14px; font-size: 14.5px; font-family: inherit; outline: none; }
.lc-alarm-add { background: linear-gradient(120deg, #1b6de0, #0f56c4); color: #fff; font-weight: 800; font-size: 15px; padding: 0 22px; border: none; border-radius: 12px; cursor: pointer; box-shadow: 0 5px 14px rgba(22,101,216,.3); font-family: inherit; }
.lc-days { display: flex; gap: 7px; margin-top: 13px; }
.lc-day { width: 38px; height: 38px; border-radius: 50%; background: #eef3fa; border: 1px solid var(--lc-line); color: #5a6b80; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; font-family: inherit; }
.lc-day.sel { background: var(--lc-blue); border-color: var(--lc-blue); color: #fff; }
.lc-alarm-list { margin-top: 16px; border-top: 1px solid #e6eef7; }
.lc-a-row { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-bottom: 1px solid #eef3f9; }
.lc-a-time { font-size: 24px; font-weight: 800; color: var(--lc-navy); font-variant-numeric: tabular-nums; }
.lc-a-meta b { display: block; font-size: 14.5px; color: #243b57; }
.lc-a-meta span { font-size: 12.5px; color: var(--lc-mute); font-weight: 600; }
.lc-a-del { margin-left: 8px; background: none; border: none; color: #c3d0df; font-size: 17px; cursor: pointer; }
.lc-toggle { margin-left: auto; width: 52px; height: 29px; border-radius: 999px; background: var(--lc-blue); position: relative; flex: none; border: none; cursor: pointer; }
.lc-toggle::after { content: ""; position: absolute; top: 3.5px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; }
.lc-toggle.off { background: #c8d5e4; }
.lc-toggle.off::after { right: auto; left: 4px; }
.lc-alarm-fire { margin-top: 14px; background: #fff1f1; border: 1px solid #ffc9c9; color: #b02a2a; border-radius: 13px; padding: 12px 16px; font-weight: 700; font-size: 15px; display: none; }
.lc-alarm-fire.show { display: block; }

/* 일반 계산기 */
.lc-calc-flex { display: flex; gap: 30px; margin-top: 6px; flex-wrap: wrap; }
.lc-calc { width: 392px; max-width: 100%; flex: none; background: #0e2a4a; border-radius: 22px; padding: 22px 20px 20px; box-shadow: 0 14px 30px rgba(11,46,89,.28); }
.lc-calc-screen { background: #0a1f38; border-radius: 14px; padding: 16px 18px 13px; text-align: right; margin-bottom: 16px; min-height: 96px; }
.lc-calc-expr { font-size: 15px; color: #7d99bd; font-weight: 600; min-height: 20px; font-variant-numeric: tabular-nums; }
.lc-calc-value { font-size: 44px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .5px; line-height: 1.15; word-break: break-all; }
.lc-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lc-ck { border: none; cursor: pointer; font-family: inherit; font-size: 21px; font-weight: 700; padding: 17px 0; border-radius: 14px; background: #1d4066; color: #eaf2fc; -webkit-tap-highlight-color: transparent; }
.lc-ck:active { transform: scale(.96); }
.lc-ck.fn { background: #2a4f7c; color: #a9c8ef; }
.lc-ck.op { background: #1665d8; color: #fff; }
.lc-ck.eq { background: linear-gradient(120deg, #2f83f0, #0f56c4); color: #fff; }
.lc-ck.wide { grid-column: span 2; }
.lc-ck.clear { background: #5b3245; color: #ffb3c2; }
.lc-hist { flex: 1; min-width: 240px; }
.lc-hist-head { display: flex; align-items: center; }
.lc-hist-head b { font-size: 16px; font-weight: 800; color: var(--lc-navy); }
.lc-hist-clear { margin-left: auto; font-size: 13px; font-weight: 700; color: #7d8fa8; background: #eef3fa; border: 1px solid var(--lc-line); padding: 6px 13px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.lc-h-row { display: flex; align-items: baseline; gap: 10px; padding: 11px 4px; border-bottom: 1px solid #eef3f9; font-variant-numeric: tabular-nums; }
.lc-h-expr { font-size: 15.5px; color: var(--lc-sub); font-weight: 600; }
.lc-h-eq { color: #b3c3d8; font-weight: 700; }
.lc-h-val { margin-left: auto; font-size: 18px; font-weight: 800; color: var(--lc-navy); }
.lc-hist-empty { padding: 16px 4px; color: var(--lc-mute); font-size: 14px; }

/* ── 계산기 폼 공통 ────────────────────── */
.lc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.lc-field { min-width: 0; }
.lc-field.full { grid-column: 1 / -1; }
.lc-field label { display: block; font-size: 13.5px; font-weight: 700; color: #33506f; margin-bottom: 6px; }
.lc-field .lc-inwrap { display: flex; align-items: center; gap: 7px; }
.lc-field input[type="number"], .lc-field input[type="date"], .lc-field input[type="time"], .lc-field input[type="text"], .lc-field select {
  width: 100%; border: 1.5px solid #d8e3f0; border-radius: 12px; padding: 11px 13px; font-size: 15.5px; font-weight: 600; color: #243b57; font-family: inherit; outline: none; background: #fff;
}
.lc-field input:focus, .lc-field select:focus { border-color: var(--lc-blue); }
.lc-suffix { font-size: 14px; color: var(--lc-mute); font-weight: 700; flex: none; }
.lc-head { grid-column: 1 / -1; font-size: 14px; font-weight: 800; color: var(--lc-navy); border-top: 1px solid #e6eef7; padding-top: 14px; margin-top: 2px; }
.lc-head:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.lc-radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.lc-radio { background: #eef3fa; border: 1px solid var(--lc-line); color: #33506f; font-size: 14px; font-weight: 700; padding: 9px 15px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.lc-radio.sel { background: var(--lc-blue); border-color: var(--lc-blue); color: #fff; }
.lc-check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: #33506f; cursor: pointer; padding-top: 26px; }
.lc-check input { width: 18px; height: 18px; accent-color: var(--lc-blue); }
.lc-go { margin-top: 18px; width: 100%; }
.lc-result { margin-top: 20px; display: none; }
.lc-result.show { display: block; }
.lc-headline { background: linear-gradient(120deg, #1b6de0, #0d47a1); border-radius: 16px; padding: 18px 22px; color: #fff; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.lc-headline span { font-size: 14px; font-weight: 700; color: #cfe2fb; }
.lc-headline b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; margin-left: auto; }
.lc-rows { margin-top: 6px; }
.lc-r-row { display: flex; align-items: baseline; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #eef3f9; }
.lc-r-row span { font-size: 14.5px; color: var(--lc-sub); font-weight: 600; }
.lc-r-row b { margin-left: auto; font-size: 16px; font-weight: 800; color: var(--lc-navy); font-variant-numeric: tabular-nums; text-align: right; }
.lc-r-row.total b { color: var(--lc-blue); font-size: 18px; }
.lc-table-wrap { margin-top: 16px; max-height: 340px; overflow-y: auto; border: 1px solid #e6eef7; border-radius: 13px; }
.lc-table-title { font-size: 14px; font-weight: 800; color: var(--lc-navy); margin-top: 18px; }
.lc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.lc-table th { background: #f2f6fb; color: #33506f; font-weight: 700; padding: 9px 10px; text-align: right; position: sticky; top: 0; }
.lc-table th:first-child, .lc-table td:first-child { text-align: left; }
.lc-table td { padding: 8px 10px; border-top: 1px solid #eef3f9; text-align: right; color: #243b57; }
.lc-note { margin-top: 14px; background: #eef5ff; border: 1px solid #d7e7fd; border-radius: 13px; padding: 11px 14px; font-size: 13px; line-height: 1.55; color: #38618f; }
.lc-warn { margin-top: 14px; background: #fff7e8; border: 1px solid #ffe1a8; border-radius: 13px; padding: 11px 14px; font-size: 13px; line-height: 1.55; color: #7a5a17; }
.lc-err { margin-top: 14px; background: #fff1f1; border: 1px solid #ffc9c9; border-radius: 13px; padding: 11px 14px; font-size: 13.5px; color: #b02a2a; font-weight: 600; display: none; }
.lc-err.show { display: block; }

/* ── 반응형 ────────────────────────────── */
@media (max-width: 960px) {
  .lc-hub { flex-direction: column; }
  .lc-side { width: 100%; position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .lc-side-head { width: 100%; padding-bottom: 4px; }
  .lc-search { width: 100%; }
  .lc-grp { width: 100%; padding: 8px 4px 2px; }
  .lc-nav-btn { width: auto; flex: none; margin-bottom: 0; padding: 8px 12px; font-size: 13.5px; }
  .lc-side-note { width: 100%; }
  .lc-row2 { flex-direction: column; }
  .lc-clock-time { font-size: 52px; }
  .lc-world { margin-left: 0; }
  .lc-form { grid-template-columns: 1fr; }
  .lc-card { padding: 20px 18px; }
  .lc-calc { margin: 0 auto; }
}

/* ── 가로 폭 대응: 테마 본문 폭이 좁아도 깨지지 않게 (컨테이너 기준) ── */
.lc-hub, .lc-single { container-type: inline-size; }
@container (max-width: 1020px) {
  .lc-row2 { flex-direction: column; }
  .lc-clock-time { font-size: clamp(34px, 9cqw, 58px); }
  .lc-clock-time small { font-size: 26px; }
  .lc-big-display b { font-size: 44px; }
}
@container (max-width: 840px) {
  .lc-main { flex: 1 1 100%; }
  .lc-side { width: 100%; position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .lc-side-head { width: 100%; padding-bottom: 4px; }
  .lc-search { width: 100%; }
  .lc-grp { width: 100%; padding: 8px 4px 2px; }
  .lc-nav-btn { width: auto; flex: none; margin-bottom: 0; padding: 8px 12px; font-size: 13.5px; }
  .lc-side-note { width: 100%; }
  .lc-form { grid-template-columns: 1fr; }
  .lc-calc { margin: 0 auto; }
  .lc-world { margin-left: 0; }
  .lc-card { padding: 20px 18px; }
}

/* 숏코드 wide="1": 테마 본문 폭을 벗어나 화면 너비(최대 1600px)로 확장 */
.lc-wide { width: min(1600px, 100vw); margin-left: calc(50% - min(800px, 50vw)); padding-left: 14px; padding-right: 14px; }
body:has(.lc-wide) { overflow-x: clip; }
