:root {
    --ipa-blue: #246bfd;
    --ipa-blue-dark: #1853d6;
    --ipa-ink: #15243f;
    --ipa-muted: #526782;
    --ipa-line: #e1eaf7;
    color-scheme: light;
    font: 15px/1.7 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ipa-ink);
    background: #f5f8fd;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #8cb7ff; outline-offset: 3px; }
.ipa-icon-defs { position: absolute; }
.ipa-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex: none;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ipa-container { width: calc(100% - 80px); max-width: 1200px; margin: 0 auto; }
.ipa-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.ipa-site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid #e7ecf3;
    background: #fff;
}
.ipa-header-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 80px;
}
.ipa-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    font-size: 22px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.5px;
    overflow-wrap: anywhere;
}
.ipa-brand-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 37px;
    height: 37px;
    border-radius: 11px;
    background: var(--ipa-blue);
    color: #fff;
}
.ipa-brand-mark svg { width: 29px; height: 29px; }
.ipa-navigation {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}
.ipa-nav {
    display: flex;
    align-items: center;
    gap: 27px;
    margin: 0 auto;
    font-size: 14px;
    white-space: nowrap;
}
.ipa-nav > a, .ipa-more > summary { display: inline-flex; align-items: center; min-height: 80px; }
.ipa-site-header a:hover, .ipa-nav a[aria-current="page"] { color: var(--ipa-blue); }
.ipa-more { position: relative; }
.ipa-more > summary {
    position: relative;
    gap: 5px;
    color: var(--ipa-blue);
    cursor: pointer;
    list-style: none;
}
.ipa-more > summary::after {
    position: absolute;
    right: 0;
    bottom: 20px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    content: '';
    background: var(--ipa-blue);
}
.ipa-more > summary .ipa-icon { width: 14px; height: 14px; }
.ipa-more[open] > summary .ipa-icon, .ipa-privacy details[open] summary .ipa-icon { transform: rotate(180deg); }
.ipa-more-links {
    position: absolute;
    top: 68px;
    left: -18px;
    min-width: 154px;
    padding: 8px;
    border: 1px solid var(--ipa-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(21, 36, 63, .09);
}
.ipa-more-links a { display: block; padding: 8px 11px; border-radius: 6px; }
.ipa-more-links a:hover { background: #f1f6ff; }
.ipa-header-actions { display: flex; align-items: center; gap: 22px; flex: none; font-size: 14px; white-space: nowrap; }
.ipa-menu-toggle { display: none; }

.ipa-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    gap: 10px;
    padding: 9px 17px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--ipa-blue);
    color: #fff;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}
.ipa-button:hover:not(:disabled), .ipa-site-header .ipa-button:hover { background: var(--ipa-blue-dark); color: #fff; }
.ipa-button-small { min-height: 42px; padding: 7px 16px; font-size: 14px; }
.ipa-text-button {
    padding: 4px 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #2f5695;
    font-size: 13px;
    white-space: nowrap;
}
.ipa-text-button:hover { color: var(--ipa-blue); background: #eaf2ff; }

.ipa-editor {
    min-height: calc(100vh - 81px);
    padding-bottom: 46px;
    background: radial-gradient(ellipse 550px 280px at 83% 3%, #eaf2ff, transparent 92%),
                linear-gradient(180deg, #fff 3%, #f5f8fd 56%, #f5f8fd);
}
.ipa-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 221px;
    padding: 28px 0 32px;
}
.ipa-heading-copy { position: relative; z-index: 1; min-width: 0; }
.ipa-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: #45628d;
    font-size: 13px;
    font-weight: 600;
}
.ipa-back .ipa-icon { width: 15px; height: 15px; transform: rotate(180deg); }
.ipa-back:hover { color: var(--ipa-blue); }
.ipa-heading h1 { font-size: clamp(36px, 4.1vw, 54px); font-weight: 750; line-height: 1.17; letter-spacing: -.038em; }
.ipa-heading h1 span { color: var(--ipa-blue); }
.ipa-heading p { margin-top: 12px; color: var(--ipa-muted); }

.ipa-heading-art { position: relative; flex: none; width: 270px; height: 155px; margin-right: 3%; }
.ipa-orbit {
    position: absolute;
    inset: -25px 26px -33px 38px;
    border: 1px solid #dce9fd;
    border-radius: 50%;
    transform: rotate(-23deg);
}
.ipa-orbit-wide { inset: -37px 12px -43px 22px; border-style: dashed; border-color: #d8e5f9; }
.ipa-paper {
    position: absolute;
    top: 15px;
    left: 90px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 10px;
    width: 93px;
    height: 111px;
    border: 1px solid #d9e7fc;
    border-radius: 15px;
    color: var(--ipa-blue);
}
.ipa-paper-back { transform: translate(17px, 6px) rotate(16deg); background: #e3eeff; box-shadow: 0 11px 25px #28579c12; }
.ipa-paper-front { transform: rotate(-11deg); background: #fff; box-shadow: 0 17px 35px #28579c22; }
.ipa-paper-front .ipa-icon { width: 33px; height: 33px; }
.ipa-paper-front strong { font-size: 14px; letter-spacing: .14em; }
.ipa-art-edit {
    position: absolute;
    right: 51px;
    bottom: 16px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--ipa-blue);
    color: #fff;
    box-shadow: 0 9px 19px #246bfd32;
    transform: rotate(10deg);
}
.ipa-orbit-point { position: absolute; top: 39px; left: 56px; width: 7px; height: 7px; border-radius: 50%; background: #7eabfc; box-shadow: 0 0 0 5px #e3efff; }
.ipa-paper-dash { position: absolute; top: 31px; right: 18px; width: 21px; height: 4px; border-radius: 6px; background: #d5e5ff; }

.ipa-workbench {
    position: relative;
    overflow: hidden;
    border: 1px solid #dbe5f3;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(32, 65, 121, .067);
}
.ipa-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 75px;
    padding: 17px 24px;
    border-bottom: 1px solid var(--ipa-line);
    background: #fcfdff;
}
.ipa-toolbar-title { display: flex; align-items: center; gap: 12px; }
.ipa-icon-tile {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #e8f1ff;
    color: var(--ipa-blue);
}
.ipa-toolbar-title h2 { font-size: 19px; line-height: 1.25; }
.ipa-toolbar-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px 17px; color: #586c8d; font-size: 13px; }
.ipa-local { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 6px; background: #edf4ff; color: #2458a6; font-weight: 600; }
.ipa-local .ipa-icon { width: 15px; height: 15px; }
.ipa-workbench-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(342px, 1fr); }
.ipa-edit-area { min-width: 0; padding: 23px 24px 24px; }

.ipa-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 270px;
    padding: 22px 14px;
    border: 1px dashed #adc8ef;
    border-radius: 13px;
    background: radial-gradient(ellipse at 52% 5%, #f0f6ff, #fbfdff 73%);
    text-align: center;
}
.ipa-drop:hover { border-color: #89b3f5; }
.ipa-drop-icon {
    display: grid;
    place-items: center;
    width: 63px;
    height: 63px;
    margin-bottom: 12px;
    border-radius: 17px;
    background: #eaf2ff;
    color: var(--ipa-blue);
    box-shadow: inset 0 0 0 1px #dfebff;
}
.ipa-drop-icon .ipa-icon { width: 29px; height: 29px; }
.ipa-drop h3 { font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.ipa-drop p { margin: 4px 0 16px; color: var(--ipa-muted); font-size: 13px; }
.ipa-drop .ipa-button { min-width: 131px; }

.ipa-drop.has-file {
    flex-direction: row;
    gap: 13px;
    min-height: 0;
    padding: 10px 12px;
    border-style: solid;
    border-color: #e0ebfa;
    border-radius: 9px;
    background: #f7faff;
    text-align: left;
}
.ipa-drop.is-dragging { border-color: var(--ipa-blue); background: #edf5ff; }
.ipa-source-icon { width: 36px; height: 36px; border-radius: 9px; }
.ipa-source-copy { min-width: 0; }
.has-file .ipa-source-copy { flex: 1; }
.ipa-source-copy strong { display: block; color: var(--ipa-ink); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
#ipa-source-size { color: #5d7193; font-size: 12px; }
.ipa-source-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.ipa-drop.has-file .ipa-button {
    min-width: 0;
    min-height: 32px;
    padding: 4px 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #2f5695;
    font-size: 13px;
    font-weight: 400;
}
.ipa-drop.has-file .ipa-button:hover:not(:disabled) { color: var(--ipa-blue); background: #eaf2ff; }
.ipa-drop.has-file .ipa-button .ipa-icon { display: none; }

.ipa-options { min-width: 0; margin: 15px 0 0; padding: 0; border: 0; }
.ipa-options legend { margin-bottom: 7px; padding: 0; font-weight: 700; }
.ipa-option {
    display: grid;
    grid-template-columns: 151px minmax(0, 1fr);
    align-items: center;
    gap: 5px 10px;
    padding: 7px 0;
    border-top: 1px solid #edf1f8;
}
.ipa-option-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.ipa-option input[type="checkbox"] { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--ipa-blue); }
.ipa-option input[type="text"] {
    width: 100%;
    min-width: 0;
    height: 39px;
    padding: 7px 10px;
    border: 1px solid #d4e0f1;
    border-radius: 7px;
    background: #fff;
    color: var(--ipa-ink);
    font-size: 14px;
}
.ipa-option input[type="text"]:disabled { background: #f4f7fb; color: #536b91; opacity: 1; -webkit-text-fill-color: #536b91; }
.ipa-option-note { grid-column: 2; color: var(--ipa-muted); font-size: 12px; }
.ipa-option-note:empty, #ipa-filename:disabled + .ipa-option-note { display: none; }
.ipa-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #f1e0c5;
    border-radius: 8px;
    background: #fffaee;
    color: #765321;
    font-size: 13px;
}
.ipa-notice .ipa-icon { width: 16px; height: 16px; margin-top: 3px; }
.ipa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 13px; }
#ipa-download { border-color: #bdd1f8; background: #eef5ff; color: #1853ae; }
#ipa-download:hover { background: #deeaff; }
.ipa-status-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; color: #45628d; font-size: 13px; }
.ipa-status-line p:not(:empty), .ipa-status-line button { margin-top: 10px; }
.ipa-status-line p[data-error] { color: #9d3529; }

.ipa-preview { min-width: 0; padding: 20px 23px 23px; border-left: 1px solid var(--ipa-line); background: #f6f9ff; }
.ipa-preview h3 { display: flex; align-items: center; gap: 9px; min-height: 30px; margin-bottom: 6px; font-size: 16px; }
.ipa-preview h3 .ipa-icon { width: 19px; height: 19px; color: var(--ipa-blue); }
.ipa-preview-caption { margin-bottom: 13px; color: #5b7093; font-size: 13px; }
.ipa-preview-values { display: grid; gap: 9px; }
.ipa-preview-values > div { min-width: 0; padding: 8px 10px 9px; border: 1px solid #dfebfb; border-radius: 8px; background: #fbfdff; }
.ipa-preview-values dt { color: #455f86; font-size: 12px; font-weight: 650; }
.ipa-preview-values dd { color: #5c7090; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.ipa-after { display: block; margin-top: 2px; color: #1d55b1; font-weight: 650; }
.ipa-localizations { margin-top: 8px; font-size: 13px; }
.ipa-localizations summary { color: #245ba9; cursor: pointer; }
.ipa-localizations ul { margin: 4px 0 0; padding-left: 17px; color: #455f86; overflow-wrap: anywhere; }

.ipa-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 24px;
    border-top: 1px solid var(--ipa-line);
    background: #fbfdff;
}
.ipa-privacy > .ipa-icon { width: 18px; height: 18px; margin-top: 3px; color: var(--ipa-blue); }
.ipa-privacy details { min-width: 0; width: 100%; color: #536989; font-size: 13px; }
.ipa-privacy summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; list-style: none; cursor: pointer; }
.ipa-privacy summary::-webkit-details-marker, .ipa-more > summary::-webkit-details-marker { display: none; }
.ipa-privacy summary strong { margin-right: 6px; color: #2b4978; }
.ipa-privacy summary .ipa-icon { width: 15px; height: 15px; margin-top: 4px; color: var(--ipa-blue); }
.ipa-privacy p { margin-top: 6px; }

@media (max-width: 1090px) {
    .ipa-container { width: calc(100% - 52px); }
    .ipa-nav { gap: 17px; }
    .ipa-header-actions { gap: 14px; }
    .ipa-workbench-grid { grid-template-columns: minmax(0, 1.45fr) minmax(294px, 1fr); }
    .ipa-option { grid-template-columns: 139px minmax(0, 1fr); }
}

@media (max-width: 810px) {
    .ipa-container { width: calc(100% - 36px); }
    .ipa-header-row { min-height: 65px; }
    .ipa-menu-toggle { display: inline-flex; flex: none; align-items: center; padding: 7px; border: 1px solid #dce5f2; border-radius: 7px; background: #fff; color: #26426c; }
    .ipa-navigation { display: none; }
    .ipa-navigation.is-open {
        position: absolute;
        top: 59px;
        right: 0;
        left: 0;
        display: block;
        padding: 10px 15px 15px;
        border: 1px solid var(--ipa-line);
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 8px 26px #1f40691c;
    }
    .ipa-nav { flex-wrap: wrap; gap: 1px 18px; }
    .ipa-nav > a, .ipa-more > summary { min-height: 42px; }
    .ipa-more > summary::after { bottom: 3px; }
    .ipa-more { width: 100%; }
    .ipa-more-links { position: static; min-width: 0; padding: 4px 0; border: 0; box-shadow: none; }
    .ipa-header-actions { margin-top: 9px; }
    .ipa-heading { min-height: 180px; padding: 21px 0 24px; }
    .ipa-heading-art { width: 145px; height: 118px; margin: 0; }
    .ipa-orbit { inset: -1px 4px; transform: none; }
    .ipa-orbit-wide { inset: -10px -9px; }
    .ipa-paper { top: 14px; left: 43px; width: 59px; height: 79px; gap: 4px; }
    .ipa-paper-front .ipa-icon { width: 25px; height: 25px; }
    .ipa-art-edit { right: 11px; bottom: 17px; width: 29px; height: 29px; }
    .ipa-art-edit .ipa-icon { width: 16px; height: 16px; }
    .ipa-orbit-point { top: 19px; left: 22px; }
    .ipa-paper-dash { top: 10px; right: 5px; }
    .ipa-workbench-grid { grid-template-columns: minmax(0, 1fr); }
    .ipa-preview { border-top: 1px solid var(--ipa-line); border-left: 0; }
}

@media (max-width: 505px) {
    .ipa-heading { gap: 10px; min-height: 155px; }
    .ipa-heading h1 { font-size: 34px; }
    .ipa-heading p { font-size: 14px; }
    .ipa-heading-art { width: 73px; height: 91px; }
    .ipa-orbit { inset: 4px -3px; }
    .ipa-orbit-wide { inset: -5px -12px; }
    .ipa-paper { top: 14px; left: 9px; width: 45px; height: 60px; border-radius: 9px; }
    .ipa-paper-back { transform: translate(8px, 4px) rotate(16deg); }
    .ipa-paper-front .ipa-icon { width: 21px; height: 21px; }
    .ipa-paper-front strong { font-size: 11px; }
    .ipa-art-edit { right: -4px; bottom: 7px; }
    .ipa-orbit-point { top: 14px; left: 2px; }
    .ipa-paper-dash { display: none; }
    .ipa-toolbar, .ipa-edit-area, .ipa-preview, .ipa-privacy { padding-left: 15px; padding-right: 15px; }
    .ipa-toolbar-title { gap: 9px; }
    .ipa-toolbar-title h2 { font-size: 17px; }
    .ipa-toolbar-meta { font-size: 12px; text-align: right; }
    .ipa-local { display: none; }
    .ipa-drop { min-height: 217px; }
    .ipa-drop h3 { font-size: 17px; }
    .ipa-drop.has-file { flex-wrap: wrap; gap: 8px; }
    .has-file .ipa-source-copy { flex-basis: 108px; }
    .ipa-option { grid-template-columns: minmax(0, 1fr); }
    .ipa-option-note { grid-column: 1; }
}

@media (max-width: 350px) {
    .ipa-heading-art { display: none; }
    .ipa-toolbar-title h2 { font-size: 15px; }
}
