/* Functional platform components, matched to the supplied 3.1 reference. */
[hidden] {
  display:none!important
}
button,a,input,select,textarea {
  touch-action:manipulation
}
button:disabled {
  opacity:.55;
  cursor:wait
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #b77842;
  outline-offset:4px
}
.btn-primary {
  background:var(--forest);
  color:white
}
.btn-primary:hover {
  background:#0b4550
}
.btn-outline:hover {
  border-color:var(--forest);
  background:var(--mint)
}
.btn-outline {
  background:white;
  border-color:var(--line-strong)
}
.text-link {
  border:0;
  background:transparent
}
.empty,.empty-state {
  padding:28px;
  border:1px dashed var(--line-strong);
  border-radius:18px;
  color:var(--muted);
  text-align:center
}
.book-grid>.empty-state {
  grid-column:1/-1
}
.empty-state>.icon {
  margin:auto
}
.panel {
  overflow:hidden
}
#connection-status {
  background:#fff0ce;
  color:#564125;
  padding:12px 24px;
  font-size:13px;
  text-align:center
}
#connection-status button {
  margin-left:12px
}
.book-card .cover {
  border:0;
  cursor:pointer;
  color:inherit
}
.book-card .art-0 {
  background:#e9eedf
}
.book-card .art-1 {
  background:#f2e2d5
}
.book-card .art-2 {
  background:#e1ebed
}
.book-card .art-3 {
  background:#ede6d7
}
.book-card .cover-0 {
  background:#e7dcba;
  color:#385747
}
.book-card .cover-1 {
  background:#ad5942;
  color:#fff0cf
}
.book-card .cover-2 {
  background:#344f61;
  color:#f7d79c
}
.book-card .cover-3 {
  background:#d9ba69;
  color:#364d3d
}
.book-status.is-available {
  background:#e1f4e1;
  color:#1b593c
}
.book-card .book-status {
  max-width:calc(100% - 24px);
  white-space:normal;
  font-size:10px
}
.book-grid .book-card {
  min-width:0
}
.cover-title,.book-info h3 {
  overflow-wrap:anywhere
}
.book-model-row {
  min-height:22px
}
.status-pill {
  display:inline-block;
  background:#edf0e7;
  color:#59675a;
  border-radius:30px;
  padding:4px 9px;
  font-size:11px;
  font-weight:700
}
.status-pill.available,.status-pill.active,.status-pill.published {
  background:#e3f0e2;
  color:#226545
}
.status-pill.pending,.status-pill.planned,.status-pill.pending_review,.status-pill.awaiting_pickup {
  background:#fff0ce;
  color:#815b24
}
.status-pill.on_loan,.status-pill.in_transfer {
  background:#e5edf4;
  color:#355877
}
.station-action {
  margin-top:10px
}
.station-details .status-pill {
  margin-bottom:6px
}
.network-map {
  min-height:400px
}
.network-nodes {
  position:relative;
  min-height:350px;
  padding:90px 25px 70px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:25px;
  flex-wrap:wrap
}
.network-node {
  display:grid;
  justify-items:center;
  gap:10px;
  background:transparent;
  border:0;
  max-width:180px
}
.network-node .pin-circle {
  display:grid;
  place-items:center;
  width:60px;
  height:60px;
  border-radius:50%;
  background:var(--forest);
  color:white;
  box-shadow:0 0 0 9px #ffffff80
}
.network-node b {
  font-size:12px
}
.network-node small {
  font-size:11px;
  color:var(--muted)
}
.network-map .map-caption {
  padding:0 15px
}
.station-list {
  max-height:650px;
  overflow:auto
}
.circle-open {
  margin:14px 22px 20px;
  font-size:12px
}
.circle-card .circle-footer {
  flex-wrap:wrap
}
.circle-footer span {
  font-size:11px
}
.feed-search {
  display:flex;
  gap:10px;
  margin:0 0 14px
}
.feed-search input,.search-dialog-field input {
  width:100%;
  min-width:0;
  padding:13px 15px;
  border:1px solid var(--line-strong);
  border-radius:12px;
  background:var(--paper);
  color:var(--ink)
}
.post-content p,.long-text,.comment-item p {
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.post-content h3 {
  font-size:19px;
  margin:0 0 10px
}
.post-head>.avatar {
  background:#dcebdd;
  color:#245841
}
.post-actions {
  flex-wrap:wrap
}
.post-action[aria-pressed=true] {
  color:#246a4a;
  background:#e3efe4
}
.post-action.liked {
  color:#b55b4a
}
.feed-tabs {
  flex-wrap:wrap
}
.feed-heading {
  gap:10px
}
.audio-seek {
  display:block;
  width:100%;
  accent-color:#e8ba8e;
  margin:20px 0 8px;
  cursor:pointer
}
.audio-tools {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:16px
}
.audio-tools label {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:11px
}
.audio-tools select {
  max-width:100%;
  min-height:44px;
  background:var(--paper);
  color:var(--ink);
  border:1px solid var(--line-strong);
  border-radius:8px;
  padding:7px 10px
}
.audio-tools .text-link {
  font-size:12px;
  color:var(--forest)
}
.audio-row {
  width:100%;
  text-align:left
}
.audio-row>span {
  min-width:0
}
.audio-row b {
  overflow-wrap:anywhere
}
.audio-list .empty {
  color:var(--muted);
  border-color:var(--line-strong)
}
.mini-player {
  z-index:150
}
.metric-value {
  font:600 36px var(--serif);
  display:block;
  color:var(--forest);
  margin:6px 0
}
.impact-tile h3 {
  margin-top:4px
}
.rankings-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px
}
.rank-card {
  padding:25px
}
.rank-card .eyebrow {
  font-size:10px
}
.rank-card h3 {
  font-family:var(--serif);
  font-size:23px
}
.rank-card p {
  color:var(--muted);
  font-size:13px
}
.rank-card ol {
  padding-left:20px
}
.rank-card li {
  padding:9px 0;
  font-size:13px
}
.rank-card li b {
  display:block;
  font-size:11px;
  color:var(--muted)
}
.account-section {
  min-height:65vh
}
.profile-panel {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:18px;
  padding:24px;
  margin-bottom:18px
}
.profile-panel h2 {
  font:600 25px var(--serif);
  margin:0 0 18px
}
.profile-panel p {
  color:var(--muted)
}
.profile-actions {
  display:flex;
  align-items:center;
  gap:var(--action-gap);
  flex-wrap:wrap
}
.profile-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px
}
.profile-top strong {
  font-size:25px
}
.profile-top p {
  margin:5px 0
}
.profile-top>div {
  min-width:0;
  overflow-wrap:anywhere
}
.profile-columns {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px
}
.record {
  padding:18px 0;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  flex-wrap:wrap
}
.record>div {
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere
}
.record small {
  font-size:12px;
  color:var(--muted)
}
.record-actions {
  display:flex;
  align-items:center;
  gap:var(--action-gap);
  flex-wrap:wrap
}
.record>.record-actions {
  flex:0 1 auto
}
.record-actions>.text-link {
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--paper);
  min-height:44px;
  text-align:center
}
.record>div:first-child:not(.record-actions) {
  flex:1 1 180px
}
.record-actions .btn {
  min-height:44px;
  font-size:12px;
  padding-inline:12px
}
.record .text-link {
  font-size:12px
}
.modal {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  width:min(780px,100%);
  max-height:calc(100dvh - 40px);
  overflow-y:auto;
  overscroll-behavior:contain
}
.modal h2 {
  min-height:44px;
  padding-right:56px;
  margin-right:0;
  overflow-wrap:anywhere
}
.modal-layer {
  z-index:300
}
.modal-close {
  position:sticky;
  top:0;
  right:auto;
  float:none;
  grid-area:1/1;
  justify-self:end;
  align-self:start;
  z-index:2;
  margin:0;
  flex:none
}
.modal p {
  overflow-wrap:anywhere
}
.form-fields {
  display:grid;
  gap:16px;
  margin:20px 0
}
.form-fields label {
  display:grid;
  gap:7px;
  font-size:13px;
  font-weight:700
}
.form-fields input,.form-fields select,.form-fields textarea {
  width:100%;
  min-width:0;
  border:1px solid var(--line-strong);
  border-radius:10px;
  padding:12px;
  background:#fff;
  color:var(--ink)
}
.form-fields textarea {
  min-height:115px;
  resize:vertical
}
.form-actions {
  display:flex;
  align-items:center;
  gap:var(--action-gap);
  flex-wrap:wrap;
  margin:18px 0
}
.form-actions:empty {
  display:none
}
.form-actions>.btn,.profile-actions>.btn {
  flex:0 1 auto
}
.form-note,.inline-alert {
  font-size:13px;
  line-height:1.7
}
.inline-alert {
  padding:14px 16px;
  background:#f5efdd;
  border-radius:12px
}
.copy-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding:20px 0;
  border-top:1px solid var(--line)
}
.copy-card p {
  font-size:12px;
  color:var(--muted)
}
.passport-summary {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  font-size:13px
}
.qr-panel {
  display:flex;
  align-items:center;
  gap:24px;
  margin:24px 0;
  flex-wrap:wrap
}
.qr-panel svg {
  width:160px;
  max-width:100%;
  height:auto
}
.qr-panel>div {
  min-width:0
}
.journey-row {
  border-left:2px solid #d1dfd0;
  padding:4px 0 12px 18px;
  margin:0 8px
}
.journey-row small {
  display:block;
  margin:4px 0;
  color:var(--muted)
}
.help-steps {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
  margin:24px 0
}
.help-steps>div {
  padding:20px;
  background:#eef3e9;
  border-radius:12px
}
.search-dialog-field {
  display:block;
  margin:20px 0
}
.search-result {
  width:100%;
  display:flex;
  align-items:center;
  gap:14px;
  text-align:left;
  border:0;
  border-top:1px solid var(--line);
  background:transparent;
  padding:16px 0
}
.search-result>span {
  flex:1;
  min-width:0
}
.search-result b,.search-result small {
  display:block;
  overflow-wrap:anywhere
}
.search-result small {
  color:var(--muted);
  font-size:11px
}
.comment-item {
  padding:15px 0;
  border-top:1px solid var(--line)
}
.comment-item small {
  display:block;
  color:var(--muted);
  font-size:11px
}
.comment-item p {
  margin-bottom:0
}
.player-detail .player-row {
  display:flex;
  justify-content:center;
  gap:20px;
  margin:24px 0
}
.player-detail .player-row button {
  border:1px solid var(--line);
  border-radius:50%;
  width:45px;
  height:45px;
  background:#edf2e7
}
.player-detail .player-controls {
  color:var(--ink);
  flex-wrap:wrap
}
.player-detail .player-controls label {
  display:flex;
  gap:10px;
  align-items:center
}
.player-detail select {
  padding:8px;
  border-radius:10px;
  border:1px solid var(--line)
}
.player-detail input[type=range] {
  width:100%;
  accent-color:var(--green)
}
#qr-camera video {
  width:100%;
  max-height:300px;
  margin:15px 0
}
#modal-body {
  grid-area:1/1;
  min-width:0;
  overflow-wrap:anywhere
}
.profile-panel .btn {
  white-space:normal
}
.modal .btn {
  white-space:normal
}
.audio-player .player-controls {
  flex-wrap:wrap
}
.audio-player .player-controls>.btn-icon {
  background:var(--paper);
  color:var(--ink)
}
.modal #circle-feed .post {
  padding:20px
}
.feed-tabs button {
  min-height:36px
}
@media(max-width:900px) {
  .rankings-grid {
    grid-template-columns:1fr
  }
  .profile-columns {
    grid-template-columns:1fr
  }
  .feed-heading {
    flex-wrap:wrap
  }
  .feed-search {
    flex-wrap:wrap
  }
  .rank-card {
    padding:22px
  }
  .network-map {
    min-height:330px
  }
  .network-nodes {
    min-height:290px
  }
  .modal {
    padding:25px
  }
  .profile-panel {
    padding:20px
  }
  .audio-tools {
    flex-wrap:wrap
  }
}
@media(max-width:480px) {
  .modal {
    width:100%;
    padding:20px;
    max-height:calc(100dvh - 24px)
  }
  .help-steps {
    grid-template-columns:1fr
  }
  .profile-top {
    align-items:flex-start;
    flex-wrap:wrap
  }
  .qr-panel {
    gap:12px
  }
  .post-actions {
    gap:6px
  }
  .post-action {
    padding:8px
  }
  .post-head {
    flex-wrap:wrap
  }
  .post-follow {
    margin-left:auto
  }
  .book-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .audio-row {
    padding-inline:0
  }
  .audio-tools select {
    max-width:120px
  }
  .profile-panel h2 {
    font-size:22px
  }
  .copy-card .record-actions {
    width:100%
  }
  .record-actions .btn {
    white-space:normal
  }
  .modal .form-actions {
    align-items:stretch
  }
  .modal .form-actions .btn {
    flex:1 1 140px
  }
  .profile-actions>.btn {
    flex:1 1 160px
  }
  .record-actions {
    width:100%
  }
  .record-actions>.btn,.record-actions>.text-link {
    flex:1 1 125px
  }
  .station-create {
    flex-wrap:wrap
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important
  }
}
@media print {
  body>* {
    display:none!important
  }
  body>#modal-backdrop {
    display:block!important;
    position:static;
    background:white;
    padding:0
  }
  .modal {
    display:block!important;
    overflow:visible;
    max-height:none;
    box-shadow:none;
    width:100%;
    border:0
  }
  .modal-close,.form-actions,.modal a,.modal button {
    display:none!important
  }
  .qr-panel svg {
    width:220px
  }
}
/* Book photographs retain the card proportions and expand only inside the gallery. */
.book-card .cover.has-book-photo {
  padding:0;
  overflow:hidden;
  isolation:isolate;
  background:#e4e9e3
}
.book-card .cover.has-book-photo::before,.book-card .cover.has-book-photo::after {
  display:none
}
.book-cover-photo {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  position:absolute;
  inset:0
}
.copy-photo-button {
  flex:none;
  width:58px;
  height:78px;
  padding:0;
  border:1px solid var(--line-strong);
  border-radius:7px;
  overflow:hidden;
  background:var(--paper)
}
.copy-photo-button img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover
}
.copy-card-description {
  flex:1;
  min-width:min(180px,100%)
}
.book-photo-picker {
  border:1px solid var(--line-strong);
  border-radius:14px;
  padding:16px;
  min-width:0;
  margin:18px 0
}
.book-photo-picker legend {
  padding:0 7px;
  font-size:14px;
  font-weight:700
}
.book-photo-select {
  display:grid;
  gap:8px;
  font-size:13px;
  font-weight:600;
  margin-top:12px
}
.book-photo-select input {
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  border:1px solid var(--line-strong);
  border-radius:10px;
  background:white;
  padding:10px;
  font-size:13px
}
.book-photo-select input::file-selector-button {
  font:inherit;
  background:var(--mint);
  color:var(--forest);
  border:0;
  border-radius:6px;
  padding:7px 10px;
  margin-right:10px;
  cursor:pointer
}
.book-photo-selection {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(105px,1fr));
  gap:12px;
  margin-top:14px
}
.book-photo-draft {
  margin:0;
  min-width:0;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  background:var(--paper)
}
.book-photo-draft img {
  width:100%;
  height:115px;
  object-fit:contain;
  display:block;
  background:#e8eee7
}
.book-photo-draft figcaption {
  padding:9px;
  font-size:11px;
  display:grid;
  gap:7px;
  overflow-wrap:anywhere
}
.book-photo-draft figcaption>span {
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden
}
.book-photo-draft .text-link {
  font-size:12px;
  text-align:left;
  min-height:32px;
  padding:0
}
.book-photo-draft small {
  color:var(--green);
  font-weight:600
}
.book-photo-error {
  color:#9f312a;
  background:#fff0ed;
  border:1px solid #e5b4ac;
  padding:12px;
  border-radius:10px;
  font-size:13px;
  line-height:1.65;
  white-space:pre-wrap
}
.book-photo-progress {
  font-size:13px;
  color:var(--forest);
  line-height:1.65
}
.book-image-gallery {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin:20px 0
}
.book-image-card {
  border:1px solid var(--line);
  border-radius:13px;
  overflow:hidden;
  min-width:0;
  background:var(--paper)
}
.book-image-open {
  display:block;
  width:100%;
  padding:0;
  border:0;
  background:#e9eee7;
  cursor:zoom-in
}
.book-image-open img {
  display:block;
  width:100%;
  height:225px;
  object-fit:contain
}
.book-image-caption {
  padding:12px 13px 0;
  min-width:0
}
.book-image-caption p {
  font-size:13px;
  line-height:1.65;
  margin:6px 0 12px;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.book-image-caption .status-pill {
  font-size:11px
}
.book-image-actions {
  display:flex;
  flex-wrap:wrap;
  gap:5px 14px;
  padding:0 13px 12px
}
.book-image-actions .text-link {
  min-height:36px;
  font-size:12px;
  font-weight:600;
  padding:3px 0;
  text-align:left
}
.book-image-actions .book-photo-danger {
  color:#9f312a
}
.book-image-detail {
  margin:18px 0;
  border:1px solid var(--line);
  background:#e9eee7;
  border-radius:12px;
  overflow:hidden
}
.book-image-detail img {
  display:block;
  width:100%;
  height:auto;
  max-height:65dvh;
  object-fit:contain
}
.book-image-detail figcaption {
  background:var(--paper);
  padding:14px;
  font-size:14px;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.book-image-detail.is-delete img {
  max-height:280px
}
.book-photo-delete-confirm {
  background:#a03b32
}
.book-photo-delete-confirm:hover {
  background:#822d26
}
@media(max-width:480px) {
  .book-image-gallery {
    grid-template-columns:1fr;
    gap:14px
  }
  .book-image-open img {
    height:240px
  }
  .book-photo-picker {
    padding:12px
  }
  .book-photo-selection {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px
  }
  .book-photo-draft img {
    height:110px
  }
  .book-photo-select input {
    font-size:12px;
    padding:7px
  }
  .copy-card-description {
    min-width:0
  }
  .book-image-detail img {
    max-height:55dvh
  }
}
