:root {
  color-scheme: light;
  --ink: #212720;
  --ink-soft: #596057;
  --muted: #696e64;
  --paper: #f7f5f0;
  --paper-deep: #efede5;
  --white: #fffefa;
  --line: #ddded5;
  --green: #284f3e;
  --green-dark: #1b3b2d;
  --lime: #d9e17a;
  --orange: #d67849;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", Arial, sans-serif;
  --mono: Consolas, "Courier New", monospace;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.hidden { display: none !important; }

.announcement {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #edf1da;
  background: var(--green-dark);
  font: 10px var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.announcement-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }

.site-header {
  height: 82px;
  padding: 0 clamp(24px, 6.2vw, 96px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(56, 68, 56, .11);
  background: rgba(247, 245, 240, .95);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; color: var(--green); }
.brand-mark svg { width: 34px; height: 34px; stroke: currentColor; stroke-width: 1.55; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: -.035em; }
.brand-copy > span { color: var(--muted); font: 8px var(--mono); letter-spacing: .28em; }
.main-nav { display: flex; align-items: center; gap: clamp(25px, 4vw, 58px); margin-left: 40px; }
.nav-link { position: relative; padding: 8px 0; color: var(--ink-soft); font-size: 12px; }
.nav-link::after { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: var(--green); content: ""; transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.button {
  min-height: 45px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 21px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .text-button:focus-visible, .dialog-close:focus-visible, input:focus-visible, textarea:focus-visible, .menu-button:focus-visible { outline: 3px solid #96a873; outline-offset: 3px; }
.button-dark { color: var(--white); background: var(--green); }
.button-dark:hover { background: var(--green-dark); }
.button-dark > span { color: var(--lime); font-size: 16px; }
.button-quiet { min-height: 38px; padding: 0 15px; border-color: var(--line); color: var(--ink); background: transparent; }
.button-quiet:hover, .button-outline:hover { border-color: var(--green); color: var(--green); background: #f2f3e9; }
.button-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.menu-button { display: none; padding: 8px; border: 0; background: none; cursor: pointer; }
.menu-button span { display: block; width: 21px; height: 1px; margin: 5px 0; background: var(--ink); }

.hero {
  min-height: 540px;
  padding: 72px clamp(24px, 10vw, 150px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .75fr);
  align-items: center;
  gap: clamp(45px, 8vw, 120px);
  background: var(--paper);
}
.hero-copy { max-width: 660px; }
.eyebrow { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--green); font: 9px var(--mono); letter-spacing: .16em; }
.eyebrow-line { width: 23px; height: 1px; background: var(--orange); }
.hero h1 { max-width: 650px; margin: 24px 0 19px; font-family: var(--serif); font-size: clamp(48px, 5.1vw, 70px); font-weight: 500; letter-spacing: -.055em; line-height: 1.06; }
.hero h1 em, h2 em { color: var(--green); font-weight: 500; }
.hero-description { max-width: 430px; margin: 0 0 28px; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.hero-copy > .button { min-width: 195px; }
.hero-note { max-width: 350px; margin-top: 37px; display: flex; align-items: center; gap: 12px; color: #62675d; font-size: 11px; line-height: 1.55; }
.note-index { color: var(--orange); font: 10px var(--mono); }
.hero-feature { max-width: 440px; padding: 8px 0 8px clamp(24px, 4vw, 58px); border-left: 1px solid #cfd4c8; }
.hero-feature h2 { max-width: 360px; margin: 22px 0 12px; font: 500 clamp(27px, 3vw, 37px)/1.17 var(--serif); letter-spacing: -.035em; }
.hero-feature > p:not(.eyebrow) { max-width: 345px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.hero-steps { margin: 29px 0 0; padding: 0; list-style: none; }
.hero-steps li { padding: 11px 0; display: flex; align-items: center; gap: 14px; border-top: 1px solid #e1e1d9; color: var(--ink-soft); font-size: 11px; }
.hero-steps li span { color: var(--green); font: 9px var(--mono); }
.hero-steps li strong { font-weight: 600; }

.library-section { padding: 83px clamp(24px, 9.7vw, 148px) 57px; background: var(--white); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.section-heading h2, .about-section h2 { margin: 17px 0 0; font-family: var(--serif); font-size: clamp(34px, 4.1vw, 53px); font-weight: 500; letter-spacing: -.055em; line-height: 1.13; }
.section-aside { margin: 0 1px 6px 0; color: var(--muted); font: 9px/1.7 var(--mono); letter-spacing: .02em; text-align: right; }
.catalog-toolbar { margin: 33px 0 22px; padding-bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.search-field { width: min(340px, 100%); height: 39px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #e7e7df; border-radius: 3px; background: #fff; }
.search-icon { position: relative; width: 13px; height: 13px; border: 1.5px solid #80877b; border-radius: 50%; }
.search-icon::after { position: absolute; right: -4px; bottom: -2px; width: 5px; height: 1.5px; background: #80877b; content: ""; transform: rotate(45deg); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search-field input::placeholder { color: #696e64; }
.catalog-count { color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 21px; }
.book-card { min-width: 0; }
.book-cover-wrap { position: relative; height: clamp(180px, 23vw, 285px); margin-bottom: 15px; display: grid; place-items: center; overflow: hidden; background: #f0efe9; }
.book-cover-trigger { width: 100%; height: 100%; padding: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.book-cover-trigger:focus-visible { outline: 3px solid #6e8362; outline-offset: -4px; }
.book-cover-image { width: 67%; height: 88%; object-fit: contain; box-shadow: 0 8px 19px rgba(30, 37, 30, .16); transition: transform .2s ease, box-shadow .2s ease; }
.book-card:hover .book-cover-image, .book-cover-trigger:focus-visible .book-cover-image { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(30, 37, 30, .21); }
.book-cover-placeholder { width: 61%; height: 79%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 1px solid #d8ddd3; color: var(--green); background: linear-gradient(145deg, #f5f5ef, #e5e9df); box-shadow: 0 8px 19px rgba(30, 37, 30, .11); transition: transform .2s ease; }
.book-card:hover .book-cover-placeholder, .book-cover-trigger:focus-visible .book-cover-placeholder { transform: translateY(-3px); }
.book-cover-initials { font: 500 clamp(30px, 4vw, 48px)/1 var(--serif); letter-spacing: -.05em; }
.book-cover-caption { color: #6a756a; font: 7px var(--mono); letter-spacing: .14em; }
.book-meta { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.book-title { max-width: 80%; margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.book-price { padding-top: 2px; color: var(--green); font-size: 12px; font-weight: 600; white-space: nowrap; }
.book-description { min-height: 39px; margin: 8px 0 12px; display: -webkit-box; overflow: hidden; color: #62675d; font-size: 12px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.book-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.book-buy { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #dce3d8; color: var(--green); background: #f2f5ef; cursor: pointer; font-size: 11px; font-weight: 600; transition: background .15s ease; }
.book-buy:hover { background: #e1e8d7; }
.book-buy span { font-size: 13px; }
.sample-link { min-height: 31px; padding: 0 2px; border: 0; color: #59665b; background: transparent; cursor: pointer; font-size: 11px; font-weight: 600; text-decoration: underline; text-decoration-color: #c8c9bf; text-underline-offset: 4px; }
.sample-link:hover { color: var(--green); }
.sample-link:disabled { opacity: .55; cursor: wait; }
.inline-status { min-height: 0; color: #666d60; font-size: 11px; }
.inline-status:not(:empty) { margin: -10px 0 18px; }
.inline-status.error, .form-status.error { color: #aa4938; }
.empty-state { padding: 65px 20px; text-align: center; }
.empty-icon { color: var(--orange); font-size: 28px; }
.empty-state h3 { margin: 14px 0 6px; font: 500 23px var(--serif); }
.empty-state p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.catalog-footer { margin-top: 46px; padding-top: 16px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #62675d; font: 8px var(--mono); letter-spacing: .1em; }
.catalog-footer span span { color: var(--orange); font-size: 13px; }

.about-section { min-height: 285px; padding: 58px clamp(24px, 14vw, 215px); display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 21px; background: #e9eddf; }
.about-mark { align-self: start; color: #a4b18d; font: 110px/.8 var(--serif); }
.about-section .eyebrow { color: #62675d; }
.about-section h2 { margin-top: 13px; font-size: clamp(31px, 3.7vw, 45px); }
.about-copy { max-width: 555px; margin: 14px 0 0; color: #697164; font-size: 11px; line-height: 1.75; }
.site-footer { min-height: 82px; padding: 15px clamp(24px, 6.2vw, 96px); display: flex; align-items: center; justify-content: space-between; gap: 15px; background: var(--paper); }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-brand .brand-mark svg { width: 29px; height: 29px; }
.footer-brand .brand-copy strong { font-size: 14px; }
.footer-brand .brand-copy > span { font-size: 7px; }
.footer-note, .footer-copyright { color: #62675d; font: 8px var(--mono); letter-spacing: .1em; }

.dialog { width: min(520px, calc(100% - 28px)); max-height: min(90vh, 850px); padding: 0; border: 1px solid #e2e1d8; border-radius: 4px; color: var(--ink); background: var(--white); box-shadow: 0 24px 80px rgba(28, 39, 29, .2); }
.dialog::backdrop { background: rgba(22, 34, 26, .56); backdrop-filter: blur(3px); }
.dialog.dialog-fallback-open { position: fixed; z-index: 20; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 20px; display: grid; place-items: center; border: 0; border-radius: 0; background: rgba(22, 34, 26, .56); }
.dialog.dialog-fallback-open > .dialog-inner { width: min(520px, 100%); max-height: 90vh; border: 1px solid #e2e1d8; border-radius: 4px; background: var(--white); box-shadow: 0 24px 80px rgba(28, 39, 29, .2); }
.dialog.admin-dialog.dialog-fallback-open > .dialog-inner { width: min(900px, 100%); }
.dialog.book-detail-dialog.dialog-fallback-open > .dialog-inner { width: min(960px, 100%); }
.dialog-inner { position: relative; padding: 41px clamp(23px, 6vw, 48px) 43px; overflow-y: auto; }
.dialog-close { position: absolute; top: 15px; right: 17px; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: #687063; background: transparent; cursor: pointer; font-size: 21px; line-height: 1; }
.dialog h2 { margin: 15px 0 7px; font: 500 39px/1.1 var(--serif); letter-spacing: -.05em; }
.dialog-intro { margin: 0 0 22px; color: #62675d; font-size: 11px; line-height: 1.65; }
.auth-tabs { margin-bottom: 19px; display: flex; border-bottom: 1px solid var(--line); }
.auth-tab { position: relative; padding: 11px 16px 11px 0; border: 0; color: #696e64; background: none; cursor: pointer; font-size: 10px; }
.auth-tab + .auth-tab { margin-left: 18px; }
.auth-tab.active { color: var(--green); font-weight: 700; }
.auth-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--green); content: ""; }
.auth-form, .book-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label, .book-form label, .resend-form label { display: flex; flex-direction: column; gap: 7px; color: #545d51; font-size: 10px; font-weight: 600; }
.auth-form input, .book-form input:not([type="checkbox"]), .book-form textarea, .resend-form input { width: 100%; min-height: 41px; padding: 10px 12px; border: 1px solid #dedfd6; border-radius: 2px; outline: none; color: var(--ink); background: #fff; font-size: 11px; font-weight: 400; }
.book-form textarea { min-height: 70px; resize: vertical; }
.auth-form input:focus, .book-form input:focus, .book-form textarea:focus, .resend-form input:focus { border-color: #8b9c7b; }
.form-submit { width: 100%; margin-top: 4px; }
.form-footnote, .label-note { color: #62675d; font-size: 9px; font-weight: 400; line-height: 1.55; }
.form-status { min-height: 0; margin-top: 10px; color: var(--green); font-size: 11px; line-height: 1.6; }
.resend-form { margin-top: 14px; padding-top: 15px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); }
.resend-form .button { align-self: flex-start; }
.account-profile { margin: 23px 0; padding: 18px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); background: #faf9f4; }
.phone-form { margin-bottom: 20px; }
.profile-avatar { width: 43px; height: 43px; border-radius: 50%; display: grid; place-items: center; color: var(--green); background: #e5ebdc; font: 18px var(--serif); }
.profile-copy { display: flex; flex-direction: column; gap: 5px; }
.profile-copy strong { font: 500 16px var(--serif); }
.profile-copy span { color: #62675d; font-size: 10px; }
.profile-badge { margin-left: auto; padding: 5px 8px; border-radius: 2px; color: #62675d; background: #edede7; font: 8px var(--mono); text-transform: uppercase; }
.profile-badge.verified { color: var(--green); background: #e8efe3; }
.account-actions { display: flex; gap: 10px; }
.admin-dialog { width: min(900px, calc(100% - 24px)); }
.owned-books-section { margin: 20px 0; }
.owned-books-list { display: flex; flex-direction: column; gap: 8px; }
.owned-book-row { padding: 11px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); color: #596257; font-size: 11px; }
.owned-book-row strong { font-family: var(--serif); font-size: 14px; font-weight: 500; }
.admin-dialog .dialog-inner { padding-right: clamp(20px, 4vw, 44px); padding-left: clamp(20px, 4vw, 44px); }
.admin-metrics { margin: 23px 0 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.admin-metric { min-height: 84px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; border: 1px solid var(--line); background: #faf9f4; }
.admin-metric strong { color: var(--green); font: 500 25px/1 var(--serif); }
.admin-metric span { color: #62675d; font: 8px/1.35 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.admin-loading { grid-column: 1 / -1; color: #62675d; font-size: 11px; }
.book-form { margin-top: 26px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); background: #fbfaf6; }
.form-heading, .admin-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-heading strong { font: 500 18px var(--serif); }
.text-button { padding: 6px 0; border: 0; color: var(--green); background: none; cursor: pointer; font-size: 10px; text-decoration: underline; text-decoration-color: #c4cbbb; text-underline-offset: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid input[type="file"] { padding: 7px 9px; font-size: 9px; }
.form-grid input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 10px; border: 1px solid var(--line); color: var(--green); background: #f7f7f1; cursor: pointer; }
.form-grid input[type="checkbox"] { accent-color: var(--green); }
.form-grid .checkbox-label { flex-direction: row; align-items: center; align-self: end; gap: 9px; min-height: 41px; font-weight: 500; }
.form-grid .checkbox-label input { width: 14px; height: 14px; }
.form-span { grid-column: 1 / -1; }
.upload-progress { margin-top: 5px; padding: 15px; border: 1px solid #dfe3d9; background: #f4f6f0; }
.upload-progress-copy { display: flex; justify-content: space-between; gap: 12px; color: var(--green); font-size: 11px; font-weight: 600; }
.upload-progress progress { width: 100%; height: 8px; margin: 12px 0 4px; accent-color: var(--green); }
.upload-progress p { margin: 6px 0 0; color: #62675d; font-size: 10px; line-height: 1.5; }
.admin-list-heading { margin: 29px 0 12px; }
.admin-list-heading h3 { margin: 0; font: 500 21px var(--serif); }
.admin-books-list { display: flex; flex-direction: column; }
.admin-book-row { padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); }
.admin-book-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.admin-book-info strong { overflow: hidden; font: 500 14px var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.admin-book-info span { color: #62675d; font: 8px var(--mono); }
.admin-book-flags { display: flex; gap: 7px; color: #62675d; font: 8px var(--mono); }
.admin-book-row .button { min-height: 31px; padding: 0 11px; font-size: 9px; }
.admin-book-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.admin-mocktests-section { margin-top: 30px; padding-top: 5px; border-top: 1px solid var(--line); }
.mocktest-group-form { display: flex; align-items: end; gap: 12px; }
.mocktest-group-form label { flex: 1; display: flex; flex-direction: column; gap: 7px; color: #545d51; font-size: 10px; font-weight: 600; }
.mocktest-group-form select, .mocktest-editor input, .mocktest-editor textarea { width: 100%; min-height: 41px; padding: 10px 12px; border: 1px solid #dedfd6; border-radius: 2px; color: var(--ink); background: #fff; font: 12px var(--sans); }
.mocktest-page { min-height: 65vh; padding: 50px clamp(20px, 8vw, 110px) 72px; background: var(--white); }
.mocktest-page-heading { max-width: 1000px; margin: 0 auto 25px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mocktest-page-content { max-width: 1000px; margin: 0 auto; }
#mocktest-page-content { max-width: 1000px; margin: 0 auto; }
.mocktest-page h1 { margin: 12px 0 8px; font: 500 clamp(30px, 5vw, 48px)/1.1 var(--serif); letter-spacing: -.04em; overflow-wrap: anywhere; }
.mocktest-page h2 { font: 500 26px/1.2 var(--serif); }
.mocktest-page-intro, .mocktest-muted { color: #62675d; font-size: 13px; line-height: 1.65; }
.mocktest-id { display: inline-flex; max-width: 100%; padding: 9px 12px; overflow-wrap: anywhere; border: 1px solid var(--line); color: var(--green); background: #faf9f4; font: 10px/1.5 var(--mono); user-select: all; }
.mocktest-list, .mocktest-test-list { margin-top: 20px; display: grid; gap: 12px; }
.mocktest-group-card, .mocktest-test-card, .mocktest-question-card { min-width: 0; padding: clamp(15px, 3vw, 24px); border: 1px solid var(--line); background: #fbfaf6; }
.mocktest-group-card h2, .mocktest-test-card h2 { margin: 0 0 8px; }
.mocktest-group-meta, .mocktest-test-meta { margin: 8px 0 14px; color: #62675d; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.mocktest-attempt-history { margin-top: 14px; display: grid; gap: 7px; }
.mocktest-history-row { padding-top: 8px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: #62675d; font-size: 10px; }
.mocktest-action-row { display: flex; flex-wrap: wrap; gap: 9px; }
.mocktest-result { margin: 20px 0; padding: 18px; border: 1px solid #dfe3d9; color: var(--green); background: #f4f6f0; font: 500 22px var(--serif); }
.mocktest-attempt-form { display: grid; gap: 14px; }
.mocktest-question { min-width: 0; margin: 0; padding: clamp(15px, 3vw, 23px); border: 1px solid var(--line); background: #fbfaf6; }
.mocktest-question legend { max-width: 100%; padding: 0 7px; font: 500 17px/1.45 var(--serif); overflow-wrap: anywhere; }
.mocktest-option { min-height: 44px; margin-top: 8px; padding: 10px 12px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid #e3e3dc; background: var(--white); color: #454d43; font-size: 13px; line-height: 1.5; cursor: pointer; }
.mocktest-option input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--green); }
.mocktest-editor { display: grid; gap: 15px; }
.mocktest-editor label { display: grid; gap: 7px; color: #545d51; font-size: 11px; font-weight: 600; }
.mocktest-editor textarea { min-height: 76px; resize: vertical; }
.mocktest-question-card { display: grid; gap: 12px; }
.mocktest-question-card > legend { padding: 0 7px; color: var(--ink); font: 500 17px var(--serif); }
.mocktest-question-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mocktest-option-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 9px; align-items: center; }
.mocktest-option-editor label { min-height: 41px; padding: 9px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--white); }
.mocktest-option-editor input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--green); }
.mocktest-editor-status { min-height: 20px; color: var(--green); font-size: 12px; line-height: 1.6; }
.mocktest-group-admin-row { align-items: flex-start; }
.mocktest-group-admin-info { min-width: 0; display: grid; gap: 7px; }
.mocktest-group-admin-info code { color: #62675d; font: 9px/1.5 var(--mono); overflow-wrap: anywhere; }
.mocktest-group-admin-info .text-button { justify-self: start; }
.admin-book-row .admin-delete-user { color: #9b4839; }
.admin-book-row .admin-delete-user:hover { border-color: #b86a57; color: #8c372b; background: #fbefea; }
.admin-dialog.uploading .dialog-close:disabled { color: #959a90; background: #f2f1eb; cursor: wait; }
.book-detail-dialog { width: min(960px, calc(100% - 24px)); }
.book-detail-dialog .dialog-inner { padding: clamp(24px, 5vw, 48px); }
.book-detail-layout { display: grid; grid-template-columns: minmax(180px, .58fr) minmax(0, 1.42fr); gap: clamp(24px, 5vw, 48px); align-items: start; }
.book-detail-cover { min-height: 300px; display: grid; place-items: center; background: #f0efe9; }
.book-detail-cover .book-cover-image, .book-detail-cover .book-cover-placeholder { width: 72%; height: 310px; max-height: 48vh; }
.book-detail-cover .book-cover-initials { font-size: clamp(58px, 8vw, 88px); }
.book-detail-copy h2 { margin-top: 15px; font-size: clamp(32px, 4vw, 45px); }
.book-detail-author { margin: 0 0 7px; color: var(--muted); font-size: 13px; }
.book-detail-price { margin: 0 0 18px; color: var(--green); font-size: 18px; font-weight: 650; }
.book-detail-description, #book-detail-content { color: #51594f; font-size: 13px; line-height: 1.75; white-space: pre-line; }
.book-detail-facts { margin: 18px 0; display: flex; flex-wrap: wrap; gap: 9px; }
.book-detail-facts dt { color: var(--muted); font-size: 10px; }
.book-detail-facts dd { margin: 0 10px 0 -6px; color: var(--ink); font-size: 11px; font-weight: 600; }
.book-content-section { padding-top: 16px; border-top: 1px solid var(--line); }
.book-content-section h3, .sample-preview-heading h3 { margin: 0; font: 500 17px var(--serif); }
.book-content-section p { margin-bottom: 0; }
.book-detail-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.book-detail-actions .button { min-height: 40px; }
.sample-reading-note { margin: 12px 0 0; color: #62675d; font-size: 11px; }
.sample-preview-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.sample-preview-heading { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sample-preview-links { display: flex; flex-wrap: wrap; gap: 16px; }
.sample-preview-section iframe { width: 100%; height: min(66vh, 700px); border: 1px solid var(--line); background: #ecebe6; }
.toast-region { position: fixed; z-index: 10; right: 22px; bottom: 22px; width: min(370px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast { padding: 15px 18px; display: flex; align-items: start; gap: 11px; border: 1px solid #496854; border-radius: 3px; color: #f7f6ef; background: var(--green-dark); box-shadow: 0 8px 30px rgba(27, 46, 33, .22); font-size: 11px; line-height: 1.55; animation: toast-in .2s ease both; }
.toast::before { width: 6px; height: 6px; margin-top: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--lime); content: ""; }
.toast.error { border-color: #824f40; background: #6a392e; }
.toast.error::before { background: #ffc4a5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .hero { min-height: 590px; }
}
@media (max-width: 980px) {
  .hero { min-height: 500px; padding-right: 6vw; padding-left: 7vw; grid-template-columns: 1.05fr .95fr; gap: 35px; }
  .hero-feature { padding-left: 25px; }
  .library-section { padding-right: 6vw; padding-left: 6vw; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-cover-wrap { height: clamp(190px, 28vw, 280px); }
  .about-section { padding-right: 7vw; padding-left: 7vw; }
}
@media (max-width: 700px) {
  .announcement { min-height: 29px; font-size: 8px; }
  .site-header { position: relative; z-index: 4; height: 69px; padding: 0 19px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand-mark svg { width: 30px; height: 30px; }
  .brand-copy strong { font-size: 15px; }
  .main-nav { position: absolute; top: 68px; right: 0; left: 0; margin: 0; padding: 0 22px; display: none; align-items: stretch; flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); background: var(--paper); }
  .main-nav.open { display: flex; }
  .nav-link { padding: 15px 0; border-top: 1px solid rgba(56, 68, 56, .1); }
  .nav-link::after { display: none; }
  .header-actions { gap: 4px; }
  .button-quiet { min-height: 35px; padding: 0 11px; font-size: 10px; }
  .menu-button { display: block; }
  .hero { min-height: 0; padding: 53px 25px 42px; grid-template-columns: 1fr; gap: 35px; }
  .hero h1 { margin: 19px 0 14px; font-size: clamp(46px, 12vw, 64px); }
  .hero-description { max-width: 340px; margin-bottom: 22px; font-size: 12px; }
  .hero-copy > .button { min-height: 42px; }
  .hero-note { margin-top: 25px; font-size: 10px; }
  .hero-feature { max-width: none; padding: 19px 0 0; border-top: 1px solid #cfd4c8; border-left: 0; }
  .hero-feature h2 { max-width: 390px; margin-top: 17px; font-size: 30px; }
  .hero-steps { margin-top: 19px; }
  .library-section { padding: 57px 20px 42px; }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .section-heading h2 { max-width: 370px; margin-top: 14px; font-size: 37px; }
  .section-aside { align-self: end; font-size: 8px; }
  .catalog-toolbar { margin-top: 23px; align-items: end; flex-direction: column; }
  .search-field { width: 100%; }
  .catalog-count { align-self: end; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 13px; }
  .book-cover-wrap { height: clamp(170px, 52vw, 250px); margin-bottom: 11px; }
  .book-cover-placeholder { width: 67%; height: 78%; }
  .book-cover-initials { font-size: clamp(30px, 8vw, 42px); }
  .book-title { font-size: 14px; }
  .book-price { font-size: 11px; }
  .book-description { min-height: 48px; font-size: 11px; }
  .book-actions { align-items: flex-start; flex-direction: column; gap: 4px; }
  .book-buy { min-height: 30px; }
  .book-detail-layout { grid-template-columns: 130px minmax(0, 1fr); gap: 18px; }
  .book-detail-cover { min-height: 200px; }
  .book-detail-cover .book-cover-image, .book-detail-cover .book-cover-placeholder { width: 78%; height: 205px; }
  .book-detail-cover .book-cover-initials { font-size: 54px; }
  .book-detail-dialog .dialog-inner { padding: 42px 19px 24px; }
  .book-detail-dialog h2 { font-size: 29px; }
  .book-detail-dialog .eyebrow { font-size: 8px; }
  .book-detail-description, #book-detail-content { font-size: 12px; }
  .sample-preview-section iframe { height: 58vh; }
  .catalog-footer { margin-top: 33px; font-size: 6px; }
  .about-section { min-height: 0; padding: 39px 24px 42px; grid-template-columns: 33px 1fr; gap: 9px; }
  .about-mark { font-size: 66px; }
  .about-section h2 { font-size: 32px; }
  .about-copy { font-size: 10px; }
  .site-footer { min-height: 75px; padding: 12px 19px; flex-wrap: wrap; }
  .footer-note { display: none; }
  .footer-copyright { font-size: 7px; }
  .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-metric { min-height: 76px; padding: 11px; }
  .admin-metric strong { font-size: 22px; }
  .admin-metric span { font-size: 8px; }
  .mocktest-page { min-height: 70vh; padding: 33px 17px 48px; }
  .mocktest-page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .mocktest-page h1 { font-size: clamp(30px, 9vw, 42px); }
  .mocktest-group-form { align-items: stretch; flex-direction: column; }
  .mocktest-group-form .button { width: 100%; }
  .mocktest-option-editor { grid-template-columns: 1fr; gap: 5px; }
  .mocktest-question legend { font-size: 16px; }
  .mocktest-option { min-height: 48px; font-size: 13px; }
  .mocktest-action-row .button { width: 100%; }
  .mocktest-history-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .mocktest-group-admin-row { flex-direction: column; }
  .mocktest-group-admin-row .admin-book-actions { width: 100%; flex-direction: row; }
  .mocktest-group-admin-row .admin-book-actions .button { flex: 1; }
}
@media (max-width: 400px) {
  .book-grid { column-gap: 10px; }
  .book-title { font-size: 13px; }
  .book-price { font-size: 10px; }
  .book-detail-layout { grid-template-columns: minmax(78px, .42fr) minmax(0, 1fr); gap: 12px; }
  .book-detail-cover { min-height: 155px; }
  .book-detail-cover .book-cover-image, .book-detail-cover .book-cover-placeholder { height: 160px; }
  .book-detail-cover .book-cover-initials { font-size: 42px; }
  .book-detail-dialog .dialog-inner { padding-right: 14px; padding-left: 14px; }
  .book-detail-dialog h2 { font-size: 25px; }
  .book-detail-actions { flex-direction: column; align-items: stretch; }
  .sample-preview-heading { align-items: flex-start; flex-direction: column; }
  .sample-preview-links { gap: 12px; }
  .admin-book-row { align-items: flex-start; }
  .admin-book-actions { flex-direction: column; }
  .mocktest-group-admin-row .admin-book-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
