:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #edf5ff;
  --text: #10233f;
  --muted: #718096;
  --line: #dce6f2;
  --primary: #0b6bcb;
  --primary-dark: #074d93;
  --accent: #16a2b8;
  --danger: #d34545;
  --shadow: 0 12px 32px rgba(27, 64, 104, 0.10);
  --radius: 22px;
  --nav-h: 78px;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 760px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 20px 12px; background: rgba(244,247,251,.92); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(220,230,242,.72); }
.topbar h1 { margin: 2px 0 0; font-size: 24px; letter-spacing: -.8px; }
.eyebrow, .section-kicker { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; color: var(--primary); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); color: var(--primary); font-size: 28px; box-shadow: 0 5px 16px rgba(35,70,110,.12); display: grid; place-items: center; }
.icon-btn.small { width: 38px; height: 38px; font-size: 28px; box-shadow: none; background: var(--surface-2); }
.content { padding: 14px 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); }
.screen { display: none; animation: fade .22s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: .4; transform: translateY(4px);} to {opacity:1; transform:none;} }
.hero-card { min-height: 230px; padding: 26px; border-radius: 30px; background: linear-gradient(145deg,#073b78,#0b6bcb 55%,#169ab5); color: white; display: grid; grid-template-columns: 1fr auto; gap: 16px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero-card::after { content:""; position:absolute; width:180px; height:180px; border:1px solid rgba(255,255,255,.18); border-radius:50%; right:-62px; top:-42px; box-shadow: 0 0 0 36px rgba(255,255,255,.045), 0 0 0 72px rgba(255,255,255,.035); }
.hero-card h2 { font-size: 30px; line-height: 1.18; letter-spacing: -1.4px; margin: 20px 0 12px; }
.hero-card p { max-width: 390px; font-size: 14px; line-height: 1.65; color: rgba(255,255,255,.78); margin: 0; }
.hero-badge { display:inline-flex; padding:7px 10px; border-radius:999px; font-size:10px; font-weight:900; letter-spacing:1.4px; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.18); }
.hero-fish { align-self:end; font-size:76px; filter: drop-shadow(0 12px 10px rgba(0,0,0,.18)); transform: rotate(-8deg); }
.summary-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:14px 0 24px; }
.summary-card { background:var(--surface); border-radius:18px; padding:16px 12px; min-height:96px; box-shadow:0 6px 18px rgba(27,64,104,.07); }
.summary-card .label { font-size:11px; color:var(--muted); font-weight:700; }
.summary-card .value { margin-top:8px; font-size:23px; font-weight:900; letter-spacing:-1px; }
.summary-card .unit { font-size:11px; font-weight:700; color:var(--muted); margin-left:2px; }
.section-heading { display:flex; justify-content:space-between; align-items:end; margin: 26px 2px 12px; }
.section-heading.compact { margin-top:18px; }
.section-heading.inside { margin:0 0 14px; }
.section-heading h3 { margin:4px 0 0; font-size:21px; letter-spacing:-.7px; }
.text-btn, .mini-btn, .ghost-btn { border:0; background:transparent; color:var(--primary); font-weight:800; }
.mini-btn { background:var(--surface-2); border-radius:999px; padding:8px 12px; font-size:12px; }
.log-list { display:grid; gap:12px; }
.log-card { background:var(--surface); border-radius:22px; overflow:hidden; box-shadow:0 8px 20px rgba(27,64,104,.07); border:1px solid rgba(220,230,242,.72); display:grid; grid-template-columns:120px 1fr; min-height:130px; }
.log-card.no-photo { grid-template-columns:1fr; }
.log-thumb { width:100%; height:100%; min-height:130px; object-fit:cover; background:#d8e6f5; }
.log-body { padding:16px; min-width:0; }
.log-top { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.log-date { font-size:11px; color:var(--primary); font-weight:900; letter-spacing:.4px; }
.log-badge { font-size:10px; font-weight:800; color:#0b6bcb; background:#eaf4ff; border-radius:999px; padding:5px 8px; white-space:nowrap; }
.log-body h4 { font-size:18px; margin:8px 0 5px; letter-spacing:-.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.log-meta { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.log-catches { display:flex; gap:6px; flex-wrap:wrap; margin-top:12px; }
.catch-chip { font-size:11px; font-weight:800; border-radius:999px; padding:6px 9px; color:#24506f; background:#eef6f7; }
.empty-card { margin-top:20px; padding:30px 24px; text-align:center; background:var(--surface); border-radius:24px; border:1px dashed #c8d7e7; }
.empty-card .empty-icon { font-size:48px; }
.empty-card h3 { margin:12px 0 8px; }
.empty-card p { color:var(--muted); font-size:13px; line-height:1.6; max-width:460px; margin:0 auto 18px; }
.primary-btn, .secondary-btn, .upload-btn { border:0; border-radius:14px; min-height:46px; padding:0 18px; display:inline-flex; align-items:center; justify-content:center; font-weight:900; }
.primary-btn { background:var(--primary); color:#fff; box-shadow:0 7px 16px rgba(11,107,203,.22); }
.primary-btn:hover { background:var(--primary-dark); }
.secondary-btn { background:#e8eef6; color:#28425f; }
.empty-card .secondary-btn { margin-left:6px; }
.form-stack { display:grid; gap:14px; }
.form-card, .calendar-card { background:var(--surface); border-radius:24px; padding:20px; box-shadow:0 7px 22px rgba(27,64,104,.065); border:1px solid rgba(220,230,242,.76); }
.form-card h3 { margin:0 0 14px; font-size:18px; }
.card-title-row { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.card-title-row > span { font-size:10px; color:var(--muted); }
.photo-card { text-align:center; }
.photo-preview { min-height:210px; border-radius:18px; background:linear-gradient(145deg,#eaf3fb,#f8fbff); display:grid; place-content:center; gap:5px; overflow:hidden; color:#56708b; border:1px dashed #bdcee0; }
.photo-preview.has-photo { padding:0; display:block; }
.photo-preview img { width:100%; height:260px; object-fit:cover; display:block; }
.photo-placeholder-icon { font-size:38px; }
.photo-preview small { font-size:11px; color:#8496aa; }
.upload-btn { margin-top:12px; background:#e9f4ff; color:var(--primary); cursor:pointer; }
.ghost-btn { margin-top:10px; }
.field-grid { display:grid; gap:12px; }
.field-grid.two-col { grid-template-columns:repeat(2,minmax(0,1fr)); }
.field-grid.three-col { grid-template-columns:repeat(3,minmax(0,1fr)); }
.field { display:grid; gap:7px; margin-bottom:12px; }
.field:last-child { margin-bottom:0; }
.field > span { font-size:11px; color:#5b6f85; font-weight:800; }
input, select, textarea { width:100%; border:1px solid var(--line); background:#fbfdff; color:var(--text); border-radius:13px; padding:12px 13px; outline:none; transition:.18s; }
input:focus, select:focus, textarea:focus { border-color:#7cb7ef; box-shadow:0 0 0 3px rgba(11,107,203,.08); background:white; }
textarea { resize:vertical; min-height:120px; }
.catch-rows { display:grid; gap:9px; }
.catch-row { display:grid; grid-template-columns:1.2fr .7fr .7fr 38px; gap:7px; align-items:center; }
.catch-row input { padding:10px; }
.remove-catch { width:36px; height:36px; border-radius:50%; border:0; background:#fbecec; color:var(--danger); font-size:18px; }
.sticky-actions { position:sticky; bottom:calc(var(--nav-h) + 6px + env(safe-area-inset-bottom)); z-index:15; display:grid; grid-template-columns:1fr 2fr; gap:8px; padding:8px; background:rgba(244,247,251,.88); backdrop-filter:blur(10px); border-radius:18px; }
.calendar-head { display:grid; grid-template-columns:40px 1fr 40px; align-items:center; gap:8px; text-align:center; }
.calendar-head h2 { margin:0; font-size:20px; }
.weekdays, .calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); }
.weekdays { margin-top:18px; color:#91a0b0; font-size:11px; font-weight:800; text-align:center; }
.weekdays span { padding:8px 0; }
.calendar-grid { gap:4px; }
.calendar-day { aspect-ratio:1/1; min-height:44px; border:0; border-radius:12px; background:transparent; color:var(--text); position:relative; font-size:12px; display:grid; place-items:center; }
.calendar-day.muted { color:#c0cad5; }
.calendar-day.today { background:#e8f3ff; color:var(--primary); font-weight:900; }
.calendar-day.selected { background:var(--primary); color:white; font-weight:900; }
.calendar-day.has-log::after { content:""; width:5px; height:5px; border-radius:50%; background:var(--accent); position:absolute; bottom:5px; }
.calendar-day.selected.has-log::after { background:white; }
.stats-hero { padding:26px 22px; border-radius:26px; background:linear-gradient(160deg,#eef7ff,#ffffff); border:1px solid #d8e8f7; }
.stats-hero h2 { font-size:28px; letter-spacing:-1px; margin:12px 0 8px; }
.stats-hero p { margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.stat-card { margin-top:14px; }
.bar-list { display:grid; gap:13px; }
.bar-row { display:grid; grid-template-columns:86px 1fr auto; align-items:center; gap:10px; }
.bar-label { font-size:12px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-track { height:8px; border-radius:999px; background:#e9eff5; overflow:hidden; }
.bar-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,#0b6bcb,#1da0b5); min-width:4px; }
.bar-value { font-size:11px; color:var(--muted); font-weight:800; }
.muted { color:var(--muted); font-size:13px; line-height:1.6; }
.settings-list { display:grid; margin:0 -4px; }
.settings-row { width:100%; border:0; background:transparent; display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; padding:16px 6px; border-bottom:1px solid #edf1f5; color:var(--text); }
.settings-row span { display:grid; gap:3px; }
.settings-row strong { font-size:14px; }
.settings-row small { color:var(--muted); font-size:11px; }
.settings-row b { color:#96a5b5; font-size:20px; }
.settings-row.danger strong { color:var(--danger); }
.file-row { cursor:pointer; }
.about-card { margin-top:14px; padding:18px; border-radius:22px; display:flex; gap:14px; align-items:center; background:#eaf4ff; color:#24445f; }
.app-mark { width:50px; height:50px; border-radius:16px; background:white; display:grid; place-items:center; font-size:28px; }
.about-card p { margin:4px 0 0; font-size:11px; color:#688096; }
.bottom-nav { position:fixed; z-index:30; bottom:0; left:50%; transform:translateX(-50%); width:min(760px,100%); height:calc(var(--nav-h) + env(safe-area-inset-bottom)); padding:9px 12px calc(8px + env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(5,1fr); align-items:end; background:rgba(255,255,255,.95); backdrop-filter:blur(18px); border-top:1px solid rgba(210,222,236,.85); }
.nav-item { border:0; background:transparent; color:#8291a2; display:grid; gap:3px; place-items:center; min-height:56px; border-radius:16px; }
.nav-item span { font-size:22px; line-height:1; }
.nav-item b { font-size:10px; }
.nav-item.active { color:var(--primary); }
.nav-main { transform:translateY(-13px); }
.nav-main span { width:52px; height:52px; border-radius:18px; display:grid; place-items:center; background:var(--primary); color:white; font-size:30px; box-shadow:0 10px 22px rgba(11,107,203,.25); }
.nav-main.active span { background:var(--primary-dark); }
.detail-dialog { width:min(700px,calc(100% - 24px)); max-height:88vh; border:0; border-radius:28px; padding:0; background:var(--surface); color:var(--text); box-shadow:0 22px 70px rgba(8,36,68,.28); }
.detail-dialog::backdrop { background:rgba(8,24,44,.48); backdrop-filter:blur(3px); }
.dialog-shell { position:relative; overflow:auto; max-height:88vh; }
.dialog-close { position:absolute; z-index:4; right:14px; top:14px; width:38px; height:38px; border-radius:50%; border:0; background:rgba(10,31,53,.68); color:white; font-size:24px; }
.detail-photo { width:100%; height:300px; object-fit:cover; display:block; background:#dbe7f2; }
.detail-pad { padding:22px; }
.detail-pad h2 { margin:5px 0 4px; font-size:25px; letter-spacing:-.8px; }
.detail-date { color:var(--primary); font-size:11px; font-weight:900; }
.detail-line { color:#536a81; font-size:13px; margin:7px 0 16px; }
.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; margin:18px 0; }
.detail-cell { background:#f5f8fb; border-radius:15px; padding:12px; }
.detail-cell small { display:block; color:#8292a4; font-size:10px; margin-bottom:4px; }
.detail-cell strong { font-size:13px; }
.detail-section { border-top:1px solid #e9eff5; padding-top:16px; margin-top:16px; }
.detail-section h4 { margin:0 0 10px; font-size:13px; }
.detail-catch { display:flex; justify-content:space-between; align-items:center; padding:9px 0; border-bottom:1px dashed #e1e9f1; font-size:13px; }
.detail-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:18px; }
.toast { position:fixed; z-index:99; left:50%; bottom:calc(var(--nav-h) + 24px); transform:translate(-50%,20px); background:#13283f; color:white; border-radius:999px; padding:11px 16px; font-size:12px; opacity:0; pointer-events:none; transition:.2s; box-shadow:0 8px 24px rgba(0,0,0,.18); }
.toast.show { opacity:1; transform:translate(-50%,0); }
.hidden { display:none !important; }
@media (max-width:560px) {
  .content { padding-left:12px; padding-right:12px; }
  .hero-card { min-height:210px; padding:22px; }
  .hero-card h2 { font-size:27px; }
  .hero-fish { font-size:58px; }
  .summary-grid { grid-template-columns:repeat(2,1fr); }
  .summary-card { min-height:84px; }
  .log-card { grid-template-columns:96px 1fr; }
  .field-grid.three-col { grid-template-columns:1fr 1fr; }
  .catch-row { grid-template-columns:1.2fr .72fr .72fr 34px; }
  .catch-row input { font-size:12px; padding:9px 7px; }
  .detail-photo { height:240px; }
}
@media (max-width:400px) {
  .field-grid.two-col, .field-grid.three-col { grid-template-columns:1fr; }
  .hero-card { grid-template-columns:1fr; }
  .hero-fish { position:absolute; right:18px; bottom:12px; opacity:.42; }
  .catch-row { grid-template-columns:1fr 74px 74px 34px; }
  .calendar-day { min-height:39px; }
}
