.replay-page {
  --bg: #171816;
  --bg-raised: #20211e;
  --text: #eeeae0;
  --text-dim: #a4a59a;
  --border: #343630;
  --accent: var(--brand-mint);
  --accent-bg: #263b31;
  color-scheme: dark;
}

main.wrap.replay-wrap { max-width: 1920px; padding: 28px clamp(24px, 4vw, 88px) 64px; }
.replay-page > footer { display: none; }
.rp { --mint: var(--brand-mint); --dim: var(--text-dim); color: var(--text); }
.rp-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.rp-heading h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.025em; }
#rp-current { margin: 6px 0 0; font-size: 13px; color: var(--dim); overflow-wrap: anywhere; }
.rp svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rp a { color: var(--mint); }
.rp [hidden] { display: none !important; }
.rp :focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.rp button, .rp select, .rp input:not([type=range]):not([type=file]):not([type=checkbox]) {
  font: inherit;
  font-size: 13px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-raised);
  color: var(--text);
  padding: 8px 12px;
}
.rp button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; cursor: pointer; transition: background 140ms, border-color 140ms, color 140ms; }
.rp button:hover:not(:disabled) { background: #2a302a; border-color: #5a7061; }
.rp button:active:not(:disabled) { background: #34493c; border-color: var(--mint); }
.rp button:disabled, .rp input[type=range]:disabled { opacity: .4; cursor: default; }
.rp button.rp-primary { background: var(--mint); color: #1a3024; border-color: var(--mint); font-weight: 600; }
.rp button.rp-primary:hover:not(:disabled) { background: #b1e9d2; border-color: #b1e9d2; }
.rp button.rp-primary:active:not(:disabled) { background: #7ac0a5; border-color: #7ac0a5; }
.rp button.rp-quiet { background: transparent; border-color: transparent; color: var(--dim); min-height: 32px; padding: 4px 8px; }
.rp input[type=checkbox] { accent-color: var(--mint); width: 15px; height: 15px; margin: 0; flex: none; }
.rp-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-muted { color: var(--dim); font-size: 12px; line-height: 1.7; }

/* Record selection stays separate from the map controls. */
.rp-library { position: absolute; z-index: 30; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--text); overflow: hidden; }
.rp-library:not([open]) { display: none; }
.rp-library::backdrop { background: #080e0be0; }
.rp button.rp-drawer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; background: #080e0bb8; border: 0; padding: 0; border-radius: 0; cursor: default; }
.rp-drawer-shell { position: relative; width: var(--rp-drawer-width); height: 100%; display: flex; flex-direction: column; background: #1b1e1a; border-right: 1px solid #39473d; box-shadow: 24px 0 80px #0004; transform: translateX(-100%); transition: transform 360ms cubic-bezier(.22,.85,.25,1); }
.rp-viewer[data-library-open="true"] .rp-drawer-shell { transform: translateX(0); }
.rp-drawer-handle-area { position: absolute; z-index: 32; inset: 0; pointer-events: none; }
.rp button.rp-drawer-handle { position: absolute; left: -16px; top: 50%; width: 32px; min-height: 32px; height: 32px; padding: 0; pointer-events: auto; border: 1px solid var(--mint); border-radius: 3px; background: #263b31; color: var(--mint); box-shadow: 0 3px 12px #0005; transform: translateY(-50%) rotate(45deg); transition: left 360ms cubic-bezier(.22,.85,.25,1), background 140ms; }
.rp-viewer[data-library-open="true"] .rp-drawer-handle { left: calc(var(--rp-drawer-width) - 16px); }
.rp-drawer-handle svg { transform: rotate(-45deg); }
.rp-viewer[data-library-open="true"] .rp-drawer-handle svg { transform: rotate(135deg); }
.rp-drawer-heading { display: flex; justify-content: space-between; align-items: center; padding: 22px 20px 18px; flex: none; }
.rp-drawer-heading h2 { margin: 6px 0 0; font-size: 26px; font-weight: 550; letter-spacing: -.03em; }
.rp-eyebrow { color: var(--mint); font-size: 10px; letter-spacing: .15em; }
.rp-drawer-heading #rp-close { width: 44px; height: 44px; }
.rp summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 13px; }
.rp summary::-webkit-details-marker { display: none; }
.rp-chevron { transition: transform 180ms ease; }
details[open] > summary > .rp-chevron { transform: rotate(180deg); }
.rp-library-body { padding: 0 20px max(20px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.rp-date-filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.rp-date-filters label { display: grid; gap: 7px; color: var(--dim); font-size: 11px; }
.rp-date-filters select { width: 100%; min-width: 0; min-height: 44px; border-radius: 5px; background: #252a24; }
.rp select:disabled { opacity: .4; }
.rp-library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
#rp-library-status { margin: 0; }
.rp-list-heading, .rp button.rp-library-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) 52px; gap: 10px; align-items: center; }
.rp-list-heading { padding: 8px 14px 12px; border-bottom: 1px solid #526153; color: var(--dim); font-size: 11px; }
.rp-list-heading span:last-child { text-align: right; }
#rp-library { display: flex; flex-direction: column; }
.rp-record { position: relative; }
.rp-record-menu { position: absolute; right: 6px; top: 18px; display: flex; align-items: center; gap: 4px; background: #1b1e1a; border-radius: 7px; }
.rp-record-menu > button.rp-quiet { min-width: 36px; min-height: 40px; font-size: 22px; }
.rp button.rp-delete-action { color: #ffb5ac; }
.rp-delete-confirm { padding: 14px; border: 1px solid #80534c; border-radius: 7px; background: #2c211f; margin: 4px 0 12px; }
.rp-delete-confirm p { font-size: 13px; line-height: 1.7; margin: 0 0 12px; overflow-wrap: anywhere; }
.rp-delete-confirm button + button { margin-left: 8px; }
.rp-record-edit { padding: 14px; border: 1px solid #526153; border-radius: 7px; background: #222a23; margin: 4px 0 12px; }
.rp-record-edit label { display: grid; gap: 8px; font-size: 12px; }
.rp-record-edit input { width: 100%; min-width: 0; margin-top: 8px; }
.rp-record-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rp-record-edit-error { color: #ffb5ac; font-size: 12px; overflow-wrap: anywhere; }
.rp-record-edit-error:empty { display: none; }
.rp button.rp-library-item { position: relative; isolation: isolate; width: 100%; min-height: 76px; padding: 16px 14px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; overflow: hidden; }
.rp button.rp-library-item::before { content: ''; position: absolute; z-index: -1; inset: 0 auto 0 0; width: var(--progress, 0%); background: #94d8bd1c; border-bottom: 2px solid var(--mint); transition: width 180ms linear; }
.rp button.rp-library-item[data-loading="true"] { opacity: 1; }
.rp button.rp-library-item:hover:not(:disabled) { background: #2c393030; }
.rp button.rp-library-item:active:not(:disabled) { background: #94d8bd24; }
.rp .rp-record-managed > button.rp-library-item { padding-right: 58px; }
.rp-library-item strong { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.rp-row-date { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.rp-row-status { font-size: 12px; text-align: right; color: var(--mint); }
#rp-more { margin-top: 16px; width: 100%; }
.rp-local-file { margin-top: 24px; }
.rp-local-file button { width: 100%; border-style: dashed; background: transparent; color: var(--dim); }
#rp-publish { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
#rp-publish h3 { font-size: 14px; margin: 0 0 10px; font-weight: 550; }
#rp-publish label { display: block; font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.rp-publish-fields { display: flex; gap: 8px; max-width: 640px; }
#rp-title { flex: 1; min-width: 0; }
#rp-upload { flex: none; }
#rp-publish .rp-muted { margin: 6px 0 0; }
#rp-upload-progress { width: 100%; accent-color: var(--mint); }

/* One frame for map, filters and transport. */
.rp-viewer { --rp-drawer-width: min(440px, 100%); position: relative; isolation: isolate; border: 1px solid var(--border); border-radius: 12px; background: #1b1e19; }
.rp-toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--border); background: var(--bg-raised); font-size: 12px; }
.rp-layers { display: flex; gap: 14px; align-items: center; }
.rp-toolbar label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.rp-toolbar > select { min-height: 34px; padding: 5px 26px 5px 10px; font-size: 12px; }
.rp-toolbar-end { position: relative; display: flex; align-items: center; gap: 10px; margin-left: auto; }
.rp button.rp-follow { min-height: 34px; padding: 5px 8px; font-size: 12px; gap: 5px; white-space: nowrap; }
.rp-follow svg { width: 15px; height: 15px; }
.rp button.rp-follow[aria-pressed="true"] { color: var(--mint); background: var(--accent-bg); border-color: #78ac92; }
.rp-dropdown > summary { min-height: 34px; padding: 5px 8px; color: var(--dim); font-size: 12px; border-radius: 6px; }
.rp-dropdown > summary:hover { background: #2a302a; color: var(--text); }
.rp-dropdown[open] > summary { background: var(--accent-bg); color: var(--mint); }
.rp-popover { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 240px; max-width: calc(100vw - 48px); max-height: min(400px, 65vh); overflow: auto; padding: 14px; background: #20251f; border: 1px solid #425247; border-radius: 8px; box-shadow: 0 12px 32px #0005; }
.rp-popover label { display: flex; align-items: center; gap: 8px; padding: 8px 2px; overflow-wrap: anywhere; }
.rp-retention { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.rp-retention label > span { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--dim); }
.rp-retention input { width: 76px; min-width: 0; text-align: right; }
.rp-retention .rp-muted { margin: 5px 0; }
.rp-retention button { width: 100%; }
#rp-legend:empty::before { content: '기록을 열면 연맹이 표시됩니다.'; color: var(--dim); font-size: 12px; }
.rp-maintenance { display: grid; gap: 8px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.rp-maintenance button { justify-content: flex-start; font-size: 12px; }

.rp-mapbox { position: relative; height: clamp(400px, calc(100dvh - 310px), 1100px); background: #1b231e; overflow: hidden; }
.rp-mapbox canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.rp-map-head, .rp-map-foot { position: absolute; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none; font-size: 11px; color: #c7d2c9; }
.rp-map-head { top: 12px; align-items: flex-start; }
.rp-map-head > span, .rp-map-foot > span { background: #151d17df; border: 1px solid #a0b5a31c; padding: 6px 9px; border-radius: 5px; }
.rp-map-head > span { max-width: calc(100% - 126px); }
.rp-map-controls { display: flex; gap: 4px; flex: none; }
.rp-map-controls button { pointer-events: auto; min-height: 32px; height: 32px; width: 32px; padding: 0; font-size: 20px; background: #19251ce8; border-color: #6b81714d; }
.rp-map-controls svg { width: 16px; height: 16px; }
.rp-map-foot { bottom: 12px; align-items: flex-end; }
#rp-coord { white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.rp-cross { position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; transform: translate(-50%, -50%); pointer-events: none; opacity: .3; }
.rp-cross::before, .rp-cross::after { content: ''; position: absolute; background: #fff; }
.rp-cross::before { top: 9px; width: 20px; height: 1px; }
.rp-cross::after { left: 9px; width: 1px; height: 20px; }
#rp-empty { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 80%; padding: 14px 18px; text-align: center; color: var(--dim); background: #19221be8; border: 1px solid #415346; border-radius: 8px; font-size: 13px; pointer-events: none; }

/* Fortress summaries remain compact overlays; alliance colors belong to the data. */
.rp-fort-panel { position: absolute; left: 14px; top: 58px; width: 300px; max-width: calc(100% - 28px); max-height: calc(100% - 118px); display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-height: 0; pointer-events: none; }
.rp-fort-panel[data-collapsed="true"] { width: max-content; }
.rp-fort-overlay { min-height: 0; flex: 0 1 auto; overflow: auto; display: grid; align-content: start; gap: 6px; pointer-events: none; scrollbar-width: thin; }
.rp button.rp-fort-toggle { align-self: flex-start; flex: none; justify-content: flex-start; gap: 6px; min-height: 36px; max-width: 100%; padding: 6px 9px; background: #192b20f8; border-color: #384f3f; color: #d2dfd5; font-size: 11px; line-height: 18px; white-space: nowrap; pointer-events: auto; }
.rp button.rp-fort-toggle:hover { background: #203729fa; }
.rp-fort-toggle-label { flex: none; color: #aabdb7; font-size: 10px; }
.rp-fort-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #9cdec9; font-size: 11px; font-variant-numeric: tabular-nums; }
.rp-fort-panel[data-collapsed="false"] .rp-fort-summary { display: none; }
.rp-fort-toggle svg { width: 13px; height: 13px; transition: transform 140ms; }
.rp-fort-panel[data-collapsed="true"] .rp-fort-toggle svg { transform: rotate(180deg); }
.rp button.rp-fort { position: relative; display: flex; flex-direction: column; gap: 3px; width: 100%; min-height: 52px; padding: 8px 10px 10px; overflow: hidden; text-align: left; border: 1px solid #728b7859; border-radius: 7px; background: #151f18e8; pointer-events: auto; line-height: 1.45; }
.rp button.rp-fort:disabled { opacity: 1; cursor: default; }
.rp button.rp-fort:hover:not(:disabled) { background: #253a2ceb; }
.rp button.rp-fort:active:not(:disabled) { background: #34533e; }
.rp-fort-heading { display: flex; gap: 8px; align-items: baseline; min-width: 0; width: 100%; }
.rp-fort-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 75%; }
.rp-fort-owner { flex: 1; min-width: 0; font-size: 11px; color: #bdcfc1; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-fort-values { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; width: 100%; font-size: 12px; }
.rp-hp { color: var(--mint); }
.rp-remaining { color: var(--text); }
.rp-fort-detail { color: #bdcfc1; font-size: 11px; font-variant-numeric: tabular-nums; }
.rp-fort-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: #354339; }
.rp-fort-fill { display: block; height: 100%; transition: width .2s linear; }
.rp-fort-ended .rp-fort-name, .rp-fort-ended .rp-hp, .rp-fort-ended .rp-remaining { color: var(--dim); }
.rp button.rp-fort { gap: 3px; min-height: 0; padding: 8px 10px; border-color: #384f3f; border-radius: 7px; background: #192b20f8; }
.rp button.rp-fort:hover:not(:disabled) { background: #203729fa; }
.rp-fort-heading { justify-content: space-between; gap: 6px; }
.rp-fort-name { flex: 1; max-width: none; font-size: 13px; line-height: 18px; }
.rp-fort-type { flex: 0 0 auto; color: #aabdb7; font-size: 10px; line-height: 16px; white-space: nowrap; }
.rp-fort-values { display: grid; grid-template-columns: minmax(0,1fr) 78px; gap: 8px; }
.rp-fort-health { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px 6px; }
.rp-fort-owner { text-align: left; font-size: 11px; line-height: 18px; }
.rp-hp { font-size: 25px; line-height: 28px; font-weight: 600; color: #9cdec9; }
.rp-hp-unit { font-size: 13px; font-weight: 400; margin-left: 1px; }
.rp-fort-bar { position: static; grid-column: 1/-1; height: 4px; width: 100%; background: #33493c; border-radius: 3px; overflow: hidden; }
.rp-fort-fill { height: 100%; border-radius: 3px; }
.rp-fort-lifetime { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 1px; border-left: 1px solid #3a5140; padding-left: 6px; }
.rp-fort-time-label { color: #aabdb7; font-size: 11px; line-height: 14px; white-space: nowrap; }
.rp-fort-lifetime.rp-restricted .rp-fort-time-label { color: #ffb16c; }
.rp-remaining { font-size: 21px; font-weight: 600; line-height: 24px; color: #edf3ef; letter-spacing: .02em; }
.rp-fort-detail:not([hidden]) { display: flex; align-self: stretch; align-items: center; gap: 6px; color: #9cdec9; font-size: 11px; line-height: 17px; margin-top: 2px; }
.rp-fort-detail.rp-restricted { color: #ffb16c; }
.rp-restricted .rp-fort-limit-label { background: #51351e; border: 1px solid #a56732; border-radius: 3px; font-size: 10px; line-height: 15px; padding: 0 5px; font-weight: 600; }
.rp-fort-limit-value { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rp-fort-ended .rp-fort-values { display: block; }
.rp-fort-ended .rp-fort-health { display: block; }
.rp-fort-ended .rp-hp, .rp-fort-ended .rp-fort-bar, .rp-fort-ended .rp-fort-lifetime { display: none; }
.rp button.rp-fort-ended { background: #18241c; border-color: #293d30; }
.rp-fort-ended .rp-fort-name, .rp-fort-ended .rp-fort-type, .rp-fort-ended .rp-fort-owner { color: #a4b8a8; }
.rp-selection { position: absolute; left: 14px; bottom: 56px; max-width: 260px; pointer-events: none; background: #151f18ed; border: 1px solid #728b7859; border-radius: 7px; padding: 8px 10px; white-space: pre-line; overflow-wrap: anywhere; font-size: 12px; line-height: 1.55; color: #d2dfd5; }

.rp-timeline { padding: 14px 18px 16px; background: var(--bg-raised); border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.rp-time { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
#rp-clock { color: var(--dim); font-size: 12px; font-weight: 400; }
#rp-elapsed { color: var(--text); font-size: 13px; white-space: nowrap; }
.rp input[type=range] { display: block; width: 100%; height: 20px; accent-color: var(--mint); margin: 8px 0 12px; cursor: pointer; }
.rp-transport { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rp-play { min-width: 106px; }
.rp-play svg { fill: currentColor; stroke: none; width: 16px; height: 16px; }
.rp-pause-symbol, .rp-play[data-playing="true"] .rp-play-symbol { display: none; }
.rp-play[data-playing="true"] .rp-pause-symbol { display: initial; }
.rp-speed-label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); }
.rp-share-button { margin-left: auto; white-space: nowrap; }
.rp-share-dialog { box-sizing: border-box; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 22px; border: 1px solid #526153; border-radius: 12px; background: #20211e; color: var(--text); box-shadow: 0 24px 80px #0008; overflow-y: auto; }
.rp-share-dialog::backdrop { background: #080e0bbd; }
.rp-share-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.rp-share-heading h2 { margin: 0; font-size: 20px; font-weight: 550; }
.rp-share-heading button { width: 38px; padding: 6px; }
.rp-share-choices { display: grid; gap: 10px; margin-bottom: 16px; }
.rp-share-choices button { justify-content: center; min-height: 44px; flex-wrap: wrap; }
#rp-share-time { color: var(--mint); font-variant-numeric: tabular-nums; }
#rp-share-url { width: 100%; min-width: 0; font-size: 12px; }
#rp-share-status { margin: 12px 0 0; font-size: 12px; overflow-wrap: anywhere; }
#rp-share-status:empty { display: none; }
.rp-messages { padding-inline: 2px; }
.rp-messages p { font-size: 12px; color: var(--dim); margin: 0 0 12px; overflow-wrap: anywhere; }
.rp-messages p:empty { display: none; }
#rp-retry { margin-bottom: 12px; }
#rp-locked { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; padding: 36px; }
#rp-locked h2 { font-size: 19px; font-weight: 550; margin: 0 0 10px; }
#rp-locked p { color: var(--dim); font-size: 14px; margin: 0 0 24px; }
.rp a.rp-login { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; background: #5865f2; color: #fff; border-radius: 7px; font-size: 13px; }
.rp a.rp-login:hover { background: #4752c4; text-decoration: none; }
.rp-account-link { margin-left: 8px; font-size: 12px; }

@media (max-width: 700px) {
  main.wrap.replay-wrap { padding-block: 24px 56px; }
  .rp-heading { align-items: center; gap: 10px; margin-bottom: 14px; }
  .rp-heading h1 { font-size: 18px; }
  #rp-current { font-size: 11px; }
  .rp-toolbar { gap: 10px; padding: 10px; }
  .rp-toolbar-end { gap: 2px; }
  .rp-library-body { padding-inline: 20px; }
  .rp-drawer-heading { padding: 24px 20px; }
  .rp-date-filters { gap: 8px; }
  .rp-list-heading, .rp button.rp-library-item { grid-template-columns: 76px minmax(0, 1fr) 58px; gap: 10px; padding-inline: 8px; }
  .rp-row-date, .rp-row-status { font-size: 11px; }
  .rp-library-item strong { font-size: 13px; }
  .rp-mapbox { height: max(340px, calc(100dvh - 340px)); min-height: 340px; }
  .rp-map-foot { flex-wrap: wrap; gap: 5px; }
  .rp-map-foot > span { padding: 4px 7px; }
  .rp-selection { bottom: 76px; max-width: calc(100% - 28px); }
  .rp-time { align-items: flex-start; flex-direction: column; gap: 2px; }
  .rp-timeline { padding: 12px; }
  .rp-transport { flex-wrap: wrap; }
  .rp-speed-label { margin-left: auto; }
  .rp-publish-fields { flex-wrap: wrap; }
  #rp-title { flex-basis: 100%; }
  #rp-locked { padding: 24px; }
}
@media (max-width: 420px) {
  main.wrap.replay-wrap { padding-inline: 24px; }
  .rp-toolbar-end { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .rp-toolbar > select { margin-left: auto; max-width: 148px; }
  .rp-map-head, .rp-map-foot { left: 10px; right: 10px; }
  .rp-map-head > span { max-width: calc(100% - 114px); }
  .rp-fort-panel { left: 10px; top: 72px; max-width: calc(100% - 20px); max-height: calc(100% - 142px); }
  .rp-fort-name { font-size: 12px; }
  .rp-transport > .rp-actions { width: 100%; justify-content: center; }
  .rp-transport .rp-actions button { padding-inline: 10px; }
  .rp-speed-label { margin: 0 auto; }
  .rp-library-toolbar { gap: 6px; align-items: flex-start; }
}
@media (max-width: 700px), (max-width: 1000px) and (max-height: 500px) {
  .rp-fort-panel:not([data-collapsed="true"]) { width: 216px; }
  .rp-fort-panel { gap: 4px; }
  .rp-fort-overlay { gap: 4px; }
  .rp button.rp-fort { gap: 1px; padding: 5px 6px; }
  .rp-fort-heading { gap: 4px; }
  .rp-fort-name { font-size: 12px; line-height: 16px; }
  .rp-fort-type { font-size: 9px; line-height: 14px; }
  .rp-fort-values { grid-template-columns: minmax(0,1fr) 60px; gap: 6px; }
  .rp-fort-health { gap: 2px 5px; }
  .rp-fort-owner { font-size: 10px; line-height: 15px; }
  .rp-hp { font-size: 18px; line-height: 22px; }
  .rp-hp-unit { font-size: 10px; }
  .rp-fort-bar { height: 2px; }
  .rp-fort-lifetime { gap: 0; padding-left: 5px; }
  .rp-fort-time-label { font-size: 10px; line-height: 12px; }
  .rp-remaining { font-size: 15px; line-height: 19px; }
  .rp-fort-detail:not([hidden]) { gap: 4px; font-size: 10px; line-height: 14px; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rp button, .rp-chevron, .rp-fort-fill, .rp-fort-toggle svg, .rp button.rp-library-item::before { transition: none; }
  .rp-drawer-shell, .rp button.rp-drawer-handle { transition: none; }
}
