:root { --bg: #FAFAF7; --card: #FFFFFF; --ink: #1A2421; --sub: #5B6660; --line: #E4E1D8; --teal: #1F6F5C; --teal-d: #164F41; --teal-l: #E6F0ED; --gold: #C68A2E; --gold-l: #FBF0DD; --red: #B3473B; --red-l: #F8E9E7; --radius: 14px; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: border-box; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #151917; --card: #1D2220; --ink: #EDEFEC; --sub: #9AA39D; --line: #2C332F; --teal: #4FA88E; --teal-d: #3C8C75; --teal-l: #1D2A26; --gold: #D9A646; --gold-l: #2B2316; --red: #D97A6E; --red-l: #2E1E1C; } }
:root[data-theme="dark"] { --bg: #151917; --card: #1D2220; --ink: #EDEFEC; --sub: #9AA39D; --line: #2C332F; --teal: #4FA88E; --teal-d: #3C8C75; --teal-l: #1D2A26; --gold: #D9A646; --gold-l: #2B2316; --red: #D97A6E; --red-l: #2E1E1C; }
* { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv02", "cv03", "cv04"; }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; }
.wrap { max-width: 680px; margin: 0 auto; padding: 5px 16px 60px; }
header { padding: 8px 0 12px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
header h1 { letter-spacing: -0.01em; margin: 0; line-height: 1.25; }
header p { color: var(--sub); margin: 0; font-size: .88rem; line-height: 1.4; text-align: left; }
@media (max-width: 767px) { header { grid-template-columns: 1fr; gap: 8px; } }
.theme-btn { background: none; border: 1px solid var(--line); border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); font-size: 1rem; flex-shrink: 0; }
nav { display: flex; gap: 6px; overflow-x: auto; padding: 16px 0 20px; border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 5; }
nav button { font-family: 'Inter'; font-size: .88rem; font-weight: 600; color: var(--sub); background: none; border: none; padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: .15s; }
nav button.active { background: var(--teal); color: #fff; }
nav button:not(.active):hover { background: var(--teal-l); color: var(--teal-d); }
section.app-section { display: none; padding-top: 22px; }
section.app-section.active { display: block; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 14px; display: block; box-shadow: 0 4px 20px -2px rgba(0,0,0,0.03); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { border-color: var(--teal); box-shadow: 0 8px 30px -4px rgba(31,111,92,0.08); }
.card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.card .hint { color: var(--sub); font-size: .85rem; margin: 0 0 14px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--sub); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-family: 'Inter'; font-size: .95rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.mini { width: 80px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
.btn, .btn-primary { font-family: 'Inter'; font-weight: 600; font-size: .88rem; padding: 12px 24px; border-radius: 999px; border: none; background: var(--teal); color: #fff; cursor: pointer; transition: all .2s ease; display: inline-block; text-decoration: none; text-align: center; box-shadow: 0 4px 14px rgba(31,111,92,0.25); }
.btn:hover, .btn-primary:hover { background: var(--teal-d); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(31,111,92,0.35); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; color: var(--sub); font-size: .76rem; font-weight: 600; padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
.tbl-wrap { overflow-x: auto; }
.del { background: none; border: none; color: var(--red); cursor: pointer; font-size: 1rem; padding: 2px 6px; }
.empty { color: var(--sub); font-size: .88rem; padding: 16px 0; text-align: center; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.stat { background: var(--teal-l); border-radius: 8px; padding: 12px 14px; }
.stat .lbl { font-size: .74rem; color: var(--sub); font-weight: 600; }
.stat .val { font-family: 'Fraunces'; font-size: 1.3rem; margin-top: 2px; color: var(--teal-d); }
.stat.gold { background: var(--gold-l); }
.stat.gold .val { color: var(--gold); }
#lockScreen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; text-align: center; }
#lockScreen.hidden { display: none; }
.bento-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
footer { text-align: center; color: var(--sub); font-size: .78rem; padding: 32px 0 16px; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-links { margin-bottom: 8px; }
.footer-links a, .footer-copy a { color: var(--sub); text-decoration: none; transition: color 0.15s ease; }
.footer-links a { margin: 0 8px; }
.footer-links a:hover, .footer-copy a:hover { color: var(--teal); text-decoration: underline; }
.footer-copy { margin-top: 6px; }
.mobile-only-btn, .mobile-overlay, .mobile-drawer { display: none; }
@media (max-width: 767px) { .mobile-only-btn { display: flex; align-items: center; justify-content: center; position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; border-radius: 50%; background: var(--teal, #0d9488); color: #ffffff; border: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); font-size: 1.5rem; cursor: pointer; z-index: 999; } }
@media (max-width: 767px) { .mobile-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; z-index: 1000; } }
@media (max-width: 767px) { .mobile-overlay.active { display: block; opacity: 1; visibility: visible; } }
@media (max-width: 767px) { .mobile-drawer { display: flex; flex-direction: column; position: fixed; top: 0; right: -280px; width: 280px; height: 100vh; background: var(--bg, #ffffff); box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15); transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1001; padding: 1.5rem 1rem; } }
@media (max-width: 767px) { .mobile-drawer.active { right: 0; } }
@media (max-width: 767px) { .mobile-drawer-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--line, #e5e7eb); font-size: 1.1rem; color: var(--ink, #111827); } }
@media (max-width: 767px) { .close-btn { background: none; border: none; font-size: 1.8rem; color: var(--ink, #111827); cursor: pointer; line-height: 1; } }
@media (max-width: 767px) { .mobile-menu-links { list-style: none; padding: 0; margin: 1.5rem 0 0 0; } }
@media (max-width: 767px) { .mobile-menu-links li { margin-bottom: 1.2rem; } }
@media (max-width: 767px) { .mobile-menu-links a { text-decoration: none; color: var(--ink, #111827); font-size: 1rem; font-weight: 500; display: block; transition: color 0.2s; } }
@media (max-width: 767px) { .mobile-menu-links a:hover { color: var(--teal, #0d9488); } }