:root {
  --ink:#233151;
  --muted:#5b6680;
  --blue:#354edc;
  --blue-dark:#2639b6;
  --paper:#f5f7fd;
  --line:#dce2f0;
  --peach:#ffb781;
  --mint:#99e4cf;
  --shadow:0 12px 32px #25325a0b;
  --radius:22px;
  font-family:'Trebuchet MS','Segoe UI',Arial,sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-size:16px;
  line-height:1.55;
  color-scheme:light
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}
button,a {
  touch-action:manipulation
}
button {
  cursor:pointer
}
button:disabled {
  cursor:default;
  opacity:.5
}
button,.button {
  border:1px solid var(--line);
  background:#fff;
  border-radius:13px;
  padding:11px 17px;
  min-height:46px;
  color:var(--ink);
  font-weight:700;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px
}
button:hover,.button:hover {
  border-color:var(--blue);
  color:var(--blue)
}
button.primary,.button.primary {
  background:var(--blue);
  border-color:var(--blue);
  color:#fff
}
button.primary:hover,.button.primary:hover {
  background:var(--blue-dark)
}
button.quiet,.button.quiet {
  background:transparent;
  border-color:transparent
}
button.danger {
  color:#a9203b;
  border-color:#e7bbc3
}
a {
  color:var(--blue);
  text-underline-offset:4px
}
button.small,.button.small {
  padding:7px 12px;
  font-size:.875rem;
  min-height:40px
}
.icon-button {
  min-width:46px;
  padding:10px
}
.pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:30px;
  padding:5px 11px;
  background:#eaf0ff;
  font-size:.875rem;
  font-weight:700;
  color:#354278
}
.pill.mint {
  background:#d9f5eb;
  color:#205c4b
}
.pill.orange {
  background:#fff0df;
  color:#79501d
}
.muted {
  color:var(--muted)
}
.small {
  font-size:.875rem
}
.eyebrow {
  font-size:.8rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:800;
  color:var(--muted);
  margin:0 0 10px
}
h1,h2,h3,p {
  margin-top:0
}
h1 {
  font-size:2.15rem;
  line-height:1.17;
  letter-spacing:-.045em;
  margin-bottom:14px
}
h2 {
  font-size:1.4rem;
  letter-spacing:-.025em;
  line-height:1.3
}
h3 {
  font-size:1.08rem;
  line-height:1.35;
  margin-bottom:8px
}
p {
  margin-bottom:16px
}
.row {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap
}
.between {
  justify-content:space-between
}
.stack>*+* {
  margin-top:16px
}
.hidden,[hidden] {
  display:none!important
}
.skip {
  position:fixed;
  top:-100px;
  left:15px;
  z-index:100;
  background:#fff;
  padding:12px
}
.skip:focus {
  top:10px
}
:focus-visible {
  outline:3px solid #d36524;
  outline-offset:4px
}
.layout {
  display:grid;
  grid-template-columns:228px minmax(0,1fr);
  min-height:100vh
}
.sidebar {
  background:#fff;
  border-right:1px solid var(--line);
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  padding:30px 18px 20px;
  z-index:20
}
.brand {
  font-size:2.45rem;
  letter-spacing:-.085em;
  font-weight:900;
  color:var(--blue);
  text-decoration:none;
  display:block;
  line-height:1;
  padding:0 14px 32px
}
.brand em {
  color:#ea763e;
  font-style:normal
}
.nav {
  display:grid;
  gap:7px
}
.nav a {
  display:flex;
  align-items:center;
  gap:11px;
  color:var(--muted);
  text-decoration:none;
  padding:12px 14px;
  border-radius:13px;
  font-weight:700;
  font-size:.95rem;
  min-height:48px
}
.nav a .nav-mark {
  font-size:1.1rem;
  width:23px;
  text-align:center
}
.nav a.active {
  background:#eaf0ff;
  color:var(--blue)
}
.nav a:hover {
  background:#f2f5fc
}
.nav .group-label {
  font-size:.75rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#77809b;
  margin:20px 14px 4px;
  font-weight:800
}
.sidebar-bottom {
  margin-top:auto;
  padding-top:24px
}
.parent-link {
  color:var(--muted);
  font-size:.85rem
}
.main-column {
  min-width:0
}
.topbar {
  padding:20px 38px;
  min-height:88px;
  border-bottom:1px solid var(--line);
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px
}
.topbar .search {
  max-width:470px;
  flex:1
}
.search {
  display:flex;
  align-items:center;
  gap:8px
}
.search input {
  background:#f5f7fb;
  border:1px solid transparent;
  min-width:80px;
  width:100%;
  padding:12px 16px;
  border-radius:14px
}
.avatar {
  width:42px;
  height:42px;
  border-radius:50%;
  background:#dce2ff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex-shrink:0;
  font-size:1.25rem;
  font-weight:800;
  color:var(--blue)
}
.avatar img {
  width:100%;
  height:100%;
  object-fit:cover
}
.profile-button {
  border:0;
  padding:0;
  background:none
}
.mobile-menu {
  display:none
}
.content {
  max-width:1420px;
  margin:0 auto;
  padding:34px 38px 28px;
  min-height:75vh
}
.intro {
  margin-bottom:24px
}
.intro p {
  color:var(--muted);
  margin-bottom:0
}
.dashboard-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 286px;
  gap:24px
}
.panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:23px;
  box-shadow:var(--shadow);
  min-width:0
}
.continue {
  background:#e9eeff;
  border-color:#d8e0fd;
  display:flex;
  align-items:center;
  gap:22px;
  padding:24px
}
.continue .progress-line {
  margin:16px 0
}
.cover {
  aspect-ratio:3/4;
  background:#e9edfb;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  position:relative;
  min-width:0
}
.cover .type-cover {
  padding:20px;
  text-align:left;
  width:100%;
  align-self:stretch;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:var(--book-color,#e0e7fe)
}
.cover .type-cover strong {
  font-size:1.45rem;
  line-height:1.15;
  letter-spacing:-.03em;
  overflow-wrap:anywhere
}
.cover .type-cover span {
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase
}
.cover img,.cover video {
  width:100%;
  height:100%;
  object-fit:cover
}
.continue .cover {
  width:106px;
  flex:0 0 106px;
  box-shadow:5px 6px 0 #b5c0ef
}
.continue .cover strong {
  font-size:1.06rem
}
.continue .cover .type-cover {
  padding:12px
}
.continue-copy {
  flex:1;
  min-width:0
}
.continue h2 {
  margin:8px 0
}
.progress-line {
  height:6px;
  border-radius:6px;
  background:#ced8f5;
  overflow:hidden
}
.progress-line span {
  display:block;
  height:100%;
  background:var(--blue);
  border-radius:6px
}
.section-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin:27px 0 16px
}
.section-title h2 {
  margin:0
}
.room {
  position:relative;
  overflow:hidden;
  min-height:340px;
  background:var(--room-color,#edf0ff);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px
}
.room-bg {
  position:absolute;
  inset:0;
  pointer-events:none
}
.room-bg img,.room-bg video {
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.28
}
.room-content {
  position:relative;
  z-index:1
}
.room-tabs {
  gap:7px;
  margin-bottom:18px
}
.room-tabs button[aria-pressed=true] {
  background:var(--ink);
  border-color:var(--ink);
  color:white
}
.shelves {
  display:grid;
  gap:22px
}
.shelf {
  display:flex;
  gap:16px;
  align-items:flex-end;
  min-height:195px;
  padding:0 12px 13px;
  border-bottom:10px solid #bbc4e4;
  overflow-x:auto
}
.shelf .shelf-item {
  width:114px;
  flex:0 0 114px;
  position:relative
}
.shelf .cover {
  height:150px;
  width:114px
}
.shelf .cover strong {
  font-size:1.1rem
}
.shelf .cover .type-cover {
  padding:12px
}
.shelf-item button {
  border:0;
  padding:0;
  display:block;
  min-height:0;
  text-align:left;
  width:100%;
  background:transparent
}
.shelf-item .book-name {
  font-size:.8rem;
  line-height:1.25;
  margin-top:8px;
  display:block;
  max-width:120px
}
.shelf-empty {
  color:#48567c;
  align-self:center;
  font-size:.94rem;
  padding:10px
}
.room-controls {
  margin-top:19px;
  gap:8px
}
.objects-layer {
  display:flex;
  gap:12px;
  min-height:36px;
  margin:10px 0;
  flex-wrap:wrap
}
.room-object {
  position:relative;
  touch-action:none;
  max-width:130px
}
.room-object img,.room-object video {
  width:100%;
  max-height:120px;
  object-fit:contain
}
.room-object button {
  display:block;
  font-size:.8rem;
  padding:4px 10px
}
.companion-panel {
  background:#fff6e8
}
.companion-initial {
  width:58px;
  height:58px;
  border-radius:21px;
  background:#ffda95;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2rem;
  font-weight:900;
  color:#78510d;
  margin-bottom:20px;
  overflow:hidden
}
.companion-initial img {
  width:100%;
  height:100%;
  object-fit:cover
}
.mini-card {
  padding:16px 0;
  border-bottom:1px solid var(--line)
}
.mini-card:last-child {
  border:0;
  padding-bottom:0
}
.mini-card p {
  margin:5px 0 0
}
.book-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:24px
}
.book-card {
  min-width:0
}
.book-card .cover-link {
  display:block;
  text-decoration:none
}
.book-card h3 {
  margin-top:13px
}
.book-card .meta {
  font-size:.85rem;
  color:var(--muted);
  margin:0 0 10px
}
.book-card .actions {
  display:flex;
  gap:7px;
  flex-wrap:wrap
}
.filters {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 24px
}
.filters select,.filters input {
  min-width:150px;
  max-width:100%
}
input,select,textarea {
  border:1px solid #c9d2e4;
  background:#fff;
  color:var(--ink);
  border-radius:11px;
  min-height:46px;
  padding:10px 12px;
  max-width:100%
}
textarea {
  width:100%;
  min-height:100px;
  resize:vertical
}
label.field {
  display:block;
  font-size:.94rem;
  font-weight:700;
  margin-bottom:16px
}
label.field>input,label.field>select,label.field>textarea {
  display:block;
  width:100%;
  margin-top:7px
}
label.check {
  display:flex;
  align-items:flex-start;
  gap:11px;
  margin:14px 0;
  cursor:pointer
}
input[type=checkbox] {
  width:22px;
  height:22px;
  min-height:22px;
  margin-top:2px;
  flex:0 0 22px;
  accent-color:var(--blue)
}
.empty {
  padding:34px;
  text-align:center;
  background:#fff;
  border:1px dashed #bac6de;
  border-radius:var(--radius)
}
.empty h2 {
  margin-bottom:10px
}
.empty p {
  max-width:520px;
  margin:0 auto 18px
}
.detail {
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:32px
}
.detail h1 {
  font-size:2.3rem
}
.detail .actions {
  margin:22px 0
}
.note-list {
  display:grid;
  gap:12px
}
.note {
  border:1px solid var(--line);
  border-radius:15px;
  padding:17px;
  background:#fffef7;
  white-space:pre-wrap
}
.note p {
  overflow-wrap:anywhere
}
.note .row {
  white-space:normal
}
.grid-2 {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px
}
.grid-3 {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px
}
.calendar-grid {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:5px
}
.calendar-day {
  border:1px solid var(--line);
  border-radius:12px;
  background:white;
  padding:9px;
  min-height:96px;
  display:block;
  text-align:left;
  font-weight:400;
  overflow:hidden
}
.calendar-day.today {
  border:2px solid var(--blue);
  background:#edf1ff
}
.calendar-day.outside {
  opacity:.5
}
.calendar-day strong {
  display:block;
  margin-bottom:4px
}
.calendar-day .event-dot {
  background:#fce4cc;
  display:block;
  border-radius:5px;
  padding:2px 5px;
  font-size:.72rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.calendar-weekday {
  text-align:center;
  color:var(--muted);
  font-size:.85rem;
  padding:12px 0
}
.year-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px
}
.chat-log {
  display:flex;
  flex-direction:column;
  gap:15px;
  min-height:240px;
  max-height:52vh;
  overflow:auto;
  padding:10px 0;
  margin-bottom:20px
}
.bubble {
  align-self:flex-start;
  border-radius:18px 18px 18px 3px;
  background:#eaf0ff;
  max-width:82%;
  padding:16px 19px;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.bubble.user {
  align-self:flex-end;
  border-radius:18px 18px 3px 18px;
  background:#fff1dd
}
.chat-form {
  display:flex;
  gap:10px
}
.chat-form input {
  flex:1;
  min-width:0
}
.footer {
  padding:25px 38px 30px;
  color:var(--muted);
  font-size:.83rem;
  display:flex;
  gap:20px;
  justify-content:space-between;
  flex-wrap:wrap
}
.footer a {
  color:inherit
}
.bottomnav {
  display:none
}
.dialog-backdrop {
  position:fixed;
  inset:0;
  background:#14214373;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:90;
  padding:20px
}
.dialog {
  background:#fff;
  border-radius:24px;
  width:100%;
  max-width:660px;
  max-height:90vh;
  max-height:90dvh;
  overflow:auto;
  padding:27px;
  box-shadow:0 25px 90px #14214345
}
.dialog-head {
  display:flex;
  gap:15px;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:18px
}
.dialog-head h2 {
  margin:6px 0
}
.dialog .actions {
  margin-top:22px
}
.toast {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  z-index:120;
  padding:13px 22px;
  border-radius:14px;
  background:#233151;
  color:#fff;
  box-shadow:var(--shadow);
  max-width:calc(100% - 30px);
  text-align:center
}
.banner {
  padding:12px 20px;
  background:#fff0db;
  color:#624820;
  border-bottom:1px solid #eacb9e
}
.reader {
  position:fixed;
  inset:0;
  background:#202634;
  z-index:70;
  display:flex;
  flex-direction:column;
  color:#fff
}
.reader-head,.reader-foot {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 20px;
  background:#fff;
  color:var(--ink);
  flex-wrap:wrap
}
.reader-head {
  border-bottom:1px solid var(--line)
}
.reader-head h2 {
  font-size:1rem;
  margin:0;
  flex:1
}
.reader-head select {
  font-size:.9rem;
  max-width:200px
}
.reader-foot {
  justify-content:center;
  border-top:1px solid var(--line)
}
.reader-foot input[type=range] {
  padding:0;
  min-height:24px;
  width:min(35vw,370px);
  accent-color:var(--blue)
}
.reader-viewport {
  flex:1;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  scroll-behavior:auto;
  position:relative;
  padding:18px
}
.page-group {
  display:flex;
  justify-content:center;
  gap:10px;
  min-height:100%;
  max-width:1400px;
  margin:0 auto 22px;
  align-items:flex-start
}
.page-group.rtl {
  flex-direction:row-reverse
}
.reader-page {
  background:#fff;
  color:var(--ink);
  margin:0;
  position:relative;
  flex:1;
  min-width:0;
  max-width:760px;
  box-shadow:0 2px 12px #0002;
  overflow:hidden;
  scroll-margin-top:12px
}
.reader-page img,.reader-page video {
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  min-height:120px
}
.reader-page .text-page {
  min-height:70vh;
  padding:clamp(25px,5vw,90px);
  font-family:Georgia,serif;
  font-size:1.45rem;
  line-height:1.9;
  display:flex;
  flex-direction:column;
  justify-content:center;
  white-space:pre-wrap
}
.reader-page .page-no {
  display:block;
  text-align:center;
  padding:8px;
  font-size:.8rem;
  background:#fafbfd;
  color:#5b6680
}
.reader-page .missing-media {
  padding:70px 25px;
  text-align:center;
  color:#672533
}
.reader.focus .reader-head {
  display:none
}
.reader.focus .reader-foot .optional {
  display:none
}
.reader.no-motion {
  scroll-behavior:auto
}
.reader-viewport.single .page-group {
  margin-bottom:0
}
.reader-loading {
  padding:50px;
  text-align:center
}
.large-text {
  font-size:19px
}
.reduced-motion * {
  scroll-behavior:auto!important
}
.sortable-row {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 0;
  border-bottom:1px solid var(--line)
}
.sortable-row strong {
  flex:1
}
.release-label {
  margin:18px 0 8px
}
.admin-body {
  max-width:1400px;
  padding:30px;
  margin:auto
}
.admin-layout {
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:24px
}
.admin-list {
  display:grid;
  align-content:start;
  gap:6px
}
.admin-list button {
  justify-content:flex-start
}
.admin-list button.active {
  background:var(--blue);
  color:#fff
}
.admin-editor {
  min-width:0
}
.admin-warning {
  background:#fff0df;
  padding:16px;
  border-radius:14px;
  margin:20px 0
}
.admin-toolbar {
  position:sticky;
  top:0;
  background:var(--paper);
  padding:10px 0;
  z-index:5
}
.admin-table {
  width:100%;
  border-collapse:collapse
}
.admin-table th,.admin-table td {
  padding:13px;
  text-align:left;
  border-bottom:1px solid var(--line)
}
.admin-table-wrap {
  overflow:auto
}
.asset-preview {
  max-width:180px;
  max-height:180px;
  display:block;
  margin:10px 0
}
.rich-text {
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.status-error {
  color:#a2203b
}
.guide {
  max-width:900px;
  margin:auto;
  padding:35px 24px
}
.guide h2 {
  margin-top:35px
}
.guide code {
  background:#e6eaf5;
  padding:2px 6px;
  border-radius:5px
}
.guide table {
  border-collapse:collapse;
  width:100%;
  font-size:.92rem
}
.guide th,.guide td {
  padding:12px;
  border:1px solid var(--line);
  vertical-align:top;
  text-align:left
}
.notice-count {
  background:#e86643;
  color:#fff;
  border-radius:20px;
  font-size:.75rem;
  min-width:19px;
  text-align:center
}
.media-fallback {
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:12px;
  height:100%;
  background:#eef1f8;
  color:#5b6680
}
@media(min-width:1600px) {
  .content {
    padding-top:44px
  }
  .dashboard-grid {
    grid-template-columns:minmax(0,1fr) 320px
  }
  .book-grid {
    grid-template-columns:repeat(auto-fill,minmax(190px,1fr))
  }
}
@media(max-width:1100px) {
  .layout {
    grid-template-columns:190px minmax(0,1fr)
  }
  .sidebar {
    padding:24px 10px
  }
  .nav a {
    font-size:.88rem;
    padding:10px
  }
  .topbar {
    padding:18px 24px
  }
  .content {
    padding:28px 24px
  }
  .dashboard-grid {
    grid-template-columns:1fr
  }
  .dashboard-aside {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px
  }
  .dashboard-aside>.panel {
    margin:0
  }
  .grid-3 {
    grid-template-columns:repeat(2,1fr)
  }
  .sidebar .brand {
    font-size:2.1rem
  }
  .footer {
    padding:24px
  }
}
@media(max-width:760px) {
  .layout {
    display:block
  }
  .sidebar {
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    transform:translateX(-100%);
    width:260px;
    height:100dvh;
    box-shadow:20px 0 50px #23315130;
    transition:transform .2s
  }
  .sidebar.open {
    transform:translateX(0)
  }
  .mobile-menu {
    display:flex
  }
  .topbar {
    position:sticky;
    top:0;
    z-index:15;
    padding:12px 16px;
    min-height:76px
  }
  .topbar .search input {
    padding:11px;
    min-width:0
  }
  .topbar .search button {
    display:none
  }
  .profile-button .profile-name {
    display:none
  }
  .content {
    padding:24px 16px;
    min-height:70vh
  }
  h1 {
    font-size:1.85rem
  }
  .dashboard-aside {
    grid-template-columns:1fr
  }
  .continue {
    padding:18px;
    gap:17px
  }
  .continue .cover {
    width:90px;
    flex-basis:90px
  }
  .continue .primary {
    padding:10px 12px
  }
  .panel {
    padding:20px
  }
  .room {
    padding:16px
  }
  .room-tabs {
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:8px
  }
  .room-tabs button {
    white-space:nowrap
  }
  .section-title {
    align-items:flex-start
  }
  .section-title h2 {
    font-size:1.22rem
  }
  .book-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px 14px
  }
  .grid-2,.grid-3 {
    grid-template-columns:1fr
  }
  .detail {
    grid-template-columns:120px minmax(0,1fr);
    gap:20px
  }
  .detail h1 {
    font-size:1.7rem
  }
  .detail .detail-body {
    grid-column:1/-1
  }
  .filters {
    gap:8px
  }
  .filters select,.filters input {
    flex:1;
    min-width:130px
  }
  .bottomnav {
    display:flex;
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    background:#fff;
    border-top:1px solid var(--line);
    z-index:25;
    padding:8px 5px max(8px,env(safe-area-inset-bottom));
    justify-content:space-around
  }
  .bottomnav a {
    font-size:.72rem;
    font-weight:700;
    text-decoration:none;
    text-align:center;
    color:var(--muted);
    padding:5px;
    min-width:55px
  }
  .bottomnav a span {
    font-size:1.2rem;
    display:block;
    line-height:1.2;
    margin-bottom:5px
  }
  .bottomnav a.active {
    color:var(--blue)
  }
  .footer {
    padding:20px 16px 110px;
    font-size:.8rem;
    gap:12px
  }
  .toast {
    bottom:95px
  }
  .calendar-day {
    padding:5px;
    min-height:65px;
    border-radius:8px
  }
  .calendar-day .event-dot {
    font-size:0;
    height:6px;
    padding:0;
    margin-top:5px
  }
  .calendar-grid {
    gap:3px
  }
  .calendar-weekday {
    font-size:.75rem
  }
  .year-grid {
    grid-template-columns:repeat(3,1fr)
  }
  .reader-head {
    padding:9px 10px;
    gap:7px
  }
  .reader-head h2 {
    font-size:.9rem
  }
  .reader-head select {
    max-width:160px;
    min-height:40px;
    padding:6px;
    font-size:.8rem
  }
  .reader-head button {
    font-size:.8rem;
    min-height:40px;
    padding:7px
  }
  .reader-viewport {
    padding:8px
  }
  .page-group {
    gap:5px
  }
  .reader-page .text-page {
    font-size:1.1rem;
    line-height:1.7;
    padding:24px 20px;
    min-height:65vh
  }
  .page-group.double .text-page {
    font-size:.85rem;
    padding:15px 11px;
    min-height:55vh
  }
  .reader-foot {
    padding:8px;
    gap:7px;
    font-size:.82rem
  }
  .reader-foot button {
    padding:8px;
    min-height:42px
  }
  .dialog {
    padding:21px;
    border-radius:20px
  }
  .dialog-backdrop {
    padding:12px
  }
  .admin-body {
    padding:18px
  }
  .admin-layout {
    grid-template-columns:1fr
  }
  .admin-list {
    display:flex;
    overflow:auto;
    gap:8px
  }
  .admin-list button {
    white-space:nowrap
  }
  .admin-table td,.admin-table th {
    padding:9px
  }
  .admin-toolbar {
    position:static
  }
  .chat-form {
    flex-wrap:wrap
  }
  .bubble {
    max-width:94%
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important
  }
}
body.reduced-motion * {
  transition:none!important;
  animation:none!important
}
@media print {
  .sidebar,.topbar,.bottomnav,.footer,button {
    display:none
  }
  .layout {
    display:block
  }
  .content {
    padding:0
  }
  .panel {
    box-shadow:none
  }
}
/* Les grilles et les onglets défilent dans leur espace, sans élargir l’écran. */ .dashboard-grid>*,.dashboard-aside>* {
  min-width:0
}
.room-tabs {
  min-width:0;
  max-width:100%
}
.continue .type-cover span:last-child,.shelf .type-cover span:last-child {
  display:none
}
.continue .type-cover strong,.shelf .type-cover strong {
  overflow-wrap:normal;
  word-break:normal;
  font-size:1rem
}
.continue .type-cover span,.shelf .type-cover span {
  font-size:.65rem;
  letter-spacing:.03em
}
.continue .type-cover,.shelf .type-cover {
  justify-content:flex-start;
  gap:10px
}
.book-grid:has(>.book-card:only-child) {
  grid-template-columns:repeat(auto-fill,minmax(160px,200px))
}
@media(max-width:1100px) {
  .dashboard-grid {
    grid-template-columns:minmax(0,1fr)
  }
}
@media(max-width:760px) {
  .continue-copy h2 {
    font-size:1.12rem
  }
  .continue-copy .button {
    font-size:.87rem
  }
  .room-tabs button {
    flex-shrink:0
  }
  .shelf {
    min-width:0
  }
  .section-title {
    flex-wrap:wrap
  }
  .book-grid:has(>.book-card:only-child) {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}
/* Images de navigation, parcours de lecture et petits écrans. */ .brand {
  display:flex;
  align-items:center;
  gap:9px
}
.brand em {
  margin-left:-9px
}
.nav-image {
  flex:none;
  object-fit:contain;
  width:24px;
  height:24px
}
.bottomnav .nav-image {
  display:block;
  margin:auto auto 4px
}
.journey-panel {
  border-top:4px solid #a6e1ce
}
.journey-list {
  margin:20px 0;
  padding-left:24px
}
.journey-list li {
  padding:0 0 18px 7px
}
.journey-list li:last-child {
  padding-bottom:0
}
.journey-list a {
  font-weight:700;
  text-underline-offset:4px
}
.journey-list p {
  margin:6px 0 0
}
img {
  max-width:100%
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}
:focus-visible {
  outline:3px solid #354edc;
  outline-offset:4px
}
@media (max-width:420px) {
  .dialog {
    padding:18px;
    max-height:90vh;
    max-height:90dvh
  }
  .dialog .row>button {
    flex:1 1 140px
  }
  .profile-name {
    max-width:90px;
    overflow:hidden;
    text-overflow:ellipsis
  }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    animation:none!important;
    transition:none!important
  }
}
