/* LearnFutura's "fridge door" interface theme. Worksheet and print styles stay
   independent: nothing here touches worksheet text, letter, or syllable colours. */
/* Fonts are hosted with the site (SIL Open Font License, see /fonts/). */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../../../fonts/fredoka-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../../../fonts/fredoka-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../../../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../../../fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Gaegu";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../../fonts/gaegu-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Gaegu";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../../fonts/gaegu-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@media screen {
  :root {
    --lf-kitchen: #d9e4ec; --lf-enamel: #f7f8f6; --lf-ink: #24306b; --lf-muted: #56628a; --lf-line: #d6dcea; --lf-pen: #3550d8;
    --lf-red: #ef4b4b; --lf-orange: #ff9b2f; --lf-yellow: #ffd23f; --lf-green: #3fb67e; --lf-blue: #3a7bf2; --lf-violet: #8a5cf0; --lf-pink: #ff6fae;
    --lf-display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
    --lf-hand: "Gaegu", "Chalkboard SE", "Comic Sans MS", cursive;
    --lf-paper: 0 1px 0 #0000000d, 0 16px 22px -16px #1a2b4a88;
  }
  * { box-sizing: border-box; }
  body { background-color: var(--lf-kitchen); background-image: linear-gradient(90deg, #ffffff40 1px, transparent 1px), linear-gradient(#ffffff40 1px, transparent 1px); background-size: 64px 64px; color: var(--lf-ink); font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif; }

  /* The fridge door */
  .lf-page { position: relative; display: block; max-width: 1600px; margin: 28px auto 0; padding: 30px 40px 50px 88px; border-radius: 34px 34px 0 0; background: linear-gradient(100deg, #fff 0%, var(--lf-enamel) 40%, #eceeed 100%); box-shadow: inset -10px 0 30px #00000010, inset 0 2px 0 #fff, 0 30px 60px -30px #1a2b4a66, 0 0 0 1px #d5d9db; }
  .lf-handle { position: absolute; left: 30px; top: 70px; width: 20px; height: 300px; border-radius: 10px; background: linear-gradient(90deg, #c9ced2, #f4f6f7 40%, #aeb4b9); box-shadow: 3px 6px 10px #0002; }
  .lf-site-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
  .lf-logo { display: inline-flex; gap: 1px; text-decoration: none; }
  .lf-logo span { display: inline-block; font-family: var(--lf-display); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--c); transform: rotate(var(--r)); text-shadow: 1px 3px 0 color-mix(in srgb, var(--c) 70%, black); }
  .lf-site-header nav { display: flex; gap: 8px; flex-wrap: wrap; }
  .lf-site-header nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; background: #fff; color: var(--lf-ink); font-weight: 800; font-size: .9rem; text-decoration: none; box-shadow: 0 3px 0 #d3d8dc, 0 6px 10px -4px #0003; }
  .lf-site-header nav a::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
  .lf-site-header nav a:hover { transform: translateY(-2px); }
  .lf-site-header nav .active { background: var(--c); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 65%, black); }
  .lf-site-header nav .active::before { background: #fff; }
  .lf-crumbs { margin: 18px 0 0; font-family: var(--lf-hand); font-size: 1.2rem; color: var(--lf-muted); }
  .lf-crumbs a { color: inherit; text-decoration: underline wavy var(--lf-pen); text-underline-offset: 5px; }
  .lf-header { padding: 18px 0 30px; }
  .lf-eyebrow { font-family: var(--lf-hand); font-size: 1.35rem; font-weight: 700; color: var(--lf-pen); }
  .lf-header h1 { font-family: var(--lf-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; margin: 6px 0 12px; }
  .lf-header p { max-width: 760px; font-size: 1.02rem; line-height: 1.7; color: var(--lf-muted); margin: 0; }
  .lf-footer { text-align: center; padding: 26px 16px 40px; font-family: var(--lf-hand); font-size: 1.4rem; color: #5b6890; }

  /* Settings: a sheet of paper on the door */
  .app-shell { padding: 0; gap: 28px; }
  .app-sidebar { flex: 0 0 320px; padding: 22px; border: 0; border-radius: 6px; background: #fffefa; box-shadow: var(--lf-paper); top: 20px; max-height: calc(100dvh - 40px); scrollbar-width: thin; }
  .lf-control-title { font-family: var(--lf-display); font-weight: 700; font-size: 1.35rem; margin: 0 0 16px; }
  .app-sidebar label { font-size: .9rem; font-weight: 700; color: var(--lf-ink); margin-top: 16px; margin-bottom: 7px; }
  .app-sidebar input:not([type='checkbox']), .app-sidebar select, #own-text-panel textarea { width: 100%; border: 2px solid var(--lf-line); border-radius: 10px; padding: 10px; font: inherit; font-size: .9rem; color: var(--lf-ink); background: white; }
  .app-sidebar input:focus, .app-sidebar select:focus, #own-text-panel textarea:focus { border-color: var(--lf-pen); }
  .app-sidebar input[type='file'] { font-size: .8rem; overflow: hidden; }
  .app-sidebar input::file-selector-button { background: #eef1f7; border: 0; border-radius: 999px; padding: 6px 10px; color: var(--lf-pen); margin-right: 8px; font: inherit; font-weight: 700; }
  .app-sidebar input[type='checkbox'] { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--lf-pen); }
  .app-sidebar button { background: #fff; color: var(--lf-ink); border: 2px solid var(--lf-line); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: .88rem; font-weight: 700; }
  .app-sidebar button:hover:enabled { border-color: var(--lf-pen); color: var(--lf-pen); }
  .app-sidebar #btn-create, .app-sidebar #btn-print { background: var(--lf-pen); color: white; border-color: var(--lf-pen); padding: 12px; box-shadow: 0 4px 0 #2235a0; }
  .app-sidebar #btn-create:hover, .app-sidebar #btn-print:hover:enabled { color: white; transform: translateY(2px); box-shadow: 0 2px 0 #2235a0; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--lf-pen); outline-offset: 3px; }
  .settings-panel { margin-top: 15px; padding: 13px; border: 2px dashed var(--lf-line); border-radius: 10px; background: #fff; }
  .settings-panel summary { font-size: .9rem; font-weight: 700; line-height: 1.6; color: var(--lf-ink); }
  .settings-panel[open] summary { margin-bottom: 14px; color: var(--lf-pen); }
  .panel-heading { font-size: .875rem; }
  .candidate-count, .storage-status, .cloze-status, #packet-list, .fit-notices, .fit-indicator, .preview-hint { font-size: .8rem; line-height: 1.65; }
  .candidate-count { color: var(--lf-muted); margin: 8px 0; }
  .sidebar-actions { bottom: -22px; margin: 22px -22px -22px; padding: 14px 22px 22px; border-top: 2px dashed var(--lf-line); background: #fffefa; }

  /* Preview: the worksheet lies on a soft tray */
  .preview-scroll { min-width: 0; overflow: hidden; padding: 22px 16px 26px; border: 0; border-radius: 6px; background: #e7edf3; box-shadow: inset 0 2px 8px #1a2b4a14; }
  .lf-preview-label { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; margin-bottom: 22px; font-family: var(--lf-hand); font-size: 1.15rem; color: var(--lf-muted); }
  .lf-preview-label strong { font-family: var(--lf-display); font-size: 1.15rem; color: var(--lf-ink); }
  .page-frame { box-shadow: 0 1px 0 #0000000d, 0 16px 26px -14px #1a2b4a77; }
  .preview-hint { border-radius: 8px; }
  .fit-notices { background: #fff6cc; color: #3a3420; }
  #preview.is-picking .ws-sentence [data-w]:hover { background: rgba(53, 80, 216, .12); }
  #preview.is-picking .ws-sentence [data-w]:focus-visible { outline-color: var(--lf-pen); }
  .lf-export-note { background: #fff6cc; color: #4a4020; padding: 10px; font-size: .8rem; line-height: 1.65; border-radius: 8px; }
  .cloze-row { flex-wrap: wrap; }
  .cloze-row button { flex-basis: 100%; }
  .cloze-row input[type='number'] { width: 5em; }
  #packet-list li { flex-wrap: wrap; }
  #packet-list li button { min-width: 30px; min-height: 30px; }
  [hidden] { display: none !important; }

  @media (max-width: 1200px) { .lf-page { padding: 26px 24px 40px 76px; } .app-shell { gap: 18px; } .app-sidebar { flex-basis: 290px; padding: 18px; } .sidebar-actions { margin: 18px -18px -18px; bottom: -18px; padding: 12px 18px 18px; } }
  @media (max-width: 650px) {
    .lf-page { margin: 10px 8px 0; padding: 24px 14px 36px 38px; border-radius: 24px 24px 0 0; }
    .lf-handle { left: 10px; width: 14px; height: 200px; }
    .lf-logo span { font-size: 1.6rem; }
    .app-shell { flex-direction: column; }
    .app-sidebar { flex: auto; width: 100%; position: static; max-height: none; overflow: visible; }
    .sidebar-actions { position: static; max-height: none; }
    .preview-scroll { width: 100%; padding: 18px 12px; }
    .lf-preview-label { flex-wrap: wrap; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
}
