:root {
    --bg: #b8b8bb;
    --bg-soft: #c4c4c8;
    --surface: #f5f5f7;
    --panel: #fbfbfc;
    --panel-2: #ffffff;
    --panel-3: #f0f0f2;
    --text: #1d1d1f;
    --text-soft: rgba(29, 29, 31, 0.72);
    --text-faint: rgba(29, 29, 31, 0.50);
    --line: rgba(29, 29, 31, 0.08);
    --line-strong: rgba(29, 29, 31, 0.12);
    --blue: #0071e3;
    --blue-2: #0066cc;
    --danger: #ff3b30;
    --danger-soft: rgba(255, 59, 48, 0.08);
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.09);
    --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.06);
    --radius: 24px;
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "SF Pro Text", "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.47;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
pre { margin: 0; }

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.main-shell { padding: 18px 0 40px; }
.page-space { display: grid; gap: 16px; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 245, 247, 0.78);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
}

.brand-group { display: grid; gap: 0; }
.brand {
    font-family: "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.24px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.top-user {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin-right: 2px;
}
.inline-form { display: inline-flex; }

.hero-shell { padding-top: 6px; }
.hero-block,
.detail-hero,
.toolbar-panel,
.memo-card,
.stat-card,
.detail-card,
.empty-card,
.auth-card,
.edit-shell,
.notice-banner {
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    border-radius: 28px;
    padding: 18px 20px;
}
.hero-copy { display: grid; gap: 10px; align-content: start; }
.page-badge, .danger-badge { display:none; }

.hero-copy h1,
.detail-hero-main h1,
.page-head h1 {
    margin: 0;
    font-family: "SF Pro Display", "Segoe UI", sans-serif;
    font-size: clamp(1.8rem, 3.8vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: -0.28px;
}
.hero-text, .muted { margin: 0; color: var(--text-soft); }
.hero-actions, .action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.hero-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.stat-card {
    border-radius: 20px;
    padding: 12px 14px;
    min-width: 104px;
    background: rgba(255,255,255,0.6);
    box-shadow: var(--shadow-soft);
}
.stat-card span {
    display: block;
    color: var(--text-faint);
    font-size: 0.8rem;
}
.stat-card strong {
    display: block;
    margin-top: 4px;
    font-size: 1.2rem;
    line-height: 1.1;
    letter-spacing: -0.2px;
}

.notice-banner, .alert {
    border-radius: 18px;
    padding: 14px 16px;
}
.notice-banner {
    background: rgba(0,113,227,0.08);
    border-color: rgba(0,113,227,0.12);
    color: var(--blue-2);
}
.alert.error {
    background: rgba(255,59,48,0.08);
    border: 1px solid rgba(255,59,48,0.14);
    color: #a02f27;
}

.toolbar-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 170px 170px auto;
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
    align-items: end;
}
.toolbar-panel-minimal {
    display: block;
    padding: 10px 12px;
}
.search-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 4px 4px 4px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(29,29,31,0.08);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.55);
}
.search-strip input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.96rem;
    padding: 0;
    min-height: 36px;
}
.search-strip input::placeholder {
    color: var(--text-faint);
}
.search-icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.search-icon-btn:hover {
    background: rgba(29,29,31,0.05);
    color: var(--text);
}
.search-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.grow { flex: 1 1 320px; }
.field-compact { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span {
    color: var(--text-faint);
    font-size: 0.82rem;
    font-weight: 600;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(29,29,31,0.08);
    background: rgba(255,255,255,0.86);
    color: var(--text);
    font: inherit;
    outline: none;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.5);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(0,113,227,0.35);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}
.field textarea { min-height: 180px; resize: vertical; }
.field.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-top: 24px;
}
.field.checkbox input {
    width: 18px;
    min-height: auto;
    accent-color: var(--blue);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    letter-spacing: -0.1px;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,113,227,0.22);
}
.btn.secondary,
.btn.ghost {
    background: rgba(255,255,255,0.72);
    color: var(--text);
    border-color: rgba(29,29,31,0.08);
}
.btn.danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(255,59,48,0.1);
}

.memo-list { display: grid; gap: 14px; }
.memo-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 18px 18px 16px;
    background: rgba(248,248,250,0.95);
}
.memo-card::before { display:none; }
.memo-card-top,
.memo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}
.memo-card h2 {
    margin: 8px 0 0;
    font-family: "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 1.2rem;
    line-height: 1.16;
    letter-spacing: -0.18px;
}
.memo-meta-row, .memo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(0,113,227,0.08);
    border: 1px solid rgba(0,113,227,0.10);
    color: var(--blue-2);
    font-size: 0.76rem;
    font-weight: 600;
}
.badge.soft {
    background: rgba(29,29,31,0.04);
    border-color: rgba(29,29,31,0.06);
    color: var(--text-soft);
}
.source-text {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 600;
}
.memo-time {
    display: grid;
    gap: 4px;
    text-align: right;
    color: var(--text-faint);
    font-size: 0.78rem;
}
.memo-content, .content-pre {
    white-space: pre-wrap;
    word-break: break-word;
}
.memo-content {
    margin: 12px 0 12px;
    color: rgba(29,29,31,0.9);
    font-size: 0.94rem;
    line-height: 1.45;
}
.thumb-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.thumb, .image-card img {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(29,29,31,0.08);
}
.thumb { height: 94px; }
.thumb.more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 94px;
    border-radius: 16px;
    border: 1px solid rgba(29,29,31,0.08);
    background: rgba(29,29,31,0.03);
    color: var(--text-soft);
    font-weight: 700;
}

.detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    border-radius: 28px;
    padding: 20px;
}
.detail-hero-main { display: grid; gap: 10px; }
.detail-card,
.empty-card,
.auth-card,
.edit-shell {
    border-radius: 28px;
    padding: 22px;
}
.dark-card { border-radius: 28px; }
.detail-grid,
.edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.compact-detail-grid {
    margin-top: 14px;
}
.detail-item {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.62);
    border: 1px solid rgba(29,29,31,0.05);
    box-shadow: var(--shadow-soft);
}
.detail-item-wide {
    grid-column: 1 / -1;
}
.label {
    color: var(--text-faint);
    font-size: 0.84rem;
    margin-bottom: 6px;
}
.value { font-weight: 600; }
.value.code {
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.content-panel { margin-top: 18px; }
.content-panel-first {
    margin-top: 0;
}
.content-pre {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(29,29,31,0.05);
    color: rgba(29,29,31,0.9);
}
.content-pre-main {
    min-height: 148px;
    font-size: 1rem;
    line-height: 1.6;
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.image-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(29,29,31,0.06);
    background: rgba(29,29,31,0.02);
}
.image-card img { height: 180px; }
.image-card span { color: var(--text-soft); font-size: 0.86rem; }

.
.upload-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(29,29,31,0.06);
    background: rgba(255,255,255,0.58);
    box-shadow: var(--shadow-soft);
}
.upload-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.upload-panel-head h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    letter-spacing: -0.18px;
}
.upload-panel-head p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
}
.upload-dropzone {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 22px;
    border: 1px dashed rgba(0,113,227,0.24);
    background: rgba(0,113,227,0.04);
    cursor: pointer;
}
.upload-dropzone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.upload-dropzone strong {
    font-size: 1rem;
    letter-spacing: -0.16px;
}
.upload-dropzone span {
    color: var(--text-soft);
    font-size: 0.88rem;
}
.upload-status {
    min-height: 20px;
    color: var(--text-soft);
    font-size: 0.82rem;
}
.upload-preview-grid,
.existing-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.upload-preview-card,
.existing-image-card {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(29,29,31,0.06);
    background: rgba(255,255,255,0.78);
    box-shadow: var(--shadow-soft);
}
.upload-preview-card img,
.existing-image-card img {
    width: 100%;
    height: 132px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(29,29,31,0.06);
}
.upload-preview-meta,
.existing-image-name {
    min-width: 0;
    color: var(--text-soft);
    font-size: 0.8rem;
}
.upload-preview-meta strong,
.existing-image-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.upload-preview-meta span {
    display: block;
    margin-top: 2px;
}
.existing-image-card input[type=checkbox] {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--danger);
}
.existing-image-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: var(--danger);
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}
.showcase-panel {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}
.showcase-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.showcase-main-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255,255,255,0.68);
    border: 1px solid rgba(29,29,31,0.06);
    box-shadow: var(--shadow-soft);
}
.showcase-main-card img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(29,29,31,0.03);
}
.showcase-file-name {
    color: var(--text-soft);
    font-size: 0.84rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.showcase-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
}
.showcase-thumb-card {
    flex: 0 0 128px;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255,255,255,0.64);
    border: 1px solid rgba(29,29,31,0.06);
    box-shadow: var(--shadow-soft);
    scroll-snap-align: start;
}
.showcase-thumb-card img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(29,29,31,0.05);
}
.showcase-thumb-card span {
    font-size: 0.78rem;
    color: var(--text-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

auth-shell,
.premium-auth-shell {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    padding: 18px 0;
}
.auth-card,
.premium-auth-card {
    width: min(760px, 100%);
}
.auth-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 16px;
    margin-bottom: 20px;
}
.auth-hero-copy,
.auth-hero-panel {
    border-radius: 22px;
    border: 1px solid rgba(29,29,31,0.06);
    background: rgba(255,255,255,0.56);
    padding: 18px;
}
.auth-hero-copy h1 { margin: 4px 0 0; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.1; }
.hero-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(29,29,31,0.04);
    border: 1px solid rgba(29,29,31,0.06);
    color: var(--text-soft);
    font-size: 0.82rem;
}
.hero-panel-label { color: var(--blue-2); font-size: 0.76rem; margin-bottom: 8px; letter-spacing: 0.06em; text-transform: uppercase; }
.auth-hero-panel strong { display: block; margin-bottom: 6px; font-size: 1rem; }
.auth-hero-panel span { color: var(--text-soft); }
.auth-form-grid { display: grid; gap: 14px; }
.premium-field input { background: rgba(255,255,255,0.85); }
.premium-action-row { justify-content: flex-start; }

.empty-card h2,
.detail-card h2,
.notice-card h2 { margin-top: 0; }
.stack { display: flex; flex-direction: column; }
.gap-16 { gap: 16px; }
.gap-18 { gap: 18px; }

@media (max-width: 980px) {
    .hero-block,
    .auth-hero,
    .toolbar-panel { grid-template-columns: 1fr; }
    .toolbar-panel-minimal { padding: 10px 12px; }
    .detail-hero,
    .memo-card-top { flex-direction: column; }
    .memo-time { text-align: left; }
}

@media (max-width: 760px) {

    .upload-panel {
        padding: 12px;
        border-radius: 16px;
        gap: 10px;
    }
    .upload-panel-head h3 {
        font-size: 0.9rem;
    }
    .upload-panel-head p,
    .upload-dropzone span,
    .upload-status {
        font-size: 0.74rem;
    }
    .upload-dropzone {
        padding: 12px;
        border-radius: 14px;
    }
    .upload-dropzone strong {
        font-size: 0.9rem;
    }
    .upload-preview-grid,
    .existing-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .upload-preview-card,
    .existing-image-card {
        padding: 7px;
        border-radius: 12px;
    }
    .upload-preview-card img,
    .existing-image-card img {
        height: 90px;
        border-radius: 10px;
    }
    .existing-image-remove {
        top: 6px;
        right: 6px;
        min-height: 20px;
        padding: 0 7px;
        font-size: 0.68rem;
    }
    .showcase-panel {
        margin-top: 12px;
        gap: 10px;
    }
    .showcase-main-card {
        padding: 8px;
        border-radius: 14px;
    }
    .showcase-main-card img {
        max-height: 220px;
        border-radius: 12px;
    }
    .showcase-thumb-card {
        flex-basis: 104px;
        padding: 7px;
        border-radius: 12px;
    }
    .showcase-thumb-card img {
        height: 76px;
        border-radius: 10px;
    }
    .container { width: min(100% - 14px, 1100px); }
    .main-shell { padding: 10px 0 20px; }
    .page-space { gap: 10px; }

    .topbar-inner,
    .edit-grid { display: grid; grid-template-columns: 1fr; }
    .topbar-inner {
        min-height: 48px;
        gap: 8px;
        padding: 6px 0;
    }
    .brand { font-size: 0.98rem; }
    .top-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
    }
    .top-user {
        width: 100%;
        font-size: 0.74rem;
        margin: 0;
    }
    .btn {
        min-height: 30px;
        padding: 0 11px;
        font-size: 0.76rem;
        font-weight: 600;
    }

    .hero-block,
    .detail-card,
    .empty-card,
    .auth-card,
    .edit-shell,
    .memo-card,
    .detail-hero,
    .toolbar-panel,
    .stat-card {
        border-radius: 16px;
    }

    .hero-block {
        padding: 12px;
        gap: 8px;
    }
    .hero-text { display: none; }
    .hero-copy h1,
    .detail-hero-main h1 {
        font-size: 1.22rem;
        letter-spacing: -0.18px;
    }
    .hero-stats {
        display: none;
    }

    .toolbar-panel {
        padding: 10px;
        gap: 8px;
    }
    .field span {
        font-size: 0.74rem;
    }
    .field input,
    .field select,
    .field textarea {
        min-height: 34px;
        padding: 7px 10px;
        border-radius: 10px;
        font-size: 0.82rem;
    }
    .field textarea { min-height: 138px; }

    .memo-list { gap: 8px; }
    .memo-card {
        padding: 10px 11px;
        box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    }
    .memo-card h2 {
        margin-top: 6px;
        font-size: 0.96rem;
        line-height: 1.18;
    }
    .memo-meta-row,
    .memo-meta { gap: 5px; }
    .badge {
        min-height: 20px;
        padding: 0 7px;
        font-size: 0.68rem;
    }
    .source-text {
        min-height: 20px;
        font-size: 0.68rem;
    }
    .memo-time {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        text-align: left;
        font-size: 0.66rem;
    }
    .memo-time span:nth-child(2),
    .memo-time span:nth-child(3) { display:none; }
    .memo-content {
        margin: 8px 0 8px;
        font-size: 0.78rem;
        line-height: 1.36;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .thumb-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 8px;
    }
    .thumb,
    .thumb.more {
        height: 52px;
        min-height: 52px;
        border-radius: 10px;
    }
    .action-row { gap: 6px; }
    .detail-hero {
        padding: 12px;
        gap: 10px;
    }
    .detail-card,
    .empty-card,
    .auth-card,
    .edit-shell { padding: 12px; }
    .compact-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 10px;
    }
    .detail-item {
        padding: 8px 10px;
        border-radius: 12px;
    }
    .detail-item-wide {
        grid-column: 1 / -1;
    }
    .label {
        font-size: 0.72rem;
        margin-bottom: 4px;
    }
    .value {
        font-size: 0.86rem;
        line-height: 1.32;
    }
    .value.code {
        font-size: 0.78rem;
        line-height: 1.3;
    }
    .image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .image-card {
        padding: 7px;
        border-radius: 12px;
    }
    .image-card img { height: 100px; }
    .content-pre {
        padding: 12px;
        border-radius: 12px;
        font-size: 0.84rem;
    }
    .content-pre-main {
        min-height: 168px;
        font-size: 0.92rem;
        line-height: 1.55;
    }
    .auth-shell,
    .premium-auth-shell {
        min-height: auto;
        padding: 10px 0;
    }
}

@media (max-width: 420px) {
    .brand { font-size: 0.92rem; }
    .hero-copy h1,
    .detail-hero-main h1 { font-size: 1.08rem; }
    .compact-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
    .memo-card { padding: 9px 10px; }
    .memo-card h2 { font-size: 0.9rem; }
    .memo-content { font-size: 0.76rem; }
}


.validation-summary ul { margin: 8px 0 0; padding-left: 18px; }
.field-validation { display: block; margin-top: 8px; color: #d93025; font-size: 13px; line-height: 1.5; }
.input-validation-error, textarea.input-validation-error, select.input-validation-error { border-color: rgba(217, 48, 37, 0.35) !important; box-shadow: 0 0 0 3px rgba(217,48,37,0.08); }



.apple-login-only-shell {
    min-height: calc(100vh - 24px);
    display: grid;
    place-items: center;
    padding: 18px 0;
}

.desktop-helper-download {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 154px;
    min-height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    color: #fff;
    background: #0071e3;
    box-shadow: 0 10px 24px rgba(0,113,227,0.24);
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    box-sizing: border-box;
}

.desktop-helper-download:hover {
    background: #0077ed;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0,113,227,0.28);
}

.desktop-helper-download:focus-visible {
    outline: 3px solid rgba(0,113,227,0.28);
    outline-offset: 3px;
}


.beian-record-link {
    position: fixed;
    left: 50%;
    bottom: 38px;
    z-index: 20;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.94);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.beian-record-link:hover {
    color: #fff;
    text-decoration: underline;
}

.beian-record-link:focus-visible {
    outline: 2px solid rgba(255,255,255,0.72);
    outline-offset: 4px;
    border-radius: 4px;
}

.apple-login-only-card {
    width: min(600px, calc(100vw - 32px));
    padding: 34px 34px 30px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.74);
    background: linear-gradient(180deg, rgba(248,248,250,0.98), rgba(244,244,246,0.96));
    box-shadow: 0 24px 52px rgba(17, 24, 39, 0.10), 0 8px 20px rgba(17, 24, 39, 0.06);
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
}

.apple-login-only-head {
    margin-bottom: 20px;
}

.apple-login-only-head h1 {
    margin: 0;
    font-family: "SF Pro Display", "Segoe UI", sans-serif;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: #1d1d1f;
}

.apple-login-field {
    gap: 10px;
    margin-top: 18px;
}

.apple-login-field span {
    color: rgba(29,29,31,0.58);
    font-size: 1rem;
    font-weight: 700;
}

.apple-login-field input {
    min-height: 54px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid rgba(29,29,31,0.08);
    background: rgba(255,255,255,0.68);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.68);
    font-size: 1rem;
}

.apple-login-field input::placeholder {
    color: rgba(29,29,31,0.42);
}

.apple-login-actions {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.apple-login-primary,
.apple-login-secondary {
    min-height: 54px;
    border-radius: 999px;
    font-size: 1.02rem;
    font-weight: 800;
}

.apple-login-primary {
    box-shadow: 0 16px 28px rgba(0,113,227,0.26);
}

.apple-login-secondary {
    background: rgba(255,255,255,0.88);
    border-color: rgba(29,29,31,0.08);
}

.memo-card {
    box-shadow: 0 16px 36px rgba(17,24,39,0.08), 0 6px 14px rgba(17,24,39,0.04);
}

@media (max-width: 760px) {
    .desktop-helper-download {
        top: 10px;
        right: 10px;
        min-width: 126px;
        min-height: 32px;
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .beian-record-link {
        bottom: 14px;
        width: calc(100vw - 28px);
        font-size: 0.76rem;
        white-space: normal;
    }

    .apple-login-only-shell {
        min-height: calc(100vh - 16px);
        padding: 8px 0;
    }

    .apple-login-only-card {
        width: min(600px, calc(100vw - 32px));
        padding: 20px 16px 18px;
        border-radius: 22px;
        max-width: calc(100vw - 32px);
    box-sizing: border-box;
}

    .apple-login-only-head h1 {
        font-size: 2rem;
        letter-spacing: -0.03em;
    }

    .apple-login-field {
        margin-top: 14px;
    }

    .apple-login-field span {
        font-size: 0.9rem;
    }

    .apple-login-field input {
        min-height: 46px;
        border-radius: 15px;
        font-size: 0.92rem;
    }

    .apple-login-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .apple-login-primary,
    .apple-login-secondary {
        min-height: 46px;
        font-size: 0.92rem;
    }
}


/* login dialog size override */
.login-card,
.login-panel,
.auth-card,
.login-dialog {
  width: min(600px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  min-height: 410px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 760px) {
  .login-card,
  .login-panel,
  .auth-card,
  .login-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    min-height: auto;
  }
}


