:root {
  --navy: #17335d;
  --blue: #3e7fee;
  --gold: #c7a650;
  --paper: #f5f7fa;
  --white: #fff;
  --muted: #748198;
  --line: #e1e7ef;
  --shadow: 0 16px 40px rgba(23, 51, 93, .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--navy); background: var(--paper); }
button, a { color: inherit; font: inherit; }
button { border: 0; cursor: pointer; }
a { text-decoration: none; }

.app-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; background: var(--paper); }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; background: var(--white); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 14px; }
.brand small { color: var(--muted); font-size: 10px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); font-size: 23px; }
.icon-button { display: grid; place-items: center; font-size: 20px; }

main { padding: 30px 20px 100px; }
.screen { display: none; animation: rise .4s ease both; }
.screen.is-active { display: block; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.welcome h1, .screen-heading h1 { margin-bottom: 12px; font-size: clamp(2.5rem, 12vw, 4rem); letter-spacing: -.08em; line-height: .9; }
h1 em { color: var(--blue); font-style: normal; }
.intro { max-width: 280px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.notice-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; margin: 28px 0 34px; padding: 18px; border-radius: 20px; color: var(--white); background: var(--navy); box-shadow: var(--shadow); }
.notice-icon { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 50%; color: var(--navy); background: var(--gold); font-weight: 800; }
.notice-card h2 { margin: 4px 0 6px; font-size: 17px; letter-spacing: -.03em; }
.notice-card p { margin: 0; color: #c4d0e2; font-size: 11px; line-height: 1.45; }
.card-label { color: #9db8e8; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.primary-button { grid-column: 2; justify-self: start; margin-top: 8px; padding: 9px 13px; border-radius: 999px; color: var(--navy); background: var(--gold); font-size: 11px; font-weight: 700; }
.primary-button.is-enabled { background: #d6e3fa; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 28px 0 13px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }
.section-heading a { color: var(--blue); font-size: 11px; font-weight: 700; }
.feed { display: grid; gap: 10px; }
.feed-item { display: grid; grid-template-columns: 9px 1fr auto; gap: 12px; align-items: start; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 15px; color: var(--navy); background: var(--white); text-align: left; transition: .25s ease; }
.feed-item:hover, .event-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feed-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--blue); }
.feed-item.important .feed-dot { background: var(--gold); }
.feed-item-content, .event-copy { display: grid; gap: 4px; }
.feed-item strong, .event-copy strong { font-size: 13px; }
.feed-item-content span, .event-copy span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.feed-item time { color: var(--muted); font-size: 10px; white-space: nowrap; }

.event-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.event-card, .event-item { border: 1px solid var(--line); border-radius: 15px; color: var(--navy); background: var(--white); text-align: left; }
.event-card { padding: 14px; }
.date { display: inline-grid; min-width: 39px; padding: 6px 5px; place-items: center; border-radius: 9px; color: var(--white); background: var(--blue); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.event-card .event-copy { margin-top: 12px; }

.screen-heading { margin-bottom: 28px; }
.filter-row { display: flex; gap: 8px; margin-bottom: 18px; }
.filter { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-size: 11px; }
.filter.is-selected { color: var(--white); background: var(--navy); border-color: var(--navy); }
.feed-large .feed-item { padding: 18px; }
.event-list { display: grid; gap: 12px; }
.archive-heading { margin: 32px 0 13px; padding-top: 22px; border-top: 1px solid var(--line); }
.archive-heading h2 { margin: 0 0 4px; color: var(--muted); font-size: 17px; }
.archive-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.recent-feed { opacity: .68; }
.recent-feed .feed-item, .recent-feed .event-item { background: #fbfcfe; }
.event-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; padding: 13px; }
.event-item h3 { margin: 0 0 5px; font-size: 14px; }
.event-item .date { min-width: 54px; min-height: 54px; }
.event-item .date strong { display: block; font-size: 21px; line-height: 1; }
.event-arrow { color: var(--blue); font-size: 20px; }

.back-button { margin-bottom: 25px; padding: 9px 13px; border-radius: 999px; color: var(--blue); background: #e8f0ff; font-size: 11px; font-weight: 700; }
.detail-heading h1 { margin-bottom: 10px; font-size: clamp(2rem, 10vw, 3.2rem); letter-spacing: -.07em; line-height: .95; }
.detail-heading time { color: var(--muted); font-size: 11px; }
.detail-card { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.detail-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.source-link { display: inline-block; margin: 0 0 16px; color: var(--blue); font-size: 12px; font-weight: 700; }
.event-detail .date { margin-bottom: 16px; }
.event-detail .date strong { display: block; font-size: 22px; line-height: 1; }
.reminder-button { display: inline-block; margin: 4px 0 0; }
.content-state { padding: 25px 15px; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); font-size: 12px; text-align: center; }
.content-state.error { color: #a44b4b; border-color: #e6b9b9; }

.settings-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { margin-bottom: 5px; font-size: 13px; }
.setting-row small { color: var(--muted); font-size: 11px; }
.toggle { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; background: #dbe2eb; transition: .25s ease; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); transition: .25s ease; }
.toggle.is-on { background: var(--blue); }
.toggle.is-on::after { left: 21px; }

.bottom-nav { position: fixed; z-index: 10; bottom: 0; width: min(100%, 520px); display: grid; grid-template-columns: repeat(4, 1fr); padding: 10px 10px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.bottom-nav a { display: grid; justify-items: center; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 600; }
.bottom-nav a span { font-size: 19px; line-height: 1; }
.bottom-nav a.is-active { color: var(--blue); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.dark-mode {
  --paper: #101722;
  --white: #182231;
  --navy: #edf3fb;
  --muted: #aab8ca;
  --line: #2b3a4e;
  --shadow: 0 16px 40px rgba(0, 0, 0, .28);
}
.dark-mode .app-header,
.dark-mode .bottom-nav { background: rgba(24, 34, 49, .96); }
.dark-mode .notice-card { background: #0b1421; }
.dark-mode .notice-card h2,
.dark-mode .notice-card .card-label { color: #f5f8fc; }
.dark-mode .notice-card p { color: #d3deec; }
.dark-mode .section-heading h2,
.dark-mode .screen-heading h1,
.dark-mode .welcome h1,
.dark-mode .detail-heading h1,
.dark-mode .archive-heading h2 { color: #f5f8fc; }
.dark-mode .archive-heading { border-top-color: #3a4a60; }
.dark-mode .archive-heading p,
.dark-mode .recent-feed .feed-item-content span,
.dark-mode .recent-feed .event-copy span { color: #c4d0df; }
.dark-mode .recent-feed .feed-item,
.dark-mode .recent-feed .event-item { background: #1c2a3b; border-color: #405168; }
.dark-mode .feed-item strong,
.dark-mode .event-copy strong { color: #f0f5fb; }
.dark-mode .feed-item time,
.dark-mode .detail-heading time { color: #bdc9d8; }
.dark-mode .primary-button.is-enabled { background: #314765; }
.dark-mode .content-state.error { color: #f0a4a4; border-color: #704646; }
.demo-reminder { position: fixed; z-index: 20; right: 16px; bottom: 88px; left: 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; max-width: 488px; margin: 0 auto; padding: 15px; border: 1px solid #b5c9e8; border-radius: 17px; color: var(--navy); background: var(--white); box-shadow: 0 18px 42px rgba(23, 51, 93, .24); animation: notification-in .35s ease both; }
.demo-reminder.is-arrived { border-color: var(--gold); }
.demo-reminder-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--white); background: var(--blue); font-weight: 800; }
.demo-reminder.is-arrived .demo-reminder-icon { color: var(--navy); background: var(--gold); }
.demo-reminder-label, .demo-reminder strong, .demo-reminder p { display: block; }
.demo-reminder-label { margin-bottom: 4px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.demo-reminder strong { font-size: 13px; }
.demo-reminder p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.demo-reminder > button { color: var(--muted); background: transparent; font-size: 20px; line-height: 1; }
.dark-mode .demo-reminder { border-color: #516987; }
.dark-mode .demo-reminder strong { color: #f5f8fc; }
@keyframes notification-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 700px) { body { padding: 30px 0; } .app-shell { border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; } .bottom-nav { position: absolute; } }
