:root {
    --bg-main: #f6f4ef;
    --bg-card: rgba(255, 255, 255, 0.8);
    --ink: #1f2230;
    --muted: #5d6478;
    --accent: #ea5b2a;
    --accent-dark: #bd3f17;
    --outline: rgba(28, 33, 52, 0.12);
    --shadow: 0 20px 50px rgba(23, 29, 46, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Sora", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 8% 18%, #ffe8cc 0%, transparent 34%),
                radial-gradient(circle at 88% 0%, #d6ecff 0%, transparent 38%),
                linear-gradient(170deg, #f3f8ff 0%, var(--bg-main) 58%, #fff7e8 100%);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Source Serif 4", serif;
    letter-spacing: -0.01em;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.5;
}

.bg-orb-one {
    width: 360px;
    height: 360px;
    top: -90px;
    left: -90px;
    background: #ffd9be;
}

.bg-orb-two {
    width: 320px;
    height: 320px;
    right: -80px;
    bottom: -120px;
    background: #bbdfff;
}

.platform-nav {
    backdrop-filter: blur(14px);
    border: 1px solid var(--outline);
    background: rgba(32, 42, 61, 0.82);
    box-shadow: var(--shadow);
}

.brand-wordmark {
    color: #fff;
    font-weight: 700;
    line-height: 1.1;
    display: inline-flex;
    flex-direction: column;
}

.brand-wordmark:hover {
    color: #fff;
}

.brand-caption {
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.85;
}

.navbar .nav-link {
    color: #d9deee;
}

.navbar .nav-link:hover {
    color: #fff;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: #fff;
    border-color: var(--accent-dark);
}

.message-stack {
    margin-bottom: 1rem;
}

.hero-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 234, 0.86));
    border: 1px solid var(--outline);
    box-shadow: var(--shadow);
    animation: riseIn 0.6s ease both;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    color: #8a4a37;
    font-weight: 600;
}

.display-title {
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.text-soft {
    color: var(--muted);
}

.shared-login-box {
    border-radius: 16px;
    padding: 1rem;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.65);
}

.card-frame {
    border-radius: 20px;
    padding: 1.25rem;
    border: 1px solid var(--outline);
    box-shadow: var(--shadow);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    animation: riseIn 0.45s ease both;
}

.article-stage,
.sidebar-stage {
    min-height: 620px;
}

.article-title {
    font-size: clamp(1.45rem, 3vw, 2.05rem);
}

.article-summary {
    color: var(--muted);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background: #fff4e7;
    border: 1px solid rgba(211, 122, 69, 0.35);
    color: #8d421f;
}

.cover-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.article-cover {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
}

.prose {
    font-family: "Source Serif 4", serif;
    font-size: 1.1rem;
    color: #2a2f3d;
}

.prose p {
    margin-bottom: 1rem;
}

.prose img,
.prose video,
.prose iframe,
.prose canvas,
.prose svg {
    max-width: 100%;
    height: auto;
}

.prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.inline-trigger {
    background: transparent;
    color: #c62828;
    border: 0;
    border-radius: 0;
    padding: 0 0.12rem;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    font-family: inherit;
    font-weight: inherit;
    cursor: pointer;
    vertical-align: baseline;
    text-align: inherit;
    transition: background-color 0.2s ease;
}

.prose a[href*="://modal.local/"] {
    display: inline;
    background: transparent;
    color: #c62828;
    border-radius: 0;
    padding: 0 0.12rem;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    font-family: inherit;
    font-weight: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.trigger-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trigger-chip {
    border: 1px solid rgba(24, 35, 58, 0.14);
    background: rgba(255, 255, 255, 0.94);
    color: #293048;
    border-radius: 999px;
    font-size: 0.86rem;
    padding: 0.35rem 0.75rem;
}

.trigger-chip:hover,
.inline-trigger:hover {
    background: #ffe7c2;
}

.prose a[href*="://modal.local/"]:hover {
    background: #ffe7c2;
}

.trigger-chip:hover,
.inline-trigger:hover,
.prose a[href*="://modal.local/"]:hover {
    transform: translateY(-1px);
}

.accordion-item.category-item {
    border: 1px solid rgba(28, 42, 61, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.accordion-button {
    background: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background: #fff4e8;
    color: #8d421f;
}

.subcategory-title {
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #6f7692;
    font-weight: 700;
}

.article-link-list a {
    color: #243248;
    text-decoration: none;
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
    display: block;
    transition: 0.22s ease;
}

.article-link-list a:hover {
    background: rgba(49, 95, 180, 0.1);
}

.article-link-list a.active {
    background: rgba(234, 91, 42, 0.16);
    color: #7a2f14;
    font-weight: 600;
}

.empty-box,
.article-empty {
    padding: 1rem;
    border: 1px dashed rgba(38, 46, 67, 0.2);
    border-radius: 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.56);
}

.auth-shell {
    max-width: 540px;
    margin: 2rem auto;
}

.auth-card {
    padding: 1.5rem;
}

.platform-form input:not([type="checkbox"]),
.platform-form textarea,
.platform-form select,
.platform-form .helptext {
    width: 100%;
}

.platform-form input:not([type="checkbox"]),
.platform-form textarea,
.platform-form select {
    border: 1px solid rgba(24, 31, 47, 0.2);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.88);
}

.platform-form input:not([type="checkbox"]):focus,
.platform-form textarea:focus,
.platform-form select:focus {
    outline: 2px solid rgba(234, 91, 42, 0.2);
    border-color: rgba(234, 91, 42, 0.55);
}

.js-rich-content-input {
    display: none;
}

.rich-editor {
    min-height: 260px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(20, 31, 49, 0.18);
    background: #fff;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
    border-color: rgba(20, 31, 49, 0.2);
}

.studio-list {
    display: grid;
    gap: 0.75rem;
}

.studio-item,
.trigger-manage-item {
    border: 1px solid rgba(20, 31, 49, 0.12);
    border-radius: 12px;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.84);
}

.delete-card {
    max-width: 640px;
    margin: 3rem auto;
}

.glass-modal {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(249, 252, 255, 0.95);
}

#mediaModal .modal-dialog {
    max-width: min(900px, calc(100vw - 1.2rem));
}

#mediaModalBodyWrap {
    overflow-x: hidden;
}

.modal-media {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: min(70vh, 620px);
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 14px;
    border: 1px solid rgba(20, 31, 49, 0.08);
}

.inline-editor-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.inline-guide-list {
    padding-left: 1.1rem;
}

.inline-guide-list li {
    margin-bottom: 0.3rem;
}

.inline-modal-word-preview {
    border: 1px dashed rgba(20, 31, 49, 0.22);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    background: rgba(248, 250, 255, 0.9);
    font-weight: 600;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1199px) {
    .article-stage,
    .sidebar-stage {
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .card-frame {
        border-radius: 16px;
        padding: 1rem;
    }

    .display-title {
        font-size: 1.55rem;
    }
}
