/* ============================================
   CSS Variables & Reset
   ============================================ */

:root {
    --font-heading:
        "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
    --font-body:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        sans-serif;
    --font-mono:
        "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

    --color-text: #292929;
    --color-text-light: #757575;
    --color-text-red: #be374c;
    --color-border: #eaeaea;
    --color-accent: #1a8917;
    --color-bg: #ffffff;
    --color-bg-secondary: #fafafa;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

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

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: auto;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

a.brand {
    margin: 0 !important;
    display: inline-block;

    font-weight: bolder;
    font-style: italic;
    font-family: serif;
    font-size: 1.05rem;
}

/* ============================================
   Layout & Container (Mobile Default)
   ============================================ */

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

main {
    flex: 1;
    min-height: 100vh;
    padding: var(--spacing-lg) 0;
}

/* ============================================
   Header (Mobile Default)
   ============================================ */

.header {
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-md) 0;
    background: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.header-author {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ============================================
   Footer (Mobile Default)
   ============================================ */

.footer {
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-lg) 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.footer a {
    margin: 0 0.75rem;
    transition: color 0.15s;
}

.footer a:hover {
    color: var(--color-text);
}

.footer p {
    margin: 0;
}

.footer .block + .block {
    margin-top: 8px;
}

/* ============================================
   Posts List - Layout (Mobile Default)
   ============================================ */

.posts-section {
    padding: var(--spacing-xl) 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.posts-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    order: 2;
}

/* ============================================
   Sidebar Column (Mobile Default)
   ============================================ */

.sidebar-column {
    order: -1;
    width: 100%;
    max-width: 100%;
}

/* ============================================
   Sidebar (Mobile Default)
   ============================================ */

.sidebar {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.sidebar-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
    text-align: left;
}

.post-about,
.search-box {
    margin-bottom: var(--spacing-lg);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--color-bg);
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.search-form:focus-within {
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px rgba(41, 41, 41, 0.1);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-family: var(--font-body);
    color: var(--color-text);
    outline: none;
}

.search-input::placeholder {
    color: var(--color-text-light);
}

.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: var(--color-text-light);
    transition: color 0.15s;
}

.search-button:hover {
    color: var(--color-text);
}

.search-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

.search-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-xs);
    line-height: 1.3;
}

.search-count {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
}

/* ============================================
   Sidebar About (Mobile Default)
   ============================================ */

.about-box {
    display: none;
}

.about-box-mobile {
    order: 3;
    width: 100%;
    max-width: 100%;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    margin-top: var(--spacing-md);
}

.about-box-text {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   Tags (Mobile Default)
   ============================================ */

.tag {
    font-size: 0.75rem;
    color: var(--color-text-light);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    transition: all 0.15s;
    cursor: pointer;
}

.tag:hover,
.tag.is-active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

/* ============================================
   Post Card (Mobile Default)
   ============================================ */

.post-card {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--color-border);
    display: block;
    width: 100%;
    max-width: 100%;
}

.post-card:first-child {
    padding-top: 0;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    background: var(--color-bg-secondary);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-card-image:hover img {
    transform: scale(1.03);
}

.post-card .author-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-text);
    color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.author-name {
    font-size: 0.9rem;
    color: var(--color-text);
}

.post-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
    display: block;
    transition: color 0.15s;
}

.post-title:hover {
    color: var(--color-text-light);
}

.post-excerpt {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.post-meta .separator {
    margin: 0 0.4rem;
}

/* ============================================
   Empty State (Mobile Default)
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-state h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.empty-state p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.empty-state pre {
    background: var(--color-bg-secondary);
    padding: var(--spacing-md);
    border-radius: 4px;
    text-align: left;
    overflow-x: auto;
    font-size: 0.8rem;
    display: inline-block;
    font-family: var(--font-mono);
}

.empty-state .hint {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ============================================
   Post Detail (Mobile Default)
   ============================================ */

.post-detail-section {
    padding: var(--spacing-xl) 0;
    max-width: 680px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 180px);
}

.post-detail-section article {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-detail-section .content {
    flex: 1;
    min-height: 300px;
}

.post-detail-section .post-nav {
    margin-top: auto;
}

.post-cover-image {
    margin-left: 0;
    margin-right: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.2) 0 6px 12px;
}

.post-cover-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-detail-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
}

.post-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.author-detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.author-detail .author-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: var(--spacing-md);
}

.post-tags .tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
}

.preview-banner {
    margin-bottom: var(--spacing-xl);
    text-align: center;
    font-weight: 500;
}

/* ============================================
   Post Content Typography (Mobile Default)
   ============================================ */

.content {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
}

.content h1,
.content h2,
.content h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}

.content h1 {
    font-size: 1.8rem;
}
.content h2 {
    font-size: 1.5rem;
}
.content h3 {
    font-size: 1.25rem;
}

.content p {
    margin-bottom: 1.25rem;
}

.content a {
    text-decoration: none;
    background-image: linear-gradient(var(--color-text), var(--color-text));
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
}

.content a:hover {
    color: var(--color-text-light);
}

.content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.2) 0 6px 12px;
}

.content blockquote {
    border-left: 3px solid var(--color-text);
    padding-left: 1.2rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--color-text-light);
}

.content pre {
    background: var(--color-bg-secondary);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    border: 1px solid var(--color-border);
}

.content code {
    font-family: var(--font-mono);
    background: var(--color-bg-secondary);
    padding: 0.12rem 0.35rem;
    border-radius: 3px;
    font-size: 0.88em;
    color: var(--color-text-red);
}

.content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.content ul,
.content ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2.5rem 0;
}

/* Gist embed styling */
.gist-embed {
    margin: 1.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gist-file {
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d0d7de;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.gist-file:hover {
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.06);
}

.gist-file-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: #f6f8fa;
    border-bottom: 1px solid #d0d7de;
    font-size: 0.8rem;
}

.gist-icon {
    color: #57606a;
    flex-shrink: 0;
}

.gist-filename {
    color: #24292f;
    font-weight: 600;
    font-family: var(--font-mono);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gist-link {
    color: #0969da;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    background-image: none !important;
    transition: color 0.15s ease;
}

.gist-link:hover {
    color: #0550ae;
    text-decoration: underline;
}

.gist-file-body pre {
    margin: 0;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.gist-file-body pre code.hljs {
    padding: 0;
    background: transparent;
    color: #24292e;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.65;
    tab-size: 2;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.gist-error {
    background: var(--color-bg-secondary);
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.gist-error a {
    color: var(--color-text);
    font-weight: 500;
}

.post-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.post-nav a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
    max-width: 100%;
}

.post-nav .nav-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.post-nav .nav-arrow {
    flex-shrink: 0;
}

.post-nav .nav-prev {
    text-align: left;
}

.post-nav .nav-next {
    text-align: right;
    margin-left: auto;
}

/* ============================================
   Form Section (Mobile Default)
   ============================================ */

.form-section {
    padding: 0 0 var(--spacing-2xl);
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
    margin: 0 auto;
}

.form-section .title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.form-section .subtitle {
    font-size: 1.05rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xl);
}

.field {
    margin-bottom: 1.25rem;
}

.field .label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.field .markdown-editor {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}

.field .markdown-toolbar {
    display: flex;
    gap: 2px;
    padding: var(--spacing-sm);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.field .markdown-toolbar button {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    background: var(--color-bg);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-body);
    min-width: 28px;
    transition: all 0.15s;
}

.field .markdown-toolbar button:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

.field .markdown-editor textarea {
    border: none;
    border-radius: 0;
    min-height: 250px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    background: var(--color-bg);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px rgba(41, 41, 41, 0.1);
}

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

.field .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.field .checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.button {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-body);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition:
        background-color 0.2s,
        transform 0.1s;
}

.button.is-primary {
    background: var(--color-text);
    color: var(--color-bg);
}

.button.is-primary:hover {
    background: #444;
}

.button.is-primary:active {
    transform: scale(0.98);
}

.button.is-small {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.button.is-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.button.is-outline:hover {
    border-color: var(--color-text);
    background: var(--color-text);
    color: var(--color-bg);
}

.button.is-danger {
    background: #d32f2f;
    color: white;
}

.button.is-danger:hover {
    background: #b71c1c;
}

/* ============================================
   Result Box (Mobile Default)
   ============================================ */

.result-box {
    padding: var(--spacing-lg);
    background: var(--color-bg-secondary);
    border-radius: 4px;
    margin-top: var(--spacing-lg);
}

.result-box h3 {
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

.result-box pre {
    padding: var(--spacing-md);
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.75rem 0 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.token-warning {
    font-weight: 500;
    margin: var(--spacing-md) 0;
    color: #d32f2f;
}

.error-message {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
}

.help {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

/* ============================================
   Docs Section (Mobile Default)
   ============================================ */

.docs-section {
    padding: 2.5rem 0;
    max-width: 720px;
    margin: 0 auto;
}

.docs-section h1.title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
}

.docs-section .intro {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.docs-section h2.title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.docs-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
}

.docs-section p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.docs-section ul {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.docs-section li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.docs-section pre {
    background: var(--color-bg-secondary);
    padding: var(--spacing-md);
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.75rem 0 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.docs-section code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.endpoint {
    margin-bottom: 1.5rem;
}

.method-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-right: var(--spacing-sm);
    background: var(--color-accent);
    color: white;
}

.method-tag.is-get {
    background: #2196f3;
}
.method-tag.is-post {
    background: #4caf50;
}
.method-tag.is-put {
    background: #ff9800;
}
.method-tag.is-delete {
    background: #f44336;
}

.docs-subsection {
    margin-bottom: 2rem;
}

.docs-subsection .title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* ============================================
   Panel / Admin Layout (Mobile Default)
   ============================================ */

.panel-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
}

.panel-nav {
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0 var(--spacing-lg);
}

.panel-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    height: 50px;
    padding: 0;
}

.panel-logo {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.panel-nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.panel-nav-links a {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.panel-nav-links a:hover,
.panel-nav-links a.is-active {
    opacity: 1;
}

.panel-nav-links .button-link {
    background: none;
    border: none;
    color: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    transition: opacity 0.15s;
}

.panel-nav-links .button-link:hover {
    opacity: 1;
}

.panel-content {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.panel-search-form {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.panel-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
}

.panel-search-input:focus {
    outline: none;
    border-color: var(--color-text-light);
}

.panel-search-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: opacity 0.15s;
}

.panel-search-button:hover {
    opacity: 0.85;
}

.panel-search-clear {
    font-size: 0.9rem;
    color: var(--color-text-light);
    transition: color 0.15s;
}

.panel-search-clear:hover {
    color: var(--color-text);
}

/* ============================================
   Post Management (Mobile Default)
   ============================================ */

.post-management-section {
    padding: 2.5rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.management-card {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1.25rem;
    transition: all 0.15s ease-in-out;
}

.management-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.management-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.management-card-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.post-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.post-status.is-published {
    background: #e8f5e9;
    color: #2e7d32;
}

.post-status.is-draft {
    background: #f5f5f5;
    color: #616161;
}

.card-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ============================================
   Posts Table (Mobile Default)
   ============================================ */

.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.post-list {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    overflow-x: auto;
}

.empty-list {
    padding: 3rem;
    text-align: center;
    color: var(--color-text-light);
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.posts-table th,
.posts-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.posts-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    background: var(--color-bg-secondary);
}

.posts-table tr:last-child td {
    border-bottom: none;
}

.posts-table tr:hover td {
    background: var(--color-bg-secondary);
}

.post-title-cell a {
    font-weight: 500;
    cursor: pointer;
}

.post-title-cell a:hover {
    color: var(--color-text-light);
}

.post-date-cell {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.actions-cell {
    white-space: nowrap;
}

.btn-view,
.btn-edit,
.btn-delete {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    transition: all 0.15s;
}

.btn-view:hover,
.btn-edit:hover {
    border-color: var(--color-text);
    background: var(--color-text);
    color: var(--color-bg);
}

.btn-delete {
    color: #d32f2f;
    border-color: #ffcdd2;
}

.btn-delete:hover {
    background: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

/* ============================================
   Edit Form (Mobile Default)
   ============================================ */

.edit-form {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: var(--spacing-lg);
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.form-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: var(--color-text-light);
}

.btn-close:hover {
    color: var(--color-text);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--spacing-md);
}

#loginForm {
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Utilities (Mobile Default)
   ============================================ */

.has-text-centered {
    text-align: center;
}

.mb-3,
.mb-4,
.mb-5 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 2rem;
}

.mt-2,
.mt-3,
.mt-4 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.ml-2 {
    margin-left: var(--spacing-sm);
}

.box {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.box h3 {
    margin: 0 0 var(--spacing-lg) !important;
}

.box.is-fullheight {
    display: flex;
    flex-direction: column;
}

.box.is-fullheight form {
    width: 100%;
    height: 100%;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
}

.notification {
    padding: var(--spacing-md);
    border-radius: 4px;
    margin-bottom: var(--spacing-md);
}

.notification.is-danger {
    background: #fdecea;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.title.is-4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
}

.title.is-5 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

.is-fullwidth {
    width: 100%;
}

/* ============================================
   Error Page
   ============================================ */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: var(--spacing-xl) 0;
}

.error-page-content {
    text-align: center;
}

.error-code {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 700;
    color: var(--color-border);
    margin: 0;
    line-height: 1;
}

.error-page-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    margin: var(--spacing-md) 0 var(--spacing-sm);
}

.error-page-content p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   Desktop Enhancements (min-width: 769px)
   ============================================ */

@media (min-width: 769px) {
    /* Layout */
    html {
        font-size: 18px;
    }

    .container {
        max-width: 1100px;
        padding: 0 1.5rem;
    }

    /* Posts List - Two Column Layout */
    .posts-section {
        display: grid;
        grid-template-columns: 1fr 240px;
        align-items: start;
        gap: 2rem;
        min-height: 100vh;
    }

    main {
        min-height: 100vh;
    }

    .posts-grid {
        order: 1;
    }

    .sidebar-column {
        order: 2;
        position: sticky;
        align-self: start;
        width: 100%;
        max-width: 240px;
        height: fit-content;
        top: 76px;
    }

    .sidebar {
        text-align: right;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .sidebar-title {
        font-size: 0.7rem;
        text-align: right;
    }

    .topics-box {
        margin-top: 64px;
    }

    .tag-list {
        justify-content: flex-end;
    }

    .search-form {
        flex-direction: row;
    }

    .search-input {
        text-align: right;
        padding: 0.5rem 0.75rem;
    }

    .about-box {
        display: block;
        text-align: right;
        border-top: none;
        margin-top: 64px;
        padding-top: 0;
    }

    .about-box-mobile {
        display: none;
    }

    .about-box-text {
        font-size: 0.85rem;
    }

    /* Post Detail */
    .post-detail-title {
        font-size: 2.5rem;
    }

    .content {
        font-size: 1.15rem;
    }

    /* Post Navigation */
    .post-about {
        margin: 64px 0;
        padding: var(--spacing-lg) 0;
        border-top: 1px solid var(--color-border);
        text-align: left;
    }

    .post-about .sidebar-title {
        text-align: left;
    }

    .post-nav {
        flex-direction: row;
    }

    .post-nav a {
        max-width: 45%;
    }

    /* Form Section */
    .form-section {
        padding: 0 0 3rem;
    }

    /* Settings Grid */
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-grid .box.is-fullwidth {
        grid-column: span 2;
    }

    /* Panel */
    .panel-nav-inner {
        padding: 0;
    }

    .panel-content {
        padding: var(--spacing-lg);
    }

    /* Posts Table */
    .posts-table {
        display: table;
    }
}

/* ============================================
   Small Desktop Adjustments (min-width: 1100px)
   ============================================ */

@media (min-width: 1100px) {
    .header-inner,
    .panel-nav-inner {
        padding: 0;
    }
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-lg);
}

.pagination-link {
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 6px;
    transition: all 0.15s;
}

.pagination-link:hover {
    text-decoration: underline;
}

.pagination-info {
    color: var(--color-text-light);
    font-size: 0.7rem;
}

/* ============================================
   Modal
   ============================================ */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: 4px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-content p {
    margin: 0;
    color: var(--color-text-light);
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

/* ============================================
   Notification
   ============================================ */

.notification {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    border: 1px solid transparent;
    animation: fadeInSlide 0.2s ease-out;
}

.notification.is-success {
    background: #e6f4ea;
    color: #1e7e34;
    border-color: #c3e6cb;
}

.notification.is-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.notification.is-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.notification-container {
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: var(--spacing-md);
}

.notification-container:empty {
    display: none;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
