.fone-share-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.fone-share-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fone-copy-status:empty, .fone-share-trigger[hidden], .fone-share-stage [hidden] { display: none; }

.fone-share-dialog {
    box-sizing: border-box;
    width: min(890px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100% - 32px);
    padding: 0;
    border: 1px solid #c6d0c3;
    border-radius: 12px;
    background: #fbfaf5;
    color: #1f3432;
    box-shadow: 0 25px 96px #142c2b56;
    overscroll-behavior: contain;
}

.fone-share-dialog::backdrop { background: #101f21af; }
.fone-share-panel { padding: clamp(14px, 3.4vw, 28px); }
.fone-share-dialog-header, .fone-share-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.fone-share-dialog-header h2 {
    margin: 0;
    color: #153b3d;
    font: 700 clamp(1.35rem, 3vw, 1.85rem)/1.2 Georgia, serif;
    letter-spacing: -.025em;
}
.fone-share-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #bcc9bc;
    border-radius: 50%;
    background: transparent;
    color: #204143;
    font-size: 25px;
    line-height: 1;
}
.fone-share-close:hover { background: #e8eee5; }

.fone-share-layouts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-block: 15px;
}
.fone-share-layouts button {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    gap: 2px 8px;
    min-width: 0;
    padding: 8px 10px;
    text-align: start;
    border: 1px solid #c5d0c5;
    border-radius: 5px;
    background: #fffdf8;
    color: #234041;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.fone-share-layouts button::before {
    content: '';
    grid-row: span 2;
    width: 10px;
    height: 26px;
    border-radius: 3px;
    background: var(--swatch);
}
.fone-share-layouts button:where(:hover, [aria-pressed=true]) { border-color: #205758; }
.fone-share-layouts button[aria-pressed=true] { background: #e5eee4; }
.fone-share-layouts button[data-share-style=editorial] { --swatch: linear-gradient(45deg,#133a37 45%,#bc632c 45%); }
.fone-share-layouts button[data-share-style=notebook] { --swatch: linear-gradient(45deg,#30264e 45%,#b398fa 45%); }
.fone-share-layouts button[data-share-style=split] { --swatch: linear-gradient(45deg,#2b2525 45%,#fd674b 45%); }
.fone-share-layouts button small { font: .72rem/1.2 monospace; color: #446162; }

.fone-share-stage {
    display: grid;
    place-items: center;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #e0e4d8;
    border-radius: 6px;
    background: #eceee6;
}
.fone-share-stage canvas {
    display: block;
    max-width: 100%;
    max-height: min(55vh, 540px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 3px 15px #242f342b;
}
.fone-share-stage [role=status] { padding: 0 10px; margin: 0; text-align: center; }

.fone-share-dialog-footer { margin-top: 12px; }
.fone-share-dialog-footer p { color: #456060; font-size: .86rem; margin: 0; }
.fone-share-download {
    flex: none;
    border: 1px solid #1b5052;
    border-radius: 5px;
    background: #1b5052;
    color: white;
    min-height: 42px;
    padding: 8px 15px;
    font-weight: 600;
}
.fone-share-download:hover:not(:disabled) { background: #143638; }
.fone-share-download:disabled { opacity: .55; }

@media (max-width: 520px) {
    .fone-share-dialog { width: calc(100% - 20px); max-height: calc(100% - 20px); }
    .fone-share-layouts { gap: 5px; }
    .fone-share-layouts button { padding: 8px 5px; gap: 2px 5px; font-size: .76rem; grid-template-columns: 5px minmax(0,1fr); }
    .fone-share-layouts button::before { width: 5px; }
    .fone-share-layouts button small { font-size: .64rem; }
    .fone-share-stage { padding: 6px; }
}
