@import url("https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@400;500;700;800&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

:root {
  --bg-top: #f7fbff;
  --bg-bottom: #e8f0fb;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(72, 116, 166, 0.16);
  --ink: #213348;
  --muted: #667c92;
  --blue: #2d68b1;
  --blue-deep: #204d86;
  --mint: #67c3b4;
  --sun: #ebb968;
  --rose: #e58c93;
  --lavender: #ada8f0;
  --shadow: 0 22px 48px rgba(66, 109, 156, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(235, 185, 104, 0.22), transparent 24%),
    radial-gradient(circle at left 18%, rgba(103, 195, 180, 0.18), transparent 20%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.9), transparent 18%),
    radial-gradient(circle at 86% 22%, rgba(173, 168, 240, 0.14), transparent 24%);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 26px;
  align-items: stretch;
  padding: 32px;
  border-radius: 36px;
  border: 1px solid rgba(154, 195, 232, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 255, 0.9)),
    linear-gradient(135deg, rgba(191, 238, 254, 0.26), rgba(235, 185, 104, 0.1));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 156px;
  height: 156px;
  padding: 14px;
  border-radius: 36px;
  background: linear-gradient(180deg, #f8fdff, #edf8ff);
  border: 1px solid rgba(146, 210, 243, 0.42);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.72);
}

.mark-piece {
  display: grid;
  place-items: center;
  border-radius: 24px;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: white;
}

.mark-a {
  background: linear-gradient(135deg, #39b6e6, #2676c8);
}

.mark-b {
  background: linear-gradient(135deg, #ef8f78, #e86c80);
}

.mark-c {
  background: linear-gradient(135deg, #55c4a8, #349a70);
}

.mark-d {
  background: linear-gradient(135deg, #efc66d, #e39d55);
}

.brand-kicker {
  margin: 0 0 8px;
  color: #4f769a;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand-copy h1 {
  margin: 0;
  font-family: "M PLUS 1p", sans-serif;
  font-size: clamp(2.3rem, 4vw, 3.9rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-lede {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
}

.header-stats {
  display: grid;
  gap: 16px;
}

.metric-card {
  padding: 18px 22px;
  border-radius: 26px;
  border: 1px solid rgba(126, 179, 218, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.metric-blue {
  background: linear-gradient(135deg, rgba(197, 242, 255, 0.96), rgba(145, 222, 255, 0.82));
}

.metric-yellow {
  background: linear-gradient(135deg, rgba(255, 241, 183, 0.98), rgba(255, 221, 125, 0.82));
}

.metric-white {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 248, 255, 0.9));
}

.metric-label {
  display: block;
  margin-bottom: 8px;
  color: #5881a3;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.metric-card strong {
  display: block;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

.metric-path {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.6;
  word-break: break-word;
}

.language-panel,
.section-panel,
.search-card,
.notice-card,
.shelf-panel {
  border-radius: 30px;
  border: 1px solid rgba(131, 193, 231, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 251, 255, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.language-panel,
.section-panel,
.shelf-panel {
  margin-top: 22px;
  padding: 24px 26px;
}

.panel-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: baseline;
  margin-bottom: 16px;
}

.panel-title-row h2 {
  margin: 0;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.panel-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.language-chips,
.section-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.language-chip,
.section-chip,
.action-btn,
.subtle-btn {
  border: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.language-chip,
.section-chip {
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 700;
  color: #4d6b85;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(111, 170, 211, 0.22);
}

.language-chip.is-active {
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--sun));
  box-shadow: 0 10px 24px rgba(229, 140, 147, 0.24);
}

.section-chip.is-active {
  color: white;
  background: linear-gradient(135deg, var(--blue), #4bbdcd);
  box-shadow: 0 10px 24px rgba(45, 104, 177, 0.24);
}

.language-chip:hover,
.section-chip:hover,
.action-btn:hover,
.subtle-btn:hover,
.book-link:hover {
  transform: translateY(-2px);
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.72fr);
  gap: 22px;
  margin-top: 22px;
}

.conversation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
  margin-top: 22px;
}

.search-card,
.notice-card,
.conversation-panel,
.conversation-side {
  padding: 26px;
}

.conversation-panel,
.conversation-side {
  border-radius: 30px;
  border: 1px solid rgba(131, 193, 231, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 251, 255, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.notice-card h2 {
  margin: 0 0 14px;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.notice-card p + p {
  margin-top: 12px;
}

.search-field {
  display: block;
}

.search-field span {
  display: block;
  margin-bottom: 10px;
  color: #5f7da0;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(120, 178, 214, 0.24);
}

.search-row input {
  min-width: 0;
  padding: 18px 20px;
  border: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
}

.search-row input:focus {
  outline: none;
}

.action-btn {
  padding: 0 26px;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue), #2f7cc7);
}

.utility-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.subtle-btn {
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--blue-deep);
  font-weight: 700;
  background: linear-gradient(135deg, rgba(184, 236, 102, 0.92), rgba(88, 198, 187, 0.82));
}

.status {
  min-height: 1.6em;
  color: #54718a;
  font-size: 0.94rem;
  line-height: 1.6;
}

.chat-messages {
  display: grid;
  gap: 14px;
  max-height: 540px;
  padding-right: 4px;
  overflow: auto;
}

.chat-message {
  display: grid;
  gap: 8px;
}

.chat-message-user {
  justify-items: end;
}

.chat-message-assistant {
  justify-items: start;
}

.chat-message-meta {
  color: #5d7b98;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.chat-bubble {
  max-width: min(100%, 760px);
  padding: 16px 18px;
  border-radius: 22px;
  color: var(--ink);
  line-height: 1.8;
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(131, 193, 231, 0.2),
    0 12px 24px rgba(103, 159, 207, 0.1);
}

.chat-message-user .chat-bubble {
  color: white;
  background: linear-gradient(135deg, var(--blue), #4bbdcd);
}

.chat-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.chat-field {
  display: grid;
  gap: 10px;
}

.chat-field span {
  color: #5f7da0;
  font-weight: 700;
}

.chat-field textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 16px 18px;
  border: none;
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(120, 178, 214, 0.24);
}

.chat-field textarea:focus {
  outline: none;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chat-sources {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.chat-sources-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.chat-source-card {
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 255, 0.94)),
    linear-gradient(135deg, rgba(94, 168, 229, 0.12), rgba(255, 255, 255, 0.86));
  box-shadow:
    inset 0 0 0 1px rgba(160, 198, 234, 0.24),
    0 10px 20px rgba(88, 140, 189, 0.06);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.chat-source-card[open],
.chat-source-card:hover {
  transform: translateY(-2px);
}

.chat-source-summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
}

.chat-source-summary::-webkit-details-marker {
  display: none;
}

.chat-source-body {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.chat-source-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.chat-source-rank {
  color: var(--blue-deep);
  font-family: "M PLUS 1p", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.chat-source-title {
  font-size: 1rem;
  line-height: 1.5;
}

.chat-source-lead {
  margin: 8px 0 0;
  color: #54718a;
  font-size: 0.86rem;
  line-height: 1.6;
}

.chat-source-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  word-break: break-word;
}

.chat-source-snippet {
  margin: 10px 0 0;
  color: #365474;
  font-size: 0.92rem;
  line-height: 1.8;
}

.chat-source-open {
  justify-self: start;
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--blue-deep);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 0 0 1px rgba(131, 193, 231, 0.24);
}

.shelf-panel {
  background:
    radial-gradient(circle at top right, rgba(235, 185, 104, 0.14), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 249, 255, 0.92));
}

.book-grid-wrap {
  position: relative;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  align-items: start;
}

.book-card {
  min-width: 0;
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: 320px 320px;
}

.book-link {
  --accent: #5ea8e5;
  --accent-soft: rgba(94, 168, 229, 0.12);
  --accent-deep: #244f84;
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.book-card[data-class="000"] .book-link {
  --accent: #b6a0ef;
  --accent-soft: rgba(182, 160, 239, 0.16);
  --accent-deep: #6f59a8;
}

.book-card[data-class="100"] .book-link {
  --accent: #52b8a9;
  --accent-soft: rgba(82, 184, 169, 0.12);
  --accent-deep: #216961;
}

.book-card[data-class="200"] .book-link {
  --accent: #9e86e6;
  --accent-soft: rgba(158, 134, 230, 0.12);
  --accent-deep: #5e4aa3;
}

.book-card[data-class="300"] .book-link {
  --accent: #52a4df;
  --accent-soft: rgba(82, 164, 223, 0.12);
  --accent-deep: #235e92;
}

.book-card[data-class="400"] .book-link {
  --accent: #ea8b73;
  --accent-soft: rgba(234, 139, 115, 0.12);
  --accent-deep: #8f4836;
}

.book-card[data-class="500"] .book-link {
  --accent: #63b47d;
  --accent-soft: rgba(99, 180, 125, 0.12);
  --accent-deep: #2b6744;
}

.book-card[data-class="600"] .book-link {
  --accent: #cf8058;
  --accent-soft: rgba(207, 128, 88, 0.12);
  --accent-deep: #85452c;
}

.book-card[data-class="700"] .book-link {
  --accent: #c1a8f2;
  --accent-soft: rgba(193, 168, 242, 0.16);
  --accent-deep: #765cae;
}

.book-card[data-class="800"] .book-link {
  --accent: #7f73d8;
  --accent-soft: rgba(127, 115, 216, 0.12);
  --accent-deep: #473f87;
}

.book-card[data-class="900"] .book-link {
  --accent: #dd7f97;
  --accent-soft: rgba(221, 127, 151, 0.12);
  --accent-deep: #8c3652;
}

.book-panel {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 330px;
  padding: 22px 22px 20px 30px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(160, 198, 234, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 255, 0.94)),
    linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, 0.86));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 18px 32px rgba(88, 140, 189, 0.1);
}

.book-panel::after {
  content: "";
  position: absolute;
  inset: 14px 14px auto auto;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
  opacity: 0.8;
  pointer-events: none;
}

.book-spine {
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 54%, white));
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.04);
}

.book-panel-head,
.book-panel-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.book-code-chip,
.book-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.book-code-chip {
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.book-eyebrow {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  color: var(--accent-deep);
  font-family: "M PLUS 1p", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-author {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.book-rule {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 2px;
  margin-top: auto;
  background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, 0));
}

.book-meta-chip {
  color: #385572;
  background: rgba(255, 255, 255, 0.86);
}

.book-action-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.book-action {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent-soft) 82%, white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

.book-action-btn {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.book-action-btn:hover {
  transform: translateY(-1px);
}

.book-action-btn.is-open {
  color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent-soft) 82%, white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

.book-action-btn.is-summary {
  color: #fff;
  background: linear-gradient(135deg, #5075d7, #7f73d8);
  box-shadow: 0 8px 18px rgba(79, 102, 184, 0.25);
}

.summary-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.summary-modal[hidden] {
  display: none !important;
}

.summary-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 35, 56, 0.45);
  backdrop-filter: blur(4px);
}

.summary-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 42px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(119, 173, 213, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.95));
  box-shadow: 0 30px 54px rgba(39, 76, 121, 0.26);
}

.summary-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(122, 176, 214, 0.18);
  background: rgba(251, 253, 255, 0.96);
}

.summary-kicker {
  margin: 0 0 6px;
  color: #5a79a1;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.summary-header h2 {
  margin: 0;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.3rem;
  line-height: 1.5;
}

.summary-meta {
  margin: 8px 0 0;
  color: #5d7794;
  font-size: 0.86rem;
}

.summary-close-btn {
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: #244f84;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(113, 170, 212, 0.35);
}

.summary-body {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
}

.summary-section {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(128, 186, 224, 0.2);
}

.summary-section h3 {
  margin: 0 0 10px;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1rem;
}

.summary-section h4 {
  margin: 12px 0 8px;
  color: #466786;
  font-size: 0.86rem;
}

.summary-section p {
  margin: 0;
  line-height: 1.9;
  color: #2d4b68;
}

.summary-list,
.summary-evidence-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
}

.summary-list li,
.summary-evidence-list li {
  color: #2d4b68;
  line-height: 1.8;
}

.summary-evidence-list strong {
  display: inline-block;
  margin-bottom: 4px;
  color: #466786;
}

.summary-empty {
  margin: 0;
  color: #5d7794;
}

body.summary-open {
  overflow: hidden;
}

.empty-state {
  padding: 32px 12px 6px;
  color: #5f7a92;
  text-align: center;
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.auto-load-note {
  margin: 0;
  padding: 12px 18px;
  border-radius: 999px;
  color: #25548d;
  font-size: 0.94rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(132, 189, 224, 0.24),
    0 12px 24px rgba(103, 159, 207, 0.14);
}

.load-more-sentinel {
  width: 1px;
  height: 1px;
}

.action-btn:disabled,
.subtle-btn:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

@media (max-width: 1080px) {
  .site-header,
  .search-layout,
  .conversation-layout {
    grid-template-columns: 1fr;
  }

  .brand-block {
    grid-template-columns: 120px 1fr;
  }

  .brand-mark {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 18px, 1440px);
    padding-top: 18px;
  }

  .site-header,
  .language-panel,
  .section-panel,
  .search-card,
  .notice-card,
  .conversation-panel,
  .conversation-side,
  .shelf-panel {
    padding: 18px;
  }

  .brand-block {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 108px;
    height: 108px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .action-btn {
    padding: 14px 18px;
  }

  .utility-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-messages {
    max-height: none;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }

  .book-panel {
    min-height: 300px;
    padding: 20px 18px 18px 26px;
  }
}
