/* ==========================================================================
   Beat sheet editor. Loaded on beat sheet pages with beat-shell.css, which styles
   what PHP renders around it.

   The idea: a writing desk. The paper holds only what the writer wrote, set in the
   book face. Template notes are printed on the desk beside the paper in the interface
   face, so the two voices can never be taken for each other.
   ========================================================================== */

.tool-app:has(> .beat-editor) {
    max-width: 1280px;
}

/* The page's own button would be the loudest thing on the sheet, and sit on top of it */
body:has(.beat-editor) .back-to-top {
    display: none;
}

/* The tool is the page, as it is in a desktop app: the first thing on screen is the sheet. The
   site header slims down, and the hero is one line, the h1 with a way back to the hub. editor.php
   moves the eyebrow and lede to just under the tool. */
body:has(.beat-editor) .header-inner {
    padding-top: 8px;
    padding-bottom: 8px;
}

.tool-page:has(.beat-editor) {
    padding-top: 6px;
}

.tool-page:has(.beat-editor) .tool-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 20px;
    max-width: 1280px;
    margin-bottom: 6px;
    text-align: left;
}

.tool-page:has(.beat-editor) .tool-hero h1 {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.25;
}

.tool-page:has(.beat-editor) .tool-hero .breadcrumb {
    order: 1;
    margin: 0 0 0 auto;
    font-size: 13px;
}

.tool-page:has(.beat-editor) .tool-hero .breadcrumb ol {
    justify-content: flex-end;
}

/* The h1 beside it says the same */
.tool-page:has(.beat-editor) .tool-hero .breadcrumb li:last-child {
    display: none;
}

/* With no JavaScript the eyebrow and lede stay in the hero and there is no editor above them */
.tool-page:has(.beat-editor) .tool-hero .tool-eyebrow,
.tool-page:has(.beat-editor) .tool-hero .tool-lede {
    order: 2;
    flex: 0 0 100%;
    max-width: 860px;
    margin: 6px 0 0;
}

.tool-page:has(.beat-editor) .tool-app ~ .tool-eyebrow {
    margin: 24px auto 0;
    text-align: center;
}

.tool-page:has(.beat-editor) .tool-app ~ .tool-lede {
    margin: 6px auto 0;
    padding: 0 20px;
    font-size: 1.0625rem;
    line-height: 1.5;
    text-align: center;
}

.beat-editor {
    --desk: #EFE9DE;
    --desk-line: #DDD4C4;
    --paper: #FFFEFB;
    --note-ink: #655540;
    --rule: rgba(146, 64, 14, 0.42);
    --ruled: rgba(120, 90, 50, 0.13);
    --gap: 16px;
    --pad: 32px;
    position: relative;
    padding: 0 var(--pad) 22px;
    background: var(--desk);
    border-radius: 14px;
    font-family: var(--font-ui);
    color: var(--text-primary);
    text-align: left;
}

/* Holds the page still until the beats are in */
.beat-editor:not(.is-ready) {
    min-height: 1300px;
}

.beat-editor p {
    margin: 0;
    font-family: var(--font-ui);
    line-height: 1.45;
}

.beat-editor button {
    font-family: var(--font-ui);
}

.beat-editor :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.beat-link {
    padding: 2px 0;
    background: none;
    border: 0;
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(146, 64, 14, 0.35);
    text-underline-offset: 3px;
    cursor: pointer;
}

.beat-link:hover {
    color: var(--accent-hover);
    text-decoration-color: currentColor;
}

/* Title and tally: the left of the bar ------------------------------------------- */
.beat-head {
    flex: 1 1 200px;
    min-width: 0;
}

.beat-editor .beat-story-title {
    display: block;
    width: 100%;
    padding: 0 0 2px;
    background: none;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    transition: border-color 0.15s ease;
}

.beat-story-title::placeholder {
    color: #8E7E67;
    opacity: 1;
}

.beat-story-title:hover {
    border-bottom-color: var(--desk-line);
}

.beat-editor .beat-story-title:focus-visible {
    outline: none;
    border-bottom-color: var(--accent);
}

.beat-editor .beat-tally {
    overflow: hidden;
    font-size: 13px;
    line-height: 18px;
    color: var(--note-ink);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.beat-tally-name {
    font-weight: 600;
}

.beat-tally-name::after {
    content: ' \00B7';
    font-weight: 400;
}

.beat-target {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13.5px;
    color: var(--note-ink);
}

.beat-target label {
    font-weight: 600;
    white-space: nowrap;
}

.beat-target-field {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(255, 254, 251, 0.6);
    border: 1px solid var(--desk-line);
    border-radius: 6px;
    font-size: 13.5px;
}

.beat-target-field:focus-within {
    background: var(--paper);
    border-color: var(--accent);
}

.beat-target-field input {
    width: 76px;
    padding: 0;
    background: none;
    border: 0;
    font-family: var(--font-ui);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.beat-target-field input::placeholder {
    color: #6F5F4A;
    opacity: 1;
}

.beat-editor .beat-target-field input:focus-visible {
    outline: none;
}

.beat-target-field:has([aria-invalid="true"]) {
    border-color: #A3271B;
}

/* Over what follows, so it moves nothing and only lasts as long as the mistake */
.beat-target-bad {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 21;
    margin-top: 3px;
    padding: 2px 8px;
    background: #A3271B;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.beat-target-bad[hidden] {
    display: none;
}

/* The bar: stays in reach while the sheet scrolls ------------------------------ */
.beat-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 calc(var(--pad) * -1);
    padding: 7px var(--pad) 0;
    background: var(--desk);
    border-bottom: 1px solid var(--desk-line);
    border-radius: 14px 14px 0 0;
}

.beat-bar-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.beat-tools {
    flex: none;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.beat-views {
    display: inline-flex;
    margin: 0;
    padding: 2px;
    background: rgba(101, 85, 64, 0.11);
    border: 0;
    border-radius: 8px;
}

.beat-views label {
    position: relative;
    cursor: pointer;
}

.beat-views input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.beat-views span {
    display: block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--note-ink);
}

.beat-views input:checked + span {
    background: var(--paper);
    box-shadow: 0 1px 2px rgba(60, 40, 15, 0.16);
    color: var(--text-primary);
}

.beat-views input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.beat-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--note-ink);
    cursor: pointer;
}

.beat-switch input {
    position: absolute;
    width: 28px;
    height: 16px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.beat-switch-track {
    position: relative;
    width: 28px;
    height: 16px;
    background: #BDB09B;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.beat-switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.beat-switch input:checked + .beat-switch-track {
    background: var(--accent);
}

.beat-switch input:checked + .beat-switch-track::after {
    transform: translateX(12px);
}

.beat-switch input:focus-visible + .beat-switch-track {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.beat-editor .beat-save {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--note-ink);
    white-space: nowrap;
}

.beat-save-dot {
    width: 7px;
    height: 7px;
    background: #A89A83;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.beat-save[data-state="saved"] .beat-save-dot {
    background: #4D7C3F;
}

.beat-save[data-state="saving"] .beat-save-dot {
    background: #C08A2E;
}

.beat-save[data-state="error"] {
    font-weight: 600;
    color: #A3271B;
}

.beat-save[data-state="error"] .beat-save-dot {
    background: #A3271B;
}

.beat-save-more {
    display: none;
    margin-left: -7px;
    white-space: pre;
}

.beat-save[data-state="saved"] .beat-save-more {
    display: inline;
}

.beat-export {
    position: relative;
    flex: none;
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.beat-export .btn {
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.3;
}

.beat-export .btn-secondary {
    padding: 7px 12px;
    background: var(--paper);
}

.beat-export .btn-secondary:hover {
    background: var(--accent);
}

.beat-editor .btn:disabled,
.beat-opts-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.beat-opts-btn {
    display: grid;
    place-items: center;
    width: 34px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 6px;
    color: var(--note-ink);
    cursor: pointer;
}

.beat-opts-btn:hover:not(:disabled),
.beat-opts-btn[aria-expanded="true"] {
    background: rgba(101, 85, 64, 0.12);
    color: var(--text-primary);
}

/* What a writer sets once or rarely, kept off the bar */
.beat-opts {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 22;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 264px;
    padding: 14px;
    background: var(--paper);
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(90, 65, 30, 0.14), var(--shadow-lg);
}

.beat-opts .beat-target-field {
    flex: none;
}

.beat-ask {
    gap: 10px;
}

.beat-ask-label {
    font-weight: 600;
}

.beat-ask input {
    width: 100%;
    padding: 8px 10px;
    font: inherit;
    color: inherit;
    background: var(--paper);
    border: 1px solid rgba(90, 65, 30, 0.28);
    border-radius: 6px;
}

.beat-ask-hint {
    margin: -4px 0 2px;
    font-size: 0.8125rem;
    opacity: 0.75;
}

.beat-ask .btn {
    width: 100%;
}

.beat-ask .beat-opt {
    align-self: center;
}

.beat-opt {
    padding: 2px 0;
    background: none;
    border: 0;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    color: var(--accent);
    cursor: pointer;
}

.beat-opt:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.beat-opt[hidden] {
    display: none;
}

.beat-opt-danger {
    color: #A3271B;
}

.beat-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--note-ink);
    cursor: pointer;
}

.beat-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--accent);
}

/* The ruler: the whole story at a glance ---------------------------------------- */
.beat-ruler {
    flex: 0 0 100%;
    position: relative;
    z-index: 2;
    height: 36px;
    margin-top: 3px;
}

.beat-ruler[hidden] {
    display: none;
}

.beat-ruler-acts,
.beat-ruler-line {
    position: absolute;
    left: 12px;
    right: 12px;
}

.beat-ruler-acts {
    top: 0;
    height: 22px;
}

.beat-ruler-act {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--desk-line);
}

/* The script places these beside the ticks, far enough along to be read whole */
.beat-ruler-label {
    position: absolute;
    top: 0;
    margin-left: 6px;
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--note-ink);
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* A name that slid past the next act's tick covers it */
.beat-ruler-label {
    z-index: 1;
    padding-right: 4px;
    background: var(--desk);
}

.beat-ruler-line {
    top: 14px;
    height: 22px;
}

.beat-ruler-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #C7BAA4;
}

/* 24px wide, and the script keeps marks 24px apart, so targets never overlap */
.beat-dot {
    position: absolute;
    top: 0;
    width: 24px;
    height: 22px;
    margin-left: -12px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.beat-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    background: var(--desk);
    border: 1.5px solid #9C8C75;
    border-radius: 50%;
    transition: transform 0.12s ease, background 0.12s ease;
}

/* A mark standing for a run of beats, when the strip is too short for one each */
.beat-dot.is-run::before {
    width: 16px;
    margin-left: -8px;
    border-radius: 5px;
}

.beat-dot.is-filled::before {
    background: var(--accent);
    border-color: var(--accent);
}

.beat-dot.is-some::before {
    background: linear-gradient(to right, var(--accent) 50%, var(--desk) 50%);
    border-color: var(--accent);
}

.beat-dot:hover::before {
    transform: scale(1.35);
}

.beat-dot[aria-current]::before {
    box-shadow: 0 0 0 3px rgba(146, 64, 14, 0.24);
    border-color: var(--accent);
    transform: scale(1.2);
}

.beat-editor .beat-ruler-tip {
    position: absolute;
    top: 100%;
    max-width: min(420px, 100%);
    margin-top: 3px;
    padding: 4px 9px;
    overflow: hidden;
    background: var(--text-primary);
    border-radius: 5px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    color: #FFFDF8;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: none;
}

.beat-ruler-tip[hidden] {
    display: none;
}

/* Notices ----------------------------------------------------------------------- */
/* Stuck under the bar: an import can start from anywhere on the sheet */
.beat-notice {
    position: sticky;
    top: calc(var(--beat-stick, 100px) - 16px);
    z-index: 18;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 20px;
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--paper);
    border-left: 3px solid #A89A83;
    border-radius: 3px;
    box-shadow: 0 6px 14px -10px rgba(60, 40, 15, 0.45);
    font-size: 14px;
}

.beat-notice[data-kind="error"] {
    border-left-color: #A3271B;
}

.beat-notice[data-kind="warn"] {
    border-left-color: #C08A2E;
}

.beat-editor .beat-notice p {
    flex: 1 1 280px;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
}

.beat-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.beat-notice[hidden] {
    display: none;
}

/* After an export: docked to the bottom of the window, inside the editor. It scrolls with
   nothing, so the writer keeps their place, and folds to its first line when writing goes on. */
.beat-after {
    position: sticky;
    bottom: 12px;
    z-index: 19;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 16px;
    max-height: calc(100vh - 88px);
    max-height: calc(100dvh - 88px);
    margin-top: 14px;
    padding: 12px 12px 18px 24px;
    overflow: auto;
    background: var(--text-primary);
    border-radius: 8px;
    box-shadow: 0 12px 30px -10px rgba(40, 25, 5, 0.5);
    color: #F4EEE3;
    animation: beat-rise 0.2s ease-out;
}

.beat-after[hidden] {
    display: none;
}

.beat-after:focus {
    outline: none;
}

.beat-after.is-folded {
    padding: 6px 12px 6px 24px;
}

@keyframes beat-rise {
    from { opacity: 0; transform: translateY(8px); }
}

.beat-after-body {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 44px;
    padding-right: 12px;
}

.beat-after-body[hidden] {
    display: none;
}

.beat-after-controls {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.beat-after-close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 6px;
    color: #CFC4B2;
    cursor: pointer;
}

.beat-after-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.beat-after :focus-visible {
    outline-color: #F2C879;
}

.beat-editor .beat-after-file {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    color: #CFC4B2;
}

.beat-editor .is-folded .beat-after-file {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.beat-editor .beat-after-title {
    margin: 2px 0 6px;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.12;
    color: #FFFDF8;
}

.beat-editor .beat-after-text {
    font-size: 14.5px;
    line-height: 1.5;
    color: #E2D9CA;
}

.beat-editor .beat-after-more {
    margin-top: 12px;
}

.beat-after .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.beat-after .btn-primary {
    background: #F2C879;
    color: #2A1C08;
}

.beat-after .btn-primary:hover {
    background: #F7D899;
    color: #2A1C08;
}

.beat-after .btn-secondary {
    border-color: #F2C879;
    color: #F2C879;
}

.beat-after .btn-secondary:hover {
    background: #F2C879;
    color: #2A1C08;
}

.beat-after-steps ol {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.beat-after-steps li {
    position: relative;
    margin: 0;
    padding-left: 30px;
    font-size: 14.5px;
    line-height: 1.45;
    color: #F4EEE3;
    counter-increment: step;
}

.beat-after-steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1px solid #8E8069;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #E2D9CA;
}

.beat-after-steps li:first-child::before {
    top: 7px;
}

.beat-after-steps strong {
    font-weight: 600;
    color: #FFFDF8;
}

.beat-editor .beat-after-steps p {
    margin-bottom: 10px;
    font-size: 14.5px;
    color: #F4EEE3;
}

.beat-after-free {
    margin-left: 8px;
    font-size: 13px;
    color: #CFC4B2;
    white-space: nowrap;
}

.beat-editor .beat-after-switch {
    margin-top: 6px;
}

.beat-after .beat-link {
    color: #F2C879;
    text-decoration-color: rgba(242, 200, 121, 0.45);
}

/* The sheet ---------------------------------------------------------------------- */
.beat-band-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 6px;
    padding-top: 8px;
}

.beat-band-head[hidden] {
    display: none;
}

.beat-band-head h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.3125rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary);
}

.beat-editor .beat-band-range {
    flex: none;
    font-size: 12.5px;
    color: var(--note-ink);
    font-variant-numeric: tabular-nums;
}

.beat-band:not(:has(.beat-band-head:not([hidden]))) {
    padding-top: 12px;
}

.beat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(262px, 100%), 1fr));
    column-gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Two rows on a shared grid: every note ends where its card begins, so the cards line up */
.beat,
.beat-add,
.beat-gone {
    grid-row: span 2;
    min-width: 0;
    margin: 0;
}

.beat {
    position: relative;
    display: grid;
    grid-template-rows: subgrid;
}

/* Tabbing must not leave a field under the sticky bar. This goes on the sheet's own controls:
   as scroll-padding on the page it would also act on the bar and throw the page to the top. */
.beat-sheet :is(.beat, textarea, button) {
    scroll-margin-top: var(--beat-stick, 130px);
    scroll-margin-bottom: calc(24px + var(--beat-dock, 0px));
}

.beat.is-dragging {
    opacity: 0.45;
}

/* A note: the interface face, on the desk. The question is always there in full. It takes at least
   two lines, and the shared grid row keeps the cards under it level. All of the note floats beside the card, over its neighbours: opening it moves
   nothing, and the writer can read it and keep typing. ------------------------------------------ */
.beat-note {
    display: contents;
}

.beat-editor[data-notes="off"] .beat-note {
    display: none;
}

.beat-editor .beat-note-q {
    grid-row: 1;
    display: flex;
    align-items: flex-start;
    position: relative;
    width: 100%;
    min-height: calc(2 * 1.42em);
    margin: 0 0 6px;
    padding: 0 2px 0 14px;
    background: none;
    border: 0;
    border-radius: 3px;
    font-size: 13.5px;
    line-height: 1.42;
    text-align: left;
    color: var(--note-ink);
    cursor: pointer;
}

/* In columns two lines hold almost every question. The note always gives it in full. */
@media (min-width: 570px) {
    .beat-editor:not([data-view="list"]) .beat-note-line {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }
}

.beat-note-q::before {
    content: '';
    position: absolute;
    top: 0.42em;
    left: 1px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent currentColor;
    opacity: 0.65;
    transition: transform 0.12s ease;
}

.beat-note-q[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.beat-editor .beat-note-q:hover,
.beat-editor .beat-note-q[aria-expanded="true"] {
    color: var(--text-primary);
}

.beat-note-more {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 15;
    width: 330px;
    max-width: 100vw;
    max-height: calc(100vh - var(--beat-stick, 130px) - var(--beat-dock, 0px) - 16px);
    padding: 12px 34px 14px 16px;
    overflow: auto;
    background: #E8DECC;
    border: 0 solid var(--accent);
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(90, 65, 30, 0.16), 0 14px 28px -12px rgba(60, 40, 15, 0.5);
    animation: beat-note-in 0.12s ease-out;
}

.beat-note-more[hidden] {
    display: none;
}

.beat-note-more[data-side="right"] {
    border-left-width: 3px;
}

.beat-note-more[data-side="left"] {
    border-right-width: 3px;
}

@keyframes beat-note-in {
    from { opacity: 0; }
}

.beat-editor .beat-note-full {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.beat-editor .beat-note-guide,
.beat-editor .beat-note-example {
    font-size: 13.5px;
    line-height: 1.5;
    color: #4A3C2A;
}

.beat-editor .beat-note-eg {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #4A3C2A;
}

.beat-editor .beat-note-example {
    font-style: italic;
}

.beat-note-close {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 5px;
    color: #4A3C2A;
    cursor: pointer;
}

.beat-note-close:hover {
    background: rgba(101, 85, 64, 0.16);
}

/* The paper: an index card, and nothing on it but the writer's words ---------------- */
.beat-paper {
    grid-row: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-bottom: var(--gap);
    padding: 7px 14px 6px;
    background: var(--paper);
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(90, 65, 30, 0.1), 0 1px 1px rgba(90, 65, 30, 0.1), 0 8px 16px -12px rgba(70, 50, 20, 0.35);
    transition: box-shadow 0.15s ease;
}

.beat-paper:focus-within {
    box-shadow: 0 0 0 1.5px var(--accent), 0 10px 22px -12px rgba(70, 50, 20, 0.45);
}

.beat.just-moved .beat-paper {
    animation: beat-moved 0.7s ease-out;
}

@keyframes beat-moved {
    from { background: #FBEBCB; }
}

.beat.is-drop-before .beat-paper,
.beat.is-drop-after .beat-paper {
    z-index: 1;
}

.beat.is-drop-before .beat-paper::after,
.beat.is-drop-after .beat-paper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.beat.is-drop-before .beat-paper::after { left: -11px; }
.beat.is-drop-after .beat-paper::after { right: -11px; }

.beat-paper-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 0 24px 3px 0;
    border-bottom: 1.5px solid var(--rule);
}

.beat-num {
    flex: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.beat-num:active {
    cursor: grabbing;
}

.beat-names {
    flex: 1;
    min-width: 0;
}

.beat-kicker {
    display: block;
    overflow: hidden;
    font-size: 11.5px;
    line-height: 1.3;
    color: var(--note-ink);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.beat-kicker[hidden] {
    display: none;
}

.beat-editor .beat-name {
    display: block;
    width: 100%;
    padding: 1px 0;
    overflow: hidden;
    resize: none;
    field-sizing: content;
    background: none;
    border: 0;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.beat-name::placeholder {
    font-weight: 500;
    color: #84745E;
    opacity: 1;
}

.beat-editor .beat-name:focus-visible {
    outline: none;
    box-shadow: 0 1px 0 var(--accent);
}

/* A very long name must not stretch the card. All of it shows while it is being edited. */
.beat-editor .beat-name:not(:focus) {
    max-height: calc(3 * 1.3em + 2px);
}

.beat-done {
    flex: none;
    display: inline-flex;
    color: #4D7C3F;
}

.beat-done[hidden] {
    display: none;
}

.beat-more {
    position: absolute;
    top: 6px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 5px;
    color: #8E7E67;
    cursor: pointer;
}

.beat-more:hover,
.beat-more[aria-expanded="true"] {
    background: rgba(101, 85, 64, 0.12);
    color: var(--text-primary);
}

/* 26px lines: the ruling sits under the type like a real card */
.beat-editor .beat-text {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 78px;
    max-height: 260px; /* FOLD_HEIGHT in the script */
    padding: 0;
    overflow-y: auto;
    resize: none;
    field-sizing: content;
    background-color: transparent;
    background-image: linear-gradient(to bottom, transparent 25px, var(--ruled) 25px, var(--ruled) 26px);
    background-size: 100% 26px;
    background-attachment: local;
    border: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 26px;
    color: var(--text-primary);
}

.beat-text::placeholder {
    color: #75654F;
    opacity: 1;
}

.beat-editor .beat-text:focus-visible {
    outline: none;
}

/* More words than the card shows. In the writer's hands it scrolls; left alone it says so. */
.beat.is-clipped .beat-text:not(:focus) {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
}

.beat-editor .beat.is-unfolded .beat-text {
    max-height: none;
}

.beat-editor .beat-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 10px;
    min-height: 18px;
    margin-top: 3px;
    font-size: 12px;
    line-height: 18px;
    color: var(--note-ink);
    font-variant-numeric: tabular-nums;
}

.beat-where,
.beat-count {
    white-space: nowrap;
}

.beat-editor .beat-fold {
    flex-basis: 100%;
    padding: 0;
    font-size: 12.5px;
    line-height: 22px;
    text-align: left;
}

.beat-fold[hidden] {
    display: none;
}

/* The beat menu -------------------------------------------------------------------- */
.beat-menu {
    position: absolute;
    top: 42px;
    right: 8px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    min-width: 204px;
    padding: 5px;
    background: var(--paper);
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(90, 65, 30, 0.14), var(--shadow-lg);
}

.beat-menu[hidden] {
    display: none;
}

.beat-menu button {
    padding: 7px 10px;
    background: none;
    border: 0;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
}

.beat-menu button:hover:not(:disabled),
.beat-menu button:focus {
    background: var(--surface);
    outline: none;
}

.beat-menu button:disabled {
    color: #A89A83;
    cursor: default;
}

.beat-menu .beat-menu-danger {
    margin-top: 4px;
    color: #A3271B;
}

/* Add a beat, and a deleted beat's place -------------------------------------------- */
.beat-add {
    display: grid;
    grid-template-rows: subgrid;
}

.beat-add button {
    grid-row: 2;
    align-self: start;
    justify-self: start;
    margin-bottom: var(--gap);
    padding: 7px 12px;
    background: none;
    border: 1px dashed #B5A68F;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--note-ink);
    cursor: pointer;
}

.beat-add button:hover {
    background: rgba(255, 254, 251, 0.6);
    border-color: var(--accent);
    color: var(--accent);
}

.beat-gone {
    align-self: end;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 84px;
    margin-bottom: var(--gap);
    padding: 12px 14px;
    border: 1px dashed #B5A68F;
    border-radius: 3px;
}

.beat-editor .beat-gone-text {
    overflow-wrap: anywhere;
    font-size: 13.5px;
    color: var(--note-ink);
}

.beat-editor .beat-gone-actions {
    display: flex;
    gap: 16px;
}

/* Under the sheet -------------------------------------------------------------------- */
.beat-editor .beat-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--note-ink);
}

.beat-keys kbd {
    padding: 0 4px;
    background: rgba(255, 254, 251, 0.7);
    border: 1px solid var(--desk-line);
    border-radius: 3px;
    font-family: var(--font-ui);
    font-size: 11.5px;
}

.beat-drop {
    position: absolute;
    inset: 8px;
    z-index: 40;
    display: none;
    place-items: center;
    background: rgba(255, 254, 251, 0.93);
    border: 2px dashed var(--accent);
    border-radius: 10px;
    pointer-events: none;
}

.beat-editor.is-dropping .beat-drop {
    display: grid;
}

.beat-editor .beat-drop p {
    position: sticky;
    top: 40vh;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--accent);
}

/* List view: one long page, a line of margin for each note. A beat is as tall as its words. */
.beat-editor[data-view="list"] .beat-grid {
    display: block;
}

.beat-editor[data-view="list"] .beat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    grid-template-rows: auto;
    column-gap: 26px;
}

.beat-editor[data-view="list"] .beat-paper {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
    padding: 10px 22px 10px;
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(90, 65, 30, 0.08);
}

.beat-editor[data-view="list"] .beat-paper:focus-within {
    z-index: 1;
    box-shadow: 0 0 0 1.5px var(--accent);
}

.beat-editor[data-view="list"] .beat-note-q {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    min-height: 0;
    margin: 0;
    padding: 12px 0 8px 14px;
}

.beat-editor[data-view="list"] .beat-note-q::before {
    top: calc(12px + 0.42em);
}

.beat-editor[data-view="list"] .beat-paper-top {
    align-items: baseline;
    min-height: 0;
    padding: 0 190px 2px 0;
    border-bottom: 0;
}

.beat-editor[data-view="list"] .beat-name {
    font-family: var(--font-display);
    font-size: 1.3125rem;
    line-height: 1.2;
}

.beat-editor[data-view="list"] .beat-text {
    min-height: 56px;
    max-height: none;
    background-image: none;
    font-size: 17px;
    line-height: 28px;
}

.beat-editor[data-view="list"] .beat-foot {
    position: absolute;
    top: 13px;
    right: 44px;
    min-height: 0;
    margin: 0;
    gap: 0 12px;
    pointer-events: none;
}

.beat-editor[data-view="list"] .beat-add,
.beat-editor[data-view="list"] .beat-gone {
    width: calc(100% - 326px);
}

.beat-editor[data-view="list"] .beat-add {
    display: block;
    padding: 10px 0 0;
}

.beat-editor[data-view="list"] .beat-add button {
    margin-bottom: 0;
}

.beat-editor[data-view="list"] .beat-gone {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 0;
}

.beat-editor[data-view="list"] .beat-band:last-of-type .beat-grid {
    margin-bottom: var(--gap);
}

.beat-editor[data-view="list"][data-notes="off"] .beat {
    grid-template-columns: minmax(0, 1fr);
}

.beat-editor[data-view="list"][data-notes="off"] .beat-add,
.beat-editor[data-view="list"][data-notes="off"] .beat-gone {
    width: auto;
}

.beat-editor[data-view="list"][data-notes="off"] .beat-grid,
.beat-editor[data-view="list"][data-notes="off"] .beat-band-head {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

/* Overview: the whole story on one screen. The same cards with the desk cleared away: every beat's
   name and its first lines, still editable. -------------------------------------------------- */
.beat-editor[data-view="overview"] {
    --gap: 10px;
}

/* Short acts share a row, each as wide as its beats, so a structure of many small acts still fits */
.beat-editor[data-view="overview"] .beat-sheet {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
}

.beat-editor[data-view="overview"] .beat-band {
    flex: var(--beats, 1) 1 calc(var(--beats, 1) * 176px + (var(--beats, 1) - 1) * 10px);
    min-width: 0;
    max-width: 100%;
}

.beat-editor[data-view="overview"] .beat-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(176px, 100%), 1fr));
    column-gap: 10px;
}

.beat-editor[data-view="overview"] .beat-note,
.beat-editor[data-view="overview"] .beat-add,
.beat-editor[data-view="overview"] .beat-foot {
    display: none;
}

.beat-editor[data-view="overview"] .beat-band:not(:has(.beat-band-head:not([hidden]))) {
    padding-top: 10px;
}

.beat-editor[data-view="overview"] .beat-band-head {
    margin-bottom: 5px;
    padding-top: 6px;
}

.beat-editor[data-view="overview"] .beat-band-head h3 {
    font-size: 1.0625rem;
}

.beat-editor[data-view="overview"] .beat-paper {
    padding: 6px 10px 6px;
}

.beat-editor[data-view="overview"] .beat-paper-top {
    min-height: 26px;
    padding: 0 22px 3px 0;
    border-bottom-width: 1px;
}

.beat-editor[data-view="overview"] .beat-name {
    font-size: 13.5px;
    line-height: 1.25;
}

.beat-editor[data-view="overview"] .beat-kicker {
    font-size: 11px;
}

.beat-editor[data-view="overview"] .beat-more {
    top: 4px;
    right: 3px;
    width: 24px;
    height: 24px;
}

.beat-editor[data-view="overview"] .beat-text,
.beat-editor[data-view="overview"] .beat.is-unfolded .beat-text {
    min-height: 60px;
    max-height: 60px;
    margin-top: 3px;
    background-image: none;
    font-size: 14px;
    line-height: 20px;
}

.beat-editor[data-view="overview"] .beat.is-clipped .beat-text:not(:focus) {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
}

.beat-editor[data-view="overview"] .beat-gone {
    min-height: 0;
    padding: 8px 10px;
}

/* Medium screens ------------------------------------------------------------------------ */
@media (max-width: 1040px) {
    .beat-save-more,
    .beat-save[data-state="saved"] .beat-save-more {
        display: none;
    }

    .beat-save:not([data-state="error"]) #beat-save-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .beat-after-body {
        gap: 6px 28px;
    }
}

/* The sheet needs the height: on a short window only the bar's top row stays stuck */
@media (max-height: 620px) {
    .beat-bar {
        display: contents;
    }

    .beat-bar-main {
        position: sticky;
        top: 0;
        z-index: 20;
        margin: 0 calc(var(--pad) * -1);
        padding: 7px var(--pad);
        background: var(--desk);
        border-bottom: 1px solid var(--desk-line);
    }
}

/* So short that a stuck bar would take the sheet's room, as at 400% zoom */
@media (max-height: 420px) {
    .beat-bar-main,
    .beat-tools {
        position: static;
    }
}

/* One column: nothing to float over, so a note opens under its card and the text stays put */
@media (max-width: 569px) {
    .beat {
        grid-row: auto;
        display: flex;
        flex-direction: column;
    }

    .beat-editor .beat-note-q {
        order: 1;
        min-height: 0;
    }

    .beat-paper {
        order: 2;
    }

    .beat-note-more {
        order: 3;
        position: relative;
        width: auto;
        max-width: none;
        max-height: none;
        margin: calc(var(--gap) * -1 + 6px) 0 var(--gap);
        overflow: visible;
    }

    .beat-editor .beat-note-full {
        display: none;
    }
}

/* Phones: the bar's top row alone stays stuck, so it never eats the screen ----------------- */
@media (max-width: 760px) {
    .tool-app:has(> .beat-editor) {
        padding: 0;
    }

    /* The tools alone stay stuck, so the bar never eats the screen. The title scrolls away. */
    .beat-bar,
    .beat-bar-main {
        display: contents;
    }

    .beat-head {
        padding-top: 8px;
    }

    .tool-page:has(.beat-editor) {
        padding-top: 4px;
    }

    .tool-page:has(.beat-editor) .tool-hero {
        flex-wrap: nowrap;
        margin-bottom: 4px;
    }

    .tool-page:has(.beat-editor) .tool-hero h1 {
        font-size: 1.0625rem;
    }

    /* The way back to the hub is what a phone needs of the trail */
    .tool-page:has(.beat-editor) .tool-hero .breadcrumb {
        flex: none;
        font-size: 12.5px;
    }

    .tool-page:has(.beat-editor) .tool-hero .breadcrumb li:not(:nth-last-child(2)) {
        display: none;
    }

    .tool-page:has(.beat-editor) .tool-hero .breadcrumb li::before {
        display: none;
    }

    .tool-page:has(.beat-editor) .tool-app ~ .tool-lede {
        font-size: 0.9375rem;
    }

    .beat-editor {
        --pad: 14px;
        padding: 0 var(--pad) 18px;
        border-radius: 0;
    }

    .beat-editor .beat-tally-name {
        display: none;
    }

    .beat-target-field input {
        width: 72px;
        font-size: 16px;
    }

    .beat-tools {
        position: sticky;
        top: 0;
        z-index: 20;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 4px 6px;
        margin: 4px calc(var(--pad) * -1) 0;
        padding: 6px var(--pad);
        background: var(--desk);
        border-bottom: 1px solid var(--desk-line);
    }

    .beat-views span {
        padding: 6px 7px;
        font-size: 13px;
    }

    /* The buttons can sit anywhere in the row here, so the panels hang from the bar's edge */
    .beat-export {
        position: static;
        gap: 4px;
    }

    .beat-opts {
        right: 14px;
    }

    .beat-export .btn {
        padding: 8px 10px;
        font-size: 13.5px;
    }

    .beat-export .btn-secondary {
        padding: 7px 7px;
    }

    .beat-opts-btn {
        width: 30px;
    }

    .beat-link {
        min-height: 32px;
    }

    .beat-opt {
        min-height: 32px;
    }

    .beat-ruler {
        height: 24px;
        margin: 2px 0 0;
    }

    .beat-ruler-acts {
        display: none;
    }

    .beat-ruler-line {
        top: 1px;
    }

    .beat-band-head {
        padding-top: 4px;
    }

    /* A sheet across the bottom of the phone, flush with its edges */
    .beat-after {
        bottom: 0;
        max-height: 72vh;
        max-height: 72dvh;
        margin: 12px calc(var(--pad) * -1) -18px;
        padding: 8px 8px 16px 16px;
        border-radius: 12px 12px 0 0;
    }

    .beat-after.is-folded {
        padding: 4px 8px 4px 16px;
    }

    .beat-after-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding-right: 8px;
    }

    .beat-editor .beat-after-title {
        font-size: 1.5rem;
    }

    .beat-band-head h3 {
        font-size: 1.5rem;
    }

    .beat-editor .beat-name {
        font-size: 16px;
    }

    .beat-editor[data-view="list"] .beat {
        display: flex;
        flex-direction: column;
    }

    .beat-editor[data-view="list"] .beat-note-q {
        order: 1;
        padding: 14px 2px 6px 14px;
    }

    .beat-editor[data-view="list"] .beat-note-q::before {
        top: calc(14px + 0.42em);
    }

    .beat-editor[data-view="list"] .beat-paper {
        order: 2;
        padding: 10px 14px 8px;
    }

    .beat-editor[data-view="list"] .beat-note-more {
        order: 3;
        position: relative;
        width: auto;
        max-width: none;
        max-height: none;
        margin: 6px 0 4px;
        overflow: visible;
    }

    .beat-editor[data-view="list"] .beat-note-full {
        display: none;
    }

    .beat-editor[data-view="list"] .beat-paper-top {
        padding-right: 28px;
    }

    .beat-editor[data-view="list"] .beat-foot {
        position: static;
        margin-top: 4px;
    }

    .beat-editor[data-view="list"] .beat-name {
        font-size: 1.25rem;
    }

    .beat-editor[data-view="list"] .beat-add,
    .beat-editor[data-view="list"] .beat-gone {
        width: auto;
    }

    .beat-more {
        top: 8px;
        right: 6px;
        width: 34px;
        height: 34px;
    }

    .beat-paper-top {
        padding-right: 30px;
    }

    .beat-keys {
        display: none !important;
    }

    .beat-menu {
        left: 8px;
        right: 8px;
    }
}

/* At 320px, which is also 1280px at 400% zoom, the bar's top row takes two lines */
@media (max-width: 360px) {
    .beat-tools {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .beat-export {
        margin-left: auto;
    }
}

/* A phone has no pointer to drag with: the menu moves beats */
@media (hover: none) {
    .beat-num {
        cursor: default;
    }
}

/* Windows high contrast: backgrounds and shadows go, so state has to show some other way */
@media (forced-colors: active) {
    .beat-views input:checked + span {
        background: Highlight;
        color: HighlightText;
        forced-color-adjust: none;
    }

    .beat-switch-track {
        background: Canvas;
        border: 1px solid CanvasText;
        forced-color-adjust: none;
    }

    .beat-switch-track::after {
        top: 1px;
        left: 1px;
        background: CanvasText;
    }

    .beat-switch input:checked + .beat-switch-track {
        background: Highlight;
    }

    .beat-switch input:checked + .beat-switch-track::after {
        background: HighlightText;
    }

    .beat-export .btn,
    .beat-after .btn {
        border: 1px solid ButtonText;
    }

    .beat-paper,
    .beat-after,
    .beat-note-more,
    .beat-menu,
    .beat-notice {
        border: 1px solid CanvasText;
    }

    .beat-paper:focus-within,
    .beat-editor[data-view="list"] .beat-paper:focus-within {
        outline: 2px solid Highlight;
    }

    .beat-dot::before {
        background: Canvas;
        border-color: CanvasText;
        forced-color-adjust: none;
    }

    .beat-dot.is-filled::before {
        background: Highlight;
        border-color: Highlight;
    }

    .beat-dot.is-some::before {
        background: linear-gradient(to right, Highlight 50%, Canvas 50%);
        border-color: Highlight;
    }

    .beat-dot[aria-current]::before {
        outline: 2px solid Highlight;
        outline-offset: 2px;
    }

    .beat-ruler-tip {
        border: 1px solid CanvasText;
    }
}

@media (prefers-reduced-motion: reduce) {
    .beat-after,
    .beat-note-more,
    .beat.just-moved .beat-paper {
        animation: none;
    }

    .beat-dot::before,
    .beat-switch-track,
    .beat-switch-track::after {
        transition: none;
    }
}

@media print {
    .beat-tools,
    .beat-ruler,
    .beat-keys,
    .beat-add,
    .beat-more,
    .beat-note,
    .beat-after,
    .beat-fold {
        display: none !important;
    }

    .beat-editor .beat-text {
        max-height: none;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .beat-editor {
        padding: 0;
        background: none;
    }

    .beat-bar {
        position: static;
        border: 0;
    }
}
