:root {
    --brand-title: #ad9049;
    --brand-body: #111111;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, sans-serif;
    background: #dde2e8;
    color: #111;
}

.app {
    min-height: 100vh;
    position: relative;
}

.mobile-incompat-notice {
    display: none;
}

.mobile-incompat-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #1b2432;
}

.mobile-incompat-card p {
    margin: 0;
    color: #465165;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .mobile-incompat-notice {
        position: fixed;
        inset: 0;
        z-index: 200;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        background: linear-gradient(160deg, #eef3fb 0%, #dbe4f3 100%);
    }

    .mobile-incompat-card {
        width: min(28rem, 100%);
        padding: 1rem 1.1rem;
        border-radius: 0.9rem;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .app {
        display: none;
    }
}

.preview-shell {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.preview-card {
    pointer-events: auto;
    max-width: 1200px;
    width: 90%;
    display: flex;
    align-items: center;
    padding: 3rem 2.5rem;
    border-radius: 1rem;
    background: oklch(100% 0 0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 2rem;
}

.text-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
    padding: 0 1rem;
    text-align: center;
    align-items: center;
    max-width: 60%;
}

.headline {
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1.05;
    color: var(--brand-title);
}

.bodycopy {
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--brand-body);
}

.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 100%;
    margin: 0 auto;
}

.logo-wrap img {
    display: block;
    width: 220px;
    max-width: 100%;
    max-height: 62vh;
    object-fit: contain;
}

.panel {
    position: fixed;
    top: 1rem;
    left: 5.5rem;
    bottom: 1rem;
    width: min(22rem, calc(100vw - 6.5rem));
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    background: rgba(248, 249, 251, 0.78);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 28px rgba(0, 0, 0, 0.09);
    border-radius: 1.25rem;
    z-index: 10;
    overflow: hidden;
    animation: panelFade 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes panelFade {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.7rem 0.7rem 0.65rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.055);
}

.panel-header h2 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
}

.panel-close {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    margin: 0;
    font-family: system-ui, sans-serif;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    border-radius: 0.5rem;
}

.panel-close span {
    display: block;
    line-height: 1;
    transform: translateY(-3px);
}
.panel-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-group,
fieldset.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    margin: 0;
    max-width: 100%;
}

fieldset.control-group {
    padding: 0.65rem 0.75rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.065);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.42);
}

legend {
    padding: 0 0.3rem;
    font-weight: 700;
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

label {
    display: flex;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

.range-num-combo {
    display: grid;
    grid-template-columns: 1fr 3.6rem;
    gap: 0.4rem;
}

.text-button-combo {
    display: grid;
    grid-template-columns: 1fr 2.4rem;
    gap: 0.4rem;
}

.button-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.collab-join-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collab-create-pane {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.collab-create-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

.full-width-btn {
    width: 100%;
}

.color-target-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.used-color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 2rem;
}

.used-color-swatch {
    width: 1.5rem;
    height: 1.5rem;
    min-height: 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.22);
    padding: 0;
    cursor: pointer;
}

.used-color-swatch.is-selected-source {
    outline: 2px solid rgba(0, 0, 0, 0.22);
    outline-offset: 1px;
}

.used-color-swatch.is-recent {
    border-style: dashed;
    border-color: rgba(0, 0, 0, 0.16);
}

.used-color-separator {
    width: 1px;
    align-self: stretch;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 0.1rem;
}

.color-target-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: 700;
    border-color: rgba(0, 0, 0, 0.14);
    color: #3e4450;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.color-target-label {
    padding-right: 1.2rem;
}

.color-target-swap {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.62;
    font-size: 0.86rem;
    line-height: 1;
    user-select: none;
}

.color-target-btn:hover .color-target-swap {
    opacity: 1;
}

.color-target-btn.active {
    color: #071126;
    border-color: rgba(99, 99, 99, 0.55);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(193, 193, 193, 0.95));
    transform: translateY(-1px);
}

.color-target-btn.active::after {
    content: "";
    position: absolute;
    right: 0.55rem;
    top: 50%;
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 50%;
    background: #071126;
    transform: translateY(-50%);
}

.control-inline-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.collab-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: 0.1rem 0.5rem;
    border-radius: 0.38rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.74);
    color: #374151;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: none;
}

.double-input {
    display: grid;
    grid-template-columns: 1fr 4rem;
    gap: 0.4rem;
}

input,
textarea,
select,
button {
    border-radius: 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.13);
    outline: none;
    font: inherit;
    background: rgba(255, 255, 255, 0.75);
}

input,
select,
button {
    min-height: 2.2rem;
    padding: 0.45rem 0.6rem;
}

textarea {
    min-height: 6.5rem;
    padding: 0.6rem;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
    box-shadow: 0 0 0 2.5px rgba(0, 0, 0, 0.09);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2.2rem;
    padding: 0;
    background: rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: grab;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0.42rem;
    height: 68%;
    border-radius: 0.12rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.38);
}

input[type="range"]::-moz-range-thumb {
    width: 0.42rem;
    height: 68%;
    border-radius: 0.12rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.38);
}

input[type="number"] {
    text-align: center;
    padding-inline: 0.25rem;
}

.copy-button {
    font-size: 1rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.copy-button svg {
    width: 16px;
    height: 16px;
}

.muted {
    margin: 0;
    font-size: 0.76rem;
    opacity: 0.55;
}

.collab-status-card {
    padding: 0.75rem 0.85rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.56);
}

.collab-status-card strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #20242a;
    font-size: 0.85rem;
}

.collab-status-card[data-state="idle"] {
    border-color: rgba(0, 0, 0, 0.08);
}

.collab-status-card[data-state="active"] {
    border-color: rgba(62, 117, 220, 0.22);
    background: rgba(77, 129, 225, 0.08);
}

.collab-status-card[data-state="success"] {
    border-color: rgba(13, 126, 58, 0.24);
    background: rgba(13, 126, 58, 0.09);
}

.collab-status-card[data-state="warning"] {
    border-color: rgba(196, 126, 14, 0.28);
    background: rgba(196, 126, 14, 0.11);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    width: 100%;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: #444;
    margin-bottom: 0.3rem;
}

.inline-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-height: 1rem;
    padding: 0;
}

.text-link-btn {
    border: 0;
    background: transparent;
    color: #4f596a;
    text-align: left;
    font-size: 0.74rem;
    font-weight: 500;
    padding: 0;
    min-height: 0;
    cursor: pointer;
    opacity: 0.82;
}

.text-link-btn:hover {
    opacity: 1;
    color: #2c3442;
    text-decoration: underline;
}

.collab-participants-list {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.collab-participant-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
    align-items: center;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.collab-participant-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2f3440;
}

.collab-participant-meta {
    font-size: 0.72rem;
    color: #667082;
}

.collab-participant-actions {
    display: inline-flex;
    gap: 0.3rem;
}

.collab-participant-actions button {
    min-height: 1.8rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
}

.collab-notification-list {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: min(23.5rem, calc(100vw - 1.5rem));
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 80;
    pointer-events: none;
}

.collab-note {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: start;
    padding: 0.55rem 0.6rem;
    border-radius: 0.65rem;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    animation: collab-note-in 180ms ease-out;
}

.collab-note[data-tone="info"] {
    border-color: rgba(66, 126, 224, 0.34);
}

.collab-note[data-tone="success"] {
    border-color: rgba(23, 135, 87, 0.34);
}

.collab-note[data-tone="warning"] {
    border-color: rgba(201, 124, 7, 0.4);
}

.collab-note-icon {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 0.05rem;
    color: #fff;
    background: #3f7be4;
}

.collab-note[data-tone="success"] .collab-note-icon {
    background: #1c8f5e;
}

.collab-note[data-tone="warning"] .collab-note-icon {
    background: #c57d0b;
}

.collab-note-body {
    min-width: 0;
}

.collab-note-title {
    display: block;
    font-size: 0.73rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5f6f88;
    margin-bottom: 0.12rem;
}

.collab-note-message {
    margin: 0;
    font-size: 0.79rem;
    line-height: 1.32;
    color: #1f2937;
}

.collab-note-dismiss {
    min-height: 1.2rem;
    width: 1.2rem;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: rgba(0, 0, 0, 0.08);
    color: #5f6876;
    font-size: 0.88rem;
    line-height: 1;
    cursor: pointer;
}

.collab-note-dismiss:hover {
    background: rgba(0, 0, 0, 0.14);
    color: #1f2937;
}

.collab-note-leave {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
    transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes collab-note-in {
    from {
        opacity: 0;
        transform: translateY(5px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hidden {
    display: none !important;
}

.custom-file-wrapper {
    position: relative;
    width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
    opacity: 0;
}

.custom-file-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.13);
    border-radius: 0.55rem;
    cursor: pointer;
    overflow: hidden;
    min-height: 2.2rem;
}

.file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
    color: #555;
}

.file-button {
    background: rgba(0, 0, 0, 0.04);
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    min-height: 2.2rem;
    display: flex;
    align-items: center;
}

.main-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 20;
    background: rgba(255, 255, 255, 0.45);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.2rem 0.6rem;
    backdrop-filter: blur(12px);
    align-items: center;
}

.toolbar-btn {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.65);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: #555;
}

.toolbar-btn:hover:not(:disabled),
.toolbar-btn.active {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    color: #111;
    border-color: rgba(0, 0, 0, 0.15);
}

.toolbar-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.profile-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0.5rem;
}

.profile-name {
    font-weight: 600;
    color: #333;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-icon-btn {
    width: 1.95rem;
    height: 1.95rem;
    min-height: 1.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.75);
    color: #60656c;
    cursor: pointer;
}

.profile-icon-btn:hover {
    color: #111;
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.profile-icon-btn.copied {
    color: #0a7f37;
    border-color: rgba(10, 127, 55, 0.35);
}

.qr-code-container {
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

.qr-code-container img {
    max-width: 100%;
    max-height: 100%;
}

.share-color-summary {
    cursor: copy;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.share-color-summary.copied {
    border-color: rgba(10, 127, 55, 0.45);
    box-shadow: 0 0 0 2px rgba(10, 127, 55, 0.14);
}



