@font-face { font-family: "DM Sans"; src: url("./dm-sans.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Libre Caslon Display"; src: url("./libre-caslon-display.ttf") format("truetype"); font-display: swap; }
:root {
  color: #25314a; background: #f7f9ff;
  font-family: "DM Sans", system-ui, sans-serif;
  --serif: "Libre Caslon Display", Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
header, main { max-width: 1140px; margin-inline: auto; padding-inline: 48px; }
header { height: 100px; display: flex; align-items: center; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; border: 0; }
button:focus-visible, a:focus-visible, .feed:focus-visible { outline: 3px solid #6488ed; outline-offset: 4px; }
.wordmark { display: inline-flex; gap: 9px; align-items: center; color: #202b42; text-decoration: none; font-size: 29px; font-weight: 700; letter-spacing: -1.6px; }
main { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,510px); gap: clamp(40px,7vw,100px); padding-bottom: 28px; }
.intro { align-self: start; padding-top: clamp(80px,16vh,146px); }
h1, h2, p { margin: 0; }
h1 { font: 400 clamp(48px,5.2vw,70px)/1.05 var(--serif); letter-spacing: -.03em; }
.intro p { margin-top: 16px; color: #65728a; font-size: 16px; line-height: 1.6; max-width: 29ch; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 7px 13px; color: #626f88; font-size: 14px; }
.filter { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; background: white; border: 1px solid #e2e7f1; padding: 8px 14px; color: #42526d; border-radius: 24px; font-size: 13px; }
.filter:hover { background: #edf2fd; }
.filter svg { width: 16px; height: 16px; }
.filter b { color: #3265e8; }
.feed { height: clamp(310px,calc(100dvh - 195px),610px); border-radius: 30px; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: thin; }
.card { min-height: 100%; background: #fff; border: 1px solid #e5eaf4; border-radius: 30px; padding: 28px 32px; }
.empty { display: grid; justify-items: center; align-content: center; gap: 12px; text-align: center; }
.spark { color: #7698e5; font: 56px/1 Georgia, serif; }
.empty h2 { font: 400 clamp(32px,3vw,40px)/1.15 var(--serif); letter-spacing: -.02em; }
.question { display: flex; flex-direction: column; scroll-snap-align: start; scroll-snap-stop: always; }
.question h2 { margin-block: auto; padding-block: 28px; font: 400 clamp(22px,2.2vw,30px)/1.55 Georgia, serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.topic-label { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.topic-label .topic-symbol { display: inline-grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; color: var(--topic); background: color-mix(in srgb,var(--topic) 11%,white); font: 25px Georgia,serif; }
dialog { width: min(490px,calc(100% - 32px)); padding: 0; border: 0; border-radius: 28px; color: #26334c; max-height: 90dvh; box-shadow: 0 30px 100px #18264722; overscroll-behavior: contain; }
dialog::backdrop { background: #1b2c4d50; backdrop-filter: blur(5px); }
.sheet { position: relative; padding: 36px 32px 30px; }
.close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-content: center; background: #f4f6fa; border-radius: 50%; font: 23px/1 system-ui, sans-serif; }
.close:hover { background: #e8edf5; }
.sheet h2 { margin: 3px 35px 0 0; font: 400 40px/1.15 var(--serif); letter-spacing: -.025em; }
.sheet h3 { font-size: 14px; margin: 25px 0 11px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 42px; padding: 8px 13px; border-radius: 13px; background: #f5f7fb; font-size: 13px; border: 1px solid transparent; }
.option:hover { background: #edf1f9; }
.option[aria-pressed="true"] { color: #315ed0; background: #e7eeff; border-color: #acc2fb; }
.option .topic-symbol { font: 20px/1 Georgia,serif; }
.section-heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin: 22px 0 10px; }
.sheet .section-heading h3 { margin: 0; }
.section-heading span, .course-group h4 { color: #64728a; font-size: 12px; }
.level-options { display: flex; gap: 6px; }
.level-options .option { flex: 1 1 0; min-width: 0; padding-inline: 3px; font-variant-numeric: tabular-nums; }
.inline-reset, .more-courses { font-size: 13px; padding: 6px 2px; background: transparent; color: #385e9c; }
.more-courses { margin-top: 4px; min-height: 36px; }
.course-group + .course-group { margin-top: 14px; }
.course-group h4 { margin: 0 0 8px; }
.course-options { gap: 6px; }
.course-options .option { min-height: 36px; border-radius: 12px; padding: 7px 11px; text-align: start; }
#filter-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
#filter-dialog .sheet { width: 100%; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 4px; }
.filter-footer { flex-shrink: 0; padding: 16px 32px 24px; }
.filter-footer .done { margin: 0; }
.upload-levels { padding: 0; border: 0; margin: 18px 0 0; }
.upload-levels legend { font-size: 14px; font-weight: 600; padding: 0 0 7px; }
.level-radio { cursor: pointer; position: relative; }
.level-radio input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.level-radio:has(input:checked) { color: #315ed0; background: #e7eeff; border-color: #acc2fb; }
.level-radio:has(input:focus-visible) { outline: 3px solid #6488ed; outline-offset: 2px; }
.done { width: 100%; margin-top: 28px; background: #26334c; color: white; min-height: 50px; border-radius: 16px; font-size: 14px; }
.done:hover { background: #344967; }
.handle { display: none; }
header { justify-content: space-between; }
[hidden] { display: none !important; }
.profile-icon { width: 43px; height: 43px; display: grid; place-items: center; background: white; border: 1px solid #e2e7f1; border-radius: 50%; }
.profile-icon:hover, .menu-item:hover { background: #edf2fd; }
.field { display: grid; gap: 7px; font-size: 14px; font-weight: 600; margin: 18px 0 0; }
select, textarea, input[type=file] { width: 100%; min-width: 0; border: 1px solid #d7deea; color: #26334c; border-radius: 11px; background: white; font: 400 16px "DM Sans",sans-serif; padding: 9px 11px; }
textarea { resize: vertical; }
.menu-item { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 15px 12px; background: #f4f6fb; border-radius: 12px; margin-top: 9px; text-align: left; }
.menu-item span { color: #61718c; }
.muted, .small, .notice, details { line-height: 1.5; font-size: 14px; color: #596882; }
.muted { margin: 13px 0 18px; overflow-wrap: anywhere; }
.small { font-size: 13px; margin-bottom: 3px; }
.text-action { display: inline-block; padding: 10px 0; margin-top: 4px; color: #305fa9; background: transparent; font-size: 14px; }
details { margin-top: 8px; } summary { cursor: pointer; }
#course-guide p { margin-top: 14px; }
.notice:not(:empty) { margin-top: 15px; }
.upload-review p { margin-top: 8px; padding: 10px; background: #f4f6fb; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.upload-review small { color: #62708a; text-transform: capitalize; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: #606d82; font-size: 13px; }
.bookmark, .page-more { background: #edf2fd; border-radius: 12px; color: #325c9b; padding: 10px 14px; font-size: 13px; }
.bookmark[aria-pressed=true] { background: #dce8ff; }
.page-more { display: block; margin: 16px auto; scroll-snap-align: end; }
button:disabled { opacity: .55; cursor: default; }
#toast:not(:empty) { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); color: white; background: #26334c; border-radius: 12px; padding: 10px 14px; max-width: 88vw; font-size: 14px; }
@media (max-width: 760px) {
  header, main { max-width: 530px; padding-inline: 18px; }
  header { height: 74px; }
  main { display: block; padding-bottom: max(18px,env(safe-area-inset-bottom)); }
  .wordmark { font-size: 26px; } .wordmark img { width: 29px; height: 29px; }
  .intro { padding: 8px 5px 23px; }
  h1 { font-size: 43px; }
  .intro p { margin-top: 5px; font-size: 14px; max-width: none; }
  .toolbar { font-size: 13px; padding: 0 5px 10px; }
  .feed { height: clamp(255px,calc(100dvh - 258px),600px); border-radius: 26px; }
  .card { padding: 24px; border-radius: 26px; }
  dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet { max-width: 520px; margin: auto; padding: 12px 24px max(24px,env(safe-area-inset-bottom)); }
  .handle { display: block; width: 35px; height: 4px; border-radius: 4px; background: #dce1eb; margin: 0 auto 22px; }
  .close { top: 21px; } .sheet h2 { font-size: 36px; }
  .filter-footer { width: min(100%,520px); margin-inline: auto; padding: 12px 24px max(16px,env(safe-area-inset-bottom)); }
}
