﻿:root {
    --bg: #f4f6fb;
    --panel: #ffffff;
    --ink: #101828;
    --muted: #667085;
    --line: #d0d5dd;
    --brand: #0f766e;
    --brand-2: #115e59;
    --warn: #b42318;
    --soft-brand: #e6fffb;
    --soft-warn: #fef3f2;
}

* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 84px;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1000px 400px at 10% -20%, #c7f9e8 0%, transparent 60%),
        radial-gradient(1000px 500px at 110% 10%, #dbeafe 0%, transparent 60%),
        var(--bg);
}

.shell {
    max-width: 1024px;
    margin: 0 auto;
    padding: 84px 16px 40px;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 10px 16px;
    background: rgba(244, 246, 251, 0.96);
    border-bottom: 1px solid rgba(208, 213, 221, 0.85);
    backdrop-filter: blur(14px);
}

.app-header {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-brand {
    color: var(--brand-2);
    font-weight: 800;
    text-decoration: none;
    padding: 9px 8px;
}

.app-nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.app-menu {
    position: relative;
}

.app-menu summary {
    list-style: none;
}

.app-menu summary::-webkit-details-marker {
    display: none;
}

.app-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(16, 24, 40, 0.16);
}

.app-menu-link {
    color: var(--ink);
    text-decoration: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
}

.app-menu-link:hover,
.app-menu-link:focus-visible {
    background: var(--soft-brand);
    color: var(--brand-2);
}

.app-menu-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 0;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.05);
}

.collapsible-panel {
    overflow: hidden;
}

.collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    margin: -16px;
    padding: 16px;
}

.collapsible-summary::-webkit-details-marker {
    display: none;
}

.collapsible-summary::after {
    content: "▾";
    font-size: 16px;
    color: var(--brand-2);
    transition: transform 0.2s ease;
}

.collapsible-panel[open] .collapsible-summary::after {
    transform: rotate(180deg);
}

.collapsible-body {
    padding-top: 14px;
}

.summary-copy {
    flex: 1;
    min-width: 0;
}

.summary-copy h2,
.summary-copy h3 {
    margin: 0 0 4px;
}

.summary-copy p {
    margin: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    background: var(--soft-brand);
    color: var(--brand-2);
}

.pill-warn {
    background: var(--soft-warn);
    color: var(--warn);
}

.section-stack {
    display: grid;
    gap: 14px;
}

.action-highlight {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 118, 110, 0.15);
    background: linear-gradient(180deg, #ffffff 0%, #f8fffd 100%);
}

.action-highlight-urgent {
    border-color: rgba(180, 35, 24, 0.2);
    background: linear-gradient(180deg, #ffffff 0%, #fff8f7 100%);
}

.countdown {
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--ink);
}

.countdown-subtle {
    font-size: 13px;
    color: var(--muted);
}

.list-focus li {
    padding: 12px;
}

.hero {
    padding: 28px;
}

.kicker {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-2);
    margin: 0;
}

h1, h2 {
    margin: 8px 0 12px;
}

p {
    margin: 6px 0 12px;
    color: var(--muted);
}

.btn {
    display: inline-block;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.08s ease;
}

.btn:hover,
.btn:focus-visible {
    background: var(--brand-2);
    color: #fff;
}

.btn:active {
    background: #0b4f4b;
    border-color: #0b4f4b;
    color: #fff;
    transform: translateY(1px);
}

.btn-ghost {
    background: #fff;
    color: var(--brand-2);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-ghost:active {
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: #fff;
    transform: translateY(1px);
}

.btn[aria-pressed="true"] {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn[aria-pressed="true"]:hover,
.btn[aria-pressed="true"]:focus-visible {
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: #fff;
}

.btn[disabled] {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-controls {
    display: grid;
    gap: 10px;
}

.status-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border: 0;
    padding: 0;
    margin: 0;
}

.status-choice-group legend {
    width: 100%;
    margin-bottom: 2px;
}

.status-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: 14px;
}

.status-choice input {
    width: auto;
    margin: 0;
    accent-color: var(--brand);
}

.status-choice:has(input:checked) {
    border-color: var(--brand);
    background: var(--soft-brand);
    color: var(--brand-2);
    font-weight: 700;
}

.status-choice:has(input:disabled) {
    opacity: 0.62;
    cursor: progress;
}

.entry-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 12px;
    align-items: start;
}

.sync-center-card {
    padding: 10px;
    position: sticky;
    top: 12px;
}

.sync-center-summary {
    cursor: pointer;
    font-weight: 600;
}

.entry-edit-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.entry-edit-header,
.image-field-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.entry-edit-header {
    margin-bottom: 10px;
}

.entry-edit-header .entry-edit-title {
    margin: 0;
}

.image-field-toolbar {
    margin: -2px 0 10px;
}

.export-panel {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    margin: 10px 0 14px;
    background: #f8fffd;
}

.export-panel-header,
.export-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.export-link-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.export-link-row {
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.export-link-row span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.entry-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.field-edit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.field-edit-textarea {
    min-height: 110px;
    resize: vertical;
}

.field-copy-btn,
.icon-btn {
    flex-shrink: 0;
}

.install-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 30;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid rgba(15, 118, 110, 0.25);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 20px 40px rgba(16, 24, 40, 0.16);
    backdrop-filter: blur(14px);
}

.install-banner strong {
    display: block;
    margin-bottom: 4px;
}

.install-banner .tiny {
    margin: 0;
}

.install-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stack {
    display: grid;
    gap: 10px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 14px;
}

.toggle-row input[type="checkbox"] {
    width: auto;
    margin: 0;
}

label {
    display: block;
    margin: 10px 0 4px;
    font-size: 13px;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 14px;
    background: #fff;
}

textarea {
    min-height: 90px;
}

.grid {
    display: grid;
    gap: 14px;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
}

.list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.list li {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
}

.tiny {
    color: var(--muted);
    font-size: 12px;
}

.error {
    color: var(--warn);
}

@media (max-width: 760px) {
    .shell {
        padding-top: 72px;
    }

    .topbar {
        padding: 8px 10px;
    }

    .app-nav-links {
        display: none;
    }

    .app-header {
        justify-content: space-between;
    }

    .app-menu-panel {
        position: fixed;
        top: 58px;
        left: 10px;
        right: 10px;
        min-width: 0;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .entry-edit-layout {
        grid-template-columns: 1fr;
    }

    .sync-center-card {
        position: static;
        order: -1;
        padding: 8px 10px;
        border-radius: 10px;
    }

    .field-edit-row {
        grid-template-columns: 1fr;
    }

    .field-copy-btn {
        width: 100%;
    }

    .entry-edit-header,
    .image-field-toolbar {
        align-items: stretch;
    }

    .image-export-all-btn,
    .image-export-field-btn {
        width: 100%;
    }

    .export-panel .actions,
    .export-panel .btn,
    .export-link-row {
        width: 100%;
    }

    .export-link-row {
        align-items: stretch;
        flex-direction: column;
    }

    .entry-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .install-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .install-banner-actions {
        justify-content: stretch;
    }
}

