:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #192234;
  background: #f5f6f8;
  --muted: #526075;
  --line: #dfe3eb;
  --accent: #a4172b;
  --accent-bg: #fff1f3;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #2c69ae; outline-offset: 3px; }
.shell { width: min(100% - 48px, 1440px); margin-inline: auto; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner, .top-inner nav, .brand { display: flex; align-items: center; }
.top-inner { justify-content: space-between; gap: 12px; min-height: 66px; }
.brand { gap: 10px; text-decoration: none; white-space: nowrap; font-size: 1.1rem; font-weight: 750; }
.brand img { border-radius: 8px; object-fit: cover; }
.brand strong { color: var(--accent); }
.top-inner nav { gap: 4px; }
.top-inner nav a { padding: 10px 12px; border-radius: 7px; text-decoration: none; color: var(--muted); font-size: .88rem; font-weight: 650; }
.top-inner nav [aria-current] { color: var(--accent); background: var(--accent-bg); }
main { min-height: 65vh; padding-block: 36px 28px; }
.intro, .catalog-head, .workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.intro { margin-bottom: 25px; }
.breadcrumb { color: var(--muted); font-size: .84rem; text-underline-offset: 3px; }
h1 { margin: 9px 0 6px; font-size: clamp(1.8rem, 4vw, 2.85rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.13rem; letter-spacing: -.02em; }
.intro p, .workspace-head p, .panel p, .plan-card p { color: var(--muted); margin: 6px 0 0; }
.catalog-head { margin-bottom: 12px; }
.catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 12px; }
.plan-card, .panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.plan-card { padding: 15px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px; }
.plan-card h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.plan-card p { font-size: .85rem; line-height: 1.4; }
.plan-actions, .editor-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.pill { display: inline-block; color: #136044; background: #e8f5ed; font-size: .73rem; font-weight: 700; border-radius: 5px; padding: 2px 7px; margin-left: 5px; }
.pill.inactive { color: #526075; background: #eef0f3; }
.button { border: 1px solid transparent; border-radius: 8px; min-height: 40px; padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-weight: 680; font-size: .88rem; text-decoration: none; text-align: center; }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { color: #fff; background: var(--accent); }
.button.primary:hover { background: #861222; }
.button.secondary { color: #243149; background: #fff; border-color: #cfd6e2; }
.button.secondary:hover { background: #f6f8fb; }
.button:disabled { opacity: .55; cursor: wait; }
.immersive > .topbar, .immersive > .footer, .immersive > main > .intro { display: none; }
.immersive > main { width: 100%; padding: 0; }
.workspace { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #fff; }
.workspace-head { justify-content: flex-start; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.workspace-info { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.workspace-info h1 { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
.workspace-head p { margin: 2px 0 0; font-size: .82rem; }
#reader { flex: 1; min-height: 0; position: relative; }
#reader iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.reader-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); background: #fff; pointer-events: none; }
#cut-notice { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: 7px 16px; font-size: .84rem; }
.notice, .empty { color: #334058; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin: 0 0 14px; }
.notice.error { color: #971d30; border-color: #edbec6; background: var(--accent-bg); }
.empty { margin: 0; }
.panel { padding: 19px; }
.panel.login { max-width: 380px; }
.login label { margin: 14px 0 11px; }
.editor { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 15px; margin-top: 17px; max-width: 760px; }
.editor-title, .editor-file, .editor-calendar, .editor-actions, .form-status { grid-column: 1 / -1; }
.editor-calendar { display: grid; gap: 8px; padding-block: 12px; border-block: 1px solid var(--line); }
.editor-calendar label { max-width: 280px; }
.editor-calendar summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 650; }
.editor-calendar details label { margin-top: 8px; }
.panel label { display: grid; gap: 6px; color: #26334a; font-weight: 650; font-size: .91rem; }
.panel input:not([type="checkbox"]) { min-width: 0; width: 100%; min-height: 40px; padding: 8px 10px; background: #fff; border: 1px solid #cfd6e2; border-radius: 7px; color: inherit; }
.panel label.check { display: flex; align-items: center; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.panel small, .form-status { color: var(--muted); font-weight: 400; }
.form-status.error { color: #971d30; }
.footer { color: var(--muted); padding-block: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; border-top: 1px solid var(--line); font-size: .8rem; }
@media (max-width: 600px) {
  .shell { width: calc(100% - 28px); }
  main { padding-top: 22px; }
  .top-inner nav a { padding: 8px 6px; font-size: .81rem; }
  .intro { align-items: flex-start; flex-direction: column; }
  .workspace-head { flex-wrap: wrap; justify-content: space-between; column-gap: 6px; row-gap: 5px; padding: 7px 10px; }
  .workspace-info { order: 1; flex-basis: 100%; }
  .workspace-head .button { min-height: 42px; padding-inline: 8px; font-size: .82rem; }
  .workspace-head .button svg { width: 15px; height: 15px; }
  .workspace-info h1 { font-size: .92rem; }
  .workspace-head p { font-size: .78rem; }
  .editor { grid-template-columns: 1fr; }
}
