.relation-entries, .relation-footer { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.relation-entries { justify-content: flex-end; }
.relation-footer { justify-content: space-between; margin-block-start: 12px; }
#relationsDialog { width: min(680px, calc(100% - 20px)); }
#relationsDialog:modal, #relationsDialog::backdrop { overscroll-behavior: contain; }
#relationsDialog::backdrop { overflow: hidden; }
#relationsDialog .dialog-body { min-width: 0; }
#guildViews button[aria-pressed="true"] { background: var(--teal); color: white; }
#relationsStatus { margin-block: 8px; }
.relation-facts, .guild-store-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.relation-facts { margin: 0; padding: 10px; background: #eff5f1; border-radius: 5px; }
.relation-facts dt { color: var(--muted); font-size: .85em; }
.relation-facts dd { margin: 2px 0 0; font-weight: 650; }
#relationsContent h3 { font-size: 14px; margin: 12px 0 6px; }
.guild-notice { overflow-wrap: anywhere; white-space: pre-wrap; }
#relationsContent .table-scroll { max-height: min(48dvh, 420px); overflow: auto; }
#relationsContent table { border-spacing: 0; }
#relationsContent thead { position: sticky; inset-block-start: 0; z-index: 2; }
#relationsContent tbody th { position: sticky; inset-inline-start: 0; z-index: 1; background: white; text-align: start; }
#relationsContent th, #relationsContent td { white-space: nowrap; }
#relationsContent th small { display: block; font-weight: normal; color: var(--muted); }
#relationsContent .relation-link { padding: 1px 0; border: 0; min-height: 24px; background: transparent; color: var(--teal); text-decoration: underline; }
.guild-store-item { display: inline-flex; gap: 6px; align-items: center; }
.guild-store-item img { inline-size: 28px; block-size: 28px; object-fit: contain; }
#relationsDialog:has(#guildStoreForm) { width: min(1120px, calc(100% - 20px)); }
.guild-store-workspace { display: grid; grid-template-columns: minmax(230px, 302px) minmax(0, 1fr); gap: 16px; align-items: start; }
.guild-bank-board {
  position: relative; inline-size: min(302px, 100%); aspect-ratio: 302 / 416; margin-inline: auto;
}
.guild-bank-board::before, .guild-bank-board::after {
  content: ""; position: absolute; inset-inline: 0;
  background: url(/bank/window.png) center top / 100% auto no-repeat; pointer-events: none;
}
.guild-bank-board::before { top: 0; height: 96.64%; }
.guild-bank-board::after { bottom: 0; height: 3.37%; background-position: center bottom; }
.guild-bank-board .bank-close { left: 89.74%; top: 1.92%; width: 7.29%; height: 5.29%; background-image: url(/bank/close.png); }
.guild-bank-grid { position: absolute; left: 4.97%; top: 9.86%; width: 90.07%; height: 86.54%; display: grid; align-content: space-between; }
.guild-bank-grid .bank-cell.dirty { outline: 2px solid var(--teal); outline-offset: -2px; }
.guild-store-switch { display: none; }
#guildStoreForm { min-width: 0; }
#relationsContent .guild-store-table { max-height: min(59dvh, 430px); }
#guildStoreForm .actions { justify-content: flex-end; }
#guildStoreForm .actions:has(button:not([hidden])) { margin-block-start: 8px; }
#guildStoreForm input { inline-size: 10ch; min-width: 0; padding-inline: 5px; font-variant-numeric: tabular-nums; }
#guildStoreForm input[data-field="IOO"] { inline-size: 13ch; }
#guildStoreForm input[data-field="SN"] { inline-size: 22ch; }
#guildStoreForm tr.dirty td, #guildStoreForm tr.dirty th { background: #eff7e9; }
#guildEditStatus:not([hidden]) { margin-block: 8px; }
@media (max-width: 760px) {
  .guild-store-workspace { display: block; }
  .guild-store-switch { display: flex; gap: 4px; margin-block: 6px; }
  .guild-store-switch [aria-pressed="true"] { color: white; background: var(--teal); }
  .guild-store-workspace[data-view="game"] #guildStoreForm,
  .guild-store-workspace[data-view="table"] .guild-bank-board { display: none; }
}

.couple-days-form { margin-block: 12px 0; }
.couple-days-field { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block: 4px; }
.couple-days-field input { width: min(12rem, 100%); }
.couple-days-field input:user-invalid { border-color: #a32c26; }
.couple-review { margin-block-start: 12px; border-block-start: 1px solid var(--line); }
.couple-review-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 6px; }
.couple-review-list > div { background: var(--soft); padding: 8px; border-radius: 4px; }
.couple-review-list dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }

