:root {
    --lg-bg: #0c1020;
    --lg-card: rgba(255, 255, 255, 0.12);
    --lg-card-strong: rgba(255, 255, 255, 0.2);
    --lg-text: #fff8f8;
    --lg-muted: rgba(255, 255, 255, 0.68);
    --lg-line: rgba(255, 255, 255, 0.16);
    --lg-pink: #ff8fb1;
    --lg-gold: #ffd89a;
    --lg-blue: #91d1ff;
    --lg-green: #9bf2c6;
    --lg-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 5%, rgba(255, 143, 177, 0.32), transparent 34rem),
        radial-gradient(circle at 85% 16%, rgba(145, 209, 255, 0.28), transparent 30rem),
        linear-gradient(135deg, #11162d 0%, #25152d 48%, #14222f 100%) !important;
    color: var(--lg-text);
    font-family: Inter, "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    line-height: 1.72;
    letter-spacing: 0;
    cursor: auto !important;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    letter-spacing: 0 !important;
}

a, button, input, textarea, select, .card, .cike {
    cursor: auto !important;
}

a, button, .crud-actions a, .modern-btn, .modern-bottom-nav a {
    cursor: pointer !important;
}

.lg-sidebar {
    display: none !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 78%);
}

.modern-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 150px;
    min-width: 0;
}

img,
video {
    max-width: 100%;
}

.modern-hero {
    min-height: 86vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    align-items: center;
    gap: 28px;
}

.hero-copy {
    animation: lgFadeUp .8s ease both;
}

.hero-kicker,
.modern-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--lg-line);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--lg-gold);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.modern-title {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(42px, 7vw, 92px);
    line-height: .96;
    letter-spacing: 0;
    font-family: Georgia, "Noto Serif SC", serif;
}

.modern-subtitle {
    max-width: 680px;
    color: var(--lg-muted);
    font-size: clamp(18px, 2.4vw, 28px);
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.modern-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 12px 18px;
    color: #1b1122 !important;
    background: linear-gradient(135deg, var(--lg-gold), var(--lg-pink));
    box-shadow: 0 14px 34px rgba(255, 143, 177, .25);
    font-weight: 800;
    text-decoration: none !important;
}

.modern-btn.ghost {
    color: var(--lg-text) !important;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--lg-line);
    box-shadow: none;
}

.time-orbit {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 28px;
}

.time-orbit .time-chip {
    border: 1px solid var(--lg-line);
    border-radius: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(18px);
}

.time-chip b {
    display: block;
    color: #fff;
    font-size: 26px;
    line-height: 1.1;
}

.time-chip span {
    color: var(--lg-muted);
    font-size: 12px;
}

.hero-panel,
.modern-card,
.stat-card,
.preview-card,
.love-day-card {
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
    box-shadow: var(--lg-shadow);
    backdrop-filter: blur(22px);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    padding: 22px;
    animation: lgFloat 6s ease-in-out infinite;
}

.hero-panel::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 216, 154, .32);
    filter: blur(24px);
}

.couple-card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
}

.avatar-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 28px 0;
}

.avatar-pair img {
    width: 108px;
    height: 108px;
    border-radius: 32px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.52);
    box-shadow: 0 18px 44px rgba(0,0,0,.28);
}

.avatar-pair .heart-link {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #25152d;
    background: linear-gradient(135deg, var(--lg-pink), var(--lg-gold));
    font-size: 28px;
}

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.weather-card {
    border: 1px solid var(--lg-line);
    border-radius: 18px;
    padding: 14px;
    color: var(--lg-muted);
    background: rgba(255,255,255,.1);
}

.weather-card strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.modern-section {
    margin-top: 44px;
    min-width: 0;
}

.compact-section {
    margin-top: 24px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: 0;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--lg-muted);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 18px;
}

.stat-link {
    display: flex;
    min-height: 86px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #fff !important;
    text-decoration: none !important;
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.stat-link:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,.34);
    background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.1));
}

.stat-card b {
    display: block;
    color: #fff;
    font-size: 32px;
    line-height: 1;
}

.stat-card span {
    color: var(--lg-muted);
    font-size: 14px;
    font-weight: 800;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.preview-card {
    min-height: 190px;
    overflow: hidden;
    padding: 18px;
    color: #fff !important;
    text-decoration: none !important;
    transition: transform .25s ease, border-color .25s ease;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
}

.photo-preview-card {
    background-size: cover;
    background-position: center;
}

.preview-card h3,
.trail-card h3,
.order-card h3,
.love-day-card h3 {
    line-height: 1.32;
    word-break: break-word;
}

.preview-card p,
.trail-card p,
.order-card p,
.love-day-card p {
    line-height: 1.72;
}

.preview-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,.38);
}

.preview-card .meta {
    display: block;
    margin-bottom: 12px;
    color: var(--lg-gold);
    font-size: 12px;
}

.preview-card p {
    color: var(--lg-muted);
}

.love-day-grid,
.trail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.love-day-card,
.trail-card {
    border: 1px solid var(--lg-line);
    border-radius: 22px;
    padding: 18px;
    background: rgba(255,255,255,.1);
    color: #fff;
    backdrop-filter: blur(18px);
}

.trail-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 12px;
}

.modern-crud-page {
    margin-top: 18px;
}

.modern-form-card {
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 18px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.08));
    box-shadow: var(--lg-shadow);
    backdrop-filter: blur(22px);
    max-width: 100%;
    min-width: 0;
}

.compact-form-card {
    padding: 14px 16px;
    margin-bottom: 14px;
}

.empty-state {
    color: var(--lg-muted);
    text-align: center;
    padding: 28px 0;
    font-size: 15px;
}

.modern-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.modern-form-grid label {
    display: grid;
    gap: 7px;
    color: rgba(255,255,255,.82);
    font-weight: 700;
}

.modern-form-grid .wide {
    grid-column: 1 / -1;
}

.modern-form-grid input,
.modern-form-grid textarea,
.modern-form-grid select {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px;
    padding: 12px 13px;
    color: #fff;
    background: rgba(255,255,255,.1);
    outline: none;
}

.modern-form-grid textarea {
    resize: vertical;
}

.modern-form-grid input::placeholder,
.modern-form-grid textarea::placeholder {
    color: rgba(255,255,255,.42);
}

.crud-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.todo-list {
    display: grid;
    gap: 2px;
}

.todo-group {
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.todo-swipe {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    touch-action: pan-y;
}

.todo-swipe:last-child {
    border-bottom: 0;
}

.todo-content {
    position: relative;
    z-index: 2;
    background: rgb(24, 29, 52);
    transition: transform .22s ease;
    will-change: transform;
}

.todo-swipe.is-open .todo-content {
    transform: translateX(-132px);
}

.todo-actions {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 1;
    width: 132px;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.todo-swipe.is-open .todo-actions {
    opacity: 1;
    pointer-events: auto;
}

.todo-actions a {
    width: 66px;
    display: grid;
    place-items: center;
    color: #1b1122 !important;
    background: linear-gradient(135deg, var(--lg-gold), var(--lg-pink));
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
}

.todo-actions a.danger {
    color: #fff !important;
    background: rgba(255, 111, 135, .42);
}

.todo-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    color: #fff;
    transition: background 0.2s ease;
    min-width: 0;
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

.todo-item h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    word-break: break-word;
    min-width: 0;
}

.todo-item.done h4 {
    color: rgba(255, 255, 255, 0.38);
    text-decoration: line-through;
}
.todo-item.done {
    color: rgba(255, 255, 255, 0.38);
}

.todo-check {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    min-width: 27px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.32);
    background: transparent;
    color: transparent;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer !important;
    transition: all 0.25s ease;
    user-select: none;
}

.todo-item:not(.done) .todo-check:hover {
    border-color: var(--lg-pink);
    box-shadow: 0 0 12px rgba(255, 143, 177, 0.28);
}

.todo-item.done .todo-check {
    border-color: transparent;
    background: linear-gradient(135deg, var(--lg-green), var(--lg-blue));
    color: #0c1020;
}

.album-timeline {
    display: grid;
    gap: 18px;
}

.record-feed {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.record-card {
    position: relative;
    min-width: 0;
    overflow: visible;
}

.record-main {
    width: 100%;
    min-height: 132px;
    border: 1px solid var(--lg-line);
    border-radius: 22px;
    padding: 14px 54px 14px 14px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 13px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
    box-shadow: 0 18px 48px rgba(0,0,0,.2);
    backdrop-filter: blur(22px);
    text-align: left;
    transition: transform .22s ease, border-color .22s ease;
}

.record-main:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,.34);
}

.record-date {
    width: 54px;
    min-width: 54px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 16px;
    padding: 7px 5px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.1);
    color: #fff;
    line-height: 1.05;
}

.record-date strong {
    font-size: 24px;
    font-weight: 900;
}

.record-date small {
    color: var(--lg-muted);
    font-size: 12px;
    font-weight: 800;
}

.record-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.record-meta,
.record-detail-meta {
    color: rgba(255,255,255,.55);
    font-size: 12px;
    font-weight: 800;
}

.record-copy strong {
    overflow: hidden;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-copy span:last-child {
    display: -webkit-box;
    overflow: hidden;
    color: var(--lg-muted);
    font-size: 14px;
    line-height: 1.58;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.record-thumb {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
}

.record-chevron {
    color: rgba(255,255,255,.5);
    font-size: 20px;
    font-weight: 900;
}

.record-menu-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.78);
    background: transparent;
    font-size: 24px;
    line-height: 1;
}

.record-menu-toggle:hover,
.record-menu-toggle.is-open {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.record-menu {
    position: absolute;
    top: 48px;
    right: 12px;
    z-index: 8;
    min-width: 118px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 16px;
    background: rgba(22, 24, 42, .96);
    box-shadow: 0 18px 44px rgba(0,0,0,.32);
    backdrop-filter: blur(20px);
}

.record-menu a,
.record-menu button {
    width: 100%;
    min-height: 42px;
    border: 0;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #fff !important;
    background: transparent;
    text-align: left;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
}

.record-menu a:hover,
.record-menu button:hover {
    background: rgba(255,255,255,.1);
}

.record-menu .danger {
    color: #ffb7c5 !important;
}

.record-sheet[hidden] {
    display: none;
}

body.record-sheet-open {
    overflow: hidden;
}

.record-sheet {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: grid;
    align-items: end;
}

.record-sheet-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(5, 7, 16, .58);
    backdrop-filter: blur(10px);
}

.record-sheet-panel {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100% - 24px));
    max-height: min(86vh, 780px);
    margin: 0 auto calc(18px + env(safe-area-inset-bottom));
    overflow: auto;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 26px;
    padding: 22px;
    color: #fff;
    background: rgba(20, 24, 42, .96);
    box-shadow: 0 24px 80px rgba(0,0,0,.42);
}

.record-sheet-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.12);
    font-size: 24px;
}

.record-detail-content {
    display: grid;
    gap: 14px;
}

.record-detail-content h2 {
    margin: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1.28;
}

.record-detail-text {
    color: rgba(255,255,255,.82);
    font-size: 15px;
    line-height: 1.9;
    word-break: break-word;
}

.record-detail-image {
    width: 100%;
    max-height: 420px;
    border-radius: 20px;
    object-fit: cover;
}

.reply-block {
    margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 16px;
}

.reply-block h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
}

.reply-list {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.reply-empty {
    margin: 0;
    color: rgba(255,255,255,.48);
}

.reply-item {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 10px 12px;
    background: rgba(255,255,255,.07);
}

.reply-item div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(255,255,255,.55);
    font-size: 12px;
}

.reply-item p {
    margin: 6px 0 0;
    color: rgba(255,255,255,.82);
    line-height: 1.7;
}

.reply-delete {
    display: inline-flex;
    margin-top: 6px;
    color: #ffb7c5 !important;
    font-size: 12px;
    text-decoration: none !important;
}

.reply-form {
    display: grid;
    gap: 10px;
}

.reply-form label {
    display: grid;
    gap: 6px;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    font-weight: 800;
}

.reply-form input,
.reply-form textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px;
    padding: 11px 12px;
    color: #fff;
    background: rgba(255,255,255,.08);
    outline: none;
}

.form-image-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.form-image-strip img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    object-fit: cover;
}

.album-post {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
}

.album-post-date {
    position: sticky;
    top: 18px;
    align-self: start;
    border: 1px solid var(--lg-line);
    border-radius: 18px;
    padding: 12px;
    color: var(--lg-gold);
    background: rgba(255,255,255,.1);
    text-align: center;
    font-weight: 800;
}

.album-post-body {
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.08));
    box-shadow: var(--lg-shadow);
    backdrop-filter: blur(22px);
}

.album-post-body h3 {
    margin: 0 0 8px;
    color: #fff;
}

.album-post-body p {
    color: var(--lg-muted);
}

.album-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.album-image-grid.single {
    grid-template-columns: minmax(0, 1fr);
}

.album-image-grid button {
    border: 0;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,.1);
}

.album-image-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.album-image-grid.single img {
    aspect-ratio: 16 / 10;
}

.album-viewer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    align-items: center;
    gap: 8px;
    padding: 24px;
    background: rgba(8, 10, 18, .9);
}

.album-viewer[hidden] {
    display: none;
}

.album-viewer img {
    max-width: 100%;
    max-height: 86vh;
    margin: 0 auto;
    border-radius: 18px;
    object-fit: contain;
}

.album-viewer button {
    border: 0;
    border-radius: 999px;
    color: #1b1122;
    background: linear-gradient(135deg, var(--lg-gold), var(--lg-pink));
    font-size: 28px;
    font-weight: 900;
}

.album-viewer-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
}

.crud-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border-radius: 999px;
    padding: 8px 12px;
    color: #1b1122 !important;
    background: linear-gradient(135deg, var(--lg-gold), var(--lg-pink));
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
}

.crud-actions a.danger {
    color: #fff !important;
    background: rgba(255, 111, 135, .24);
    border: 1px solid rgba(255, 111, 135, .36);
}

.crud-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 12px;
}

.orders-list {
    display: grid;
    gap: 14px;
}

.order-card {
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.08));
    box-shadow: var(--lg-shadow);
    backdrop-filter: blur(22px);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.order-head > div {
    min-width: 0;
}

.due-box {
    min-width: 92px;
    border: 1px solid var(--lg-line);
    border-radius: 18px;
    padding: 12px;
    background: rgba(255,255,255,.1);
    text-align: center;
}

.due-box span {
    display: block;
    color: var(--lg-muted);
    font-size: 12px;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    min-width: 0;
    display: grid;
    gap: 6px;
    color: rgba(255,255,255,.44);
}

.timeline li > span {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
}

.timeline li.done {
    color: var(--lg-green);
}

.timeline li.done > span {
    background: linear-gradient(90deg, var(--lg-green), var(--lg-blue));
}

.timeline strong {
    display: block;
    font-size: 13px;
}

.timeline small {
    display: block;
    color: inherit;
    font-size: 11px;
    line-height: 1.4;
}

.schedule-page {
    display: grid;
    gap: 16px;
}

.schedule-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--lg-line);
    border-radius: 28px;
    padding: 20px;
    color: #fff;
    background: linear-gradient(135deg, rgba(255,143,177,.9), rgba(145,209,255,.72));
    box-shadow: var(--lg-shadow);
}

.schedule-hero span,
.schedule-hero small {
    display: block;
    color: rgba(255,255,255,.82);
    line-height: 1.55;
}

.schedule-hero strong {
    display: block;
    margin: 4px 0;
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1.2;
}

.schedule-week-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.schedule-week-nav a {
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: 9px 12px;
    color: #fff !important;
    background: rgba(255,255,255,.14);
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
}

.schedule-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid var(--lg-line);
    border-radius: 18px;
    padding: 5px;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(18px);
}

.schedule-tabs button {
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--lg-muted);
    background: transparent;
    font-size: 14px;
    font-weight: 900;
}

.schedule-tabs button.active {
    color: #1b1122;
    background: linear-gradient(135deg, var(--lg-gold), var(--lg-pink));
}

.schedule-panel {
    display: none;
}

.schedule-panel.active {
    display: grid;
    gap: 14px;
}

.schedule-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    font-weight: 800;
}

.schedule-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.schedule-legend i {
    width: 14px;
    height: 14px;
    border-radius: 5px;
}

.schedule-legend .sx,
.schedule-shift.sx {
    background: #4ea3ff;
}

.schedule-legend .fk,
.schedule-shift.fk {
    background: #ff8fb1;
}

.schedule-legend .night,
.schedule-shift.night {
    background: #7756d9;
}

.schedule-legend .rest,
.schedule-shift.rest {
    background: #eef2f7;
}

.schedule-board {
    overflow-x: auto;
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    background: rgba(255,255,255,.95);
    box-shadow: var(--lg-shadow);
}

.schedule-grid {
    display: grid;
    grid-template-columns: 58px repeat(7, minmax(96px, 1fr));
    min-width: 820px;
}

.schedule-cell {
    min-height: 68px;
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    padding: 7px;
    background: #fff;
}

.schedule-head {
    min-height: 54px;
    display: grid;
    place-items: center;
    color: #334155;
    background: #f8fafc;
    text-align: center;
    font-size: 13px;
    font-weight: 900;
}

.schedule-head small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
}

.schedule-head.today {
    color: #1b1122;
    background: #fff1f5;
}

.schedule-time {
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 900;
}

.schedule-shift {
    min-height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.22;
}

.schedule-shift.rest {
    color: #94a3b8;
}

.schedule-shift.blank {
    background: #fff;
}

.schedule-image-card {
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    padding: 16px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.08));
    box-shadow: var(--lg-shadow);
}

.schedule-image-card button {
    width: 100%;
    border: 0;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    background: rgba(255,255,255,.1);
}

.schedule-image-card img {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    background: rgba(255,255,255,.08);
}

.schedule-image-card p,
.schedule-empty-image span,
.schedule-upload-box p {
    color: var(--lg-muted);
}

.schedule-empty-image {
    min-height: 220px;
    border: 1px dashed rgba(255,255,255,.24);
    border-radius: 20px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
}

.schedule-empty-image strong {
    display: block;
    color: #fff;
    font-size: 20px;
}

.schedule-form {
    display: grid;
    gap: 16px;
}

.schedule-week-field,
.schedule-upload-box label {
    display: grid;
    gap: 7px;
    color: rgba(255,255,255,.82);
    font-weight: 800;
}

.schedule-week-field input,
.schedule-upload-box input,
.schedule-edit-grid select {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    padding: 11px 12px;
    color: #fff;
    background: rgba(255,255,255,.1);
    outline: none;
}

.schedule-edit-grid {
    display: grid;
    grid-template-columns: 90px repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
}

.schedule-edit-head,
.schedule-edit-day {
    color: rgba(255,255,255,.72);
    font-size: 13px;
    font-weight: 900;
}

.schedule-edit-day {
    display: grid;
    gap: 2px;
}

.schedule-edit-day span {
    color: rgba(255,255,255,.42);
    font-size: 11px;
}

.schedule-select-label {
    min-width: 0;
}

.schedule-upload-box {
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    padding: 14px;
    background: rgba(255,255,255,.07);
}

.schedule-remove-image {
    margin-top: 12px;
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px;
}

.schedule-remove-image input {
    width: auto;
}

.modern-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 999;
    width: min(720px, calc(100% - 24px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    padding: 8px;
    background: rgba(17, 22, 45, .76);
    box-shadow: var(--lg-shadow);
    backdrop-filter: blur(22px);
}

.modern-bottom-nav a {
    display: grid;
    place-items: center;
    min-height: 48px;
    border-radius: 18px;
    color: var(--lg-muted);
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
}

.modern-bottom-nav a.active,
.modern-bottom-nav a:hover {
    color: #1b1122;
    background: linear-gradient(135deg, var(--lg-gold), var(--lg-pink));
}

.modern-player {
    position: fixed;
    right: 18px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    z-index: 998;
    width: min(360px, calc(100% - 36px));
    border: 1px solid var(--lg-line);
    border-radius: 22px;
    padding: 12px;
    color: #fff;
    background: rgba(17, 22, 45, .78);
    box-shadow: var(--lg-shadow);
    backdrop-filter: blur(22px);
}

.player-main {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 10px;
    align-items: center;
}

.player-cover {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--lg-pink), var(--lg-blue));
}

.player-title {
    margin: 0;
    font-weight: 800;
}

.player-artist {
    color: var(--lg-muted);
    font-size: 12px;
}

.player-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #1b1122;
    background: linear-gradient(135deg, var(--lg-gold), var(--lg-pink));
}

.player-actions {
    display: flex;
    gap: 6px;
}

.player-progress {
    width: 100%;
    height: 5px;
    margin-top: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    overflow: hidden;
}

.player-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--lg-pink), var(--lg-gold));
}

.player-list {
    display: none;
    margin-top: 10px;
    border-top: 1px solid var(--lg-line);
    padding-top: 8px;
    max-height: 180px;
    overflow: auto;
}

.modern-player.open .player-list {
    display: grid;
    gap: 6px;
}

.player-list button {
    border: 0;
    border-radius: 12px;
    padding: 8px;
    color: #fff;
    background: rgba(255,255,255,.08);
    text-align: left;
}

.music-consent {
    position: fixed;
    inset: auto 18px calc(178px + env(safe-area-inset-bottom)) auto;
    z-index: 1000;
    max-width: min(420px, calc(100% - 36px));
    border: 1px solid var(--lg-line);
    border-radius: 24px;
    padding: 18px;
    color: #fff;
    background: rgba(17, 22, 45, .88);
    box-shadow: var(--lg-shadow);
    backdrop-filter: blur(22px);
}

.music-consent h3 {
    margin: 0 0 8px;
    color: #fff;
}

.music-consent p {
    color: var(--lg-muted);
}

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

.music-consent button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
}

.music-consent .yes {
    color: #1b1122;
    background: linear-gradient(135deg, var(--lg-gold), var(--lg-pink));
}

.music-consent .no {
    color: #fff;
    background: rgba(255,255,255,.12);
}

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

@keyframes lgFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 860px) {
    .modern-page {
        width: calc(100% - 22px);
        padding-top: 20px;
        padding-bottom: calc(158px + env(safe-area-inset-bottom));
    }
    .modern-hero,
    .stat-grid,
    .preview-grid,
    .love-day-grid,
    .trail-grid,
    .modern-form-grid {
        grid-template-columns: 1fr;
    }
    .modern-title {
        font-size: 42px;
        line-height: 1.08;
    }
    .modern-subtitle {
        font-size: 18px;
        line-height: 1.7;
    }
    .modern-form-card,
    .order-card,
    .preview-card,
    .trail-card,
    .album-post-body {
        width: 100%;
        max-width: 100%;
        border-radius: 18px;
        padding: 12px;
    }
    .modern-section {
        margin-top: 30px;
    }
    .section-head {
        margin-bottom: 12px;
    }
    .section-head h2 {
        font-size: 28px;
        line-height: 1.22;
    }
    .section-head p {
        margin-top: 4px;
        line-height: 1.55;
    }
    .preview-card {
        min-height: auto;
        padding: 14px;
    }
    .preview-card h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    .preview-card p {
        font-size: 13px;
        line-height: 1.55;
    }
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stat-card {
        padding: 14px;
    }
    .stat-link {
        min-height: 72px;
    }
    .stat-card b {
        font-size: 26px;
    }
    .record-feed {
        gap: 10px;
    }
    .record-main {
        min-height: 116px;
        grid-template-columns: 50px minmax(0, 1fr) auto 16px;
        gap: 10px;
        border-radius: 18px;
        padding: 12px 48px 12px 12px;
    }
    .record-date {
        width: 48px;
        min-width: 48px;
        border-radius: 14px;
    }
    .record-date strong {
        font-size: 21px;
    }
    .record-copy strong {
        font-size: 16px;
    }
    .record-copy span:last-child {
        font-size: 13px;
        line-height: 1.52;
    }
    .record-thumb {
        width: 58px;
        height: 58px;
        border-radius: 15px;
    }
    .record-menu-toggle {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }
    .record-sheet-panel {
        width: calc(100% - 18px);
        max-height: 84vh;
        border-radius: 22px;
        padding: 18px;
        margin-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    .record-detail-content h2 {
        font-size: 24px;
    }
    .schedule-hero {
        grid-template-columns: 1fr;
        border-radius: 22px;
        padding: 16px;
    }
    .schedule-hero strong {
        font-size: 25px;
    }
    .schedule-week-nav {
        justify-content: stretch;
    }
    .schedule-week-nav a {
        flex: 1;
        text-align: center;
    }
    .schedule-grid {
        grid-template-columns: 44px repeat(7, 84px);
        min-width: 632px;
    }
    .schedule-cell {
        min-height: 58px;
        padding: 5px;
    }
    .schedule-head {
        min-height: 48px;
        font-size: 12px;
    }
    .schedule-time {
        font-size: 12px;
    }
    .schedule-shift {
        min-height: 48px;
        border-radius: 12px;
        font-size: 13px;
    }
    .schedule-edit-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .schedule-edit-head {
        display: none;
    }
    .schedule-edit-day {
        margin-top: 10px;
        border-top: 1px solid rgba(255,255,255,.1);
        padding-top: 12px;
    }
    .schedule-select-label select {
        min-height: 42px;
    }
    .order-head {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .order-card h3 {
        margin: 6px 0;
        font-size: 18px;
        line-height: 1.28;
    }
    .order-card p {
        margin: 4px 0 0;
        font-size: 13px;
        line-height: 1.55;
    }
    .due-box {
        width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 9px 10px;
        border-radius: 14px;
    }
    .timeline {
        grid-template-columns: 1fr;
        margin: 12px 0;
        gap: 8px;
    }
    .timeline li {
        grid-template-columns: 12px 1fr;
        gap: 10px;
    }
    .timeline li > span {
        width: 10px;
        height: 10px;
        margin-top: 5px;
        border-radius: 50%;
    }
    .crud-actions,
    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .crud-actions a,
    .modern-btn {
        width: 100%;
    }
    .section-head .modern-btn.ghost,
    .section-head .crud-actions a {
        width: auto;
    }
    .hero-panel {
        min-height: auto;
    }
    .time-orbit {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-head {
        display: block;
    }
    .section-head .modern-btn {
        margin-top: 10px;
    }
    .todo-form-grid {
        gap: 10px;
    }
    .todo-group {
        border-radius: 20px;
        padding: 8px 12px;
    }
    .todo-item {
        grid-template-columns: 32px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        padding: 11px 0;
    }
    .todo-item:hover {
        margin: 0;
    }
    .todo-swipe.is-open .todo-content {
        transform: translateX(-118px);
    }
    .todo-actions {
        width: 118px;
    }
    .todo-actions a {
        width: 59px;
        font-size: 12px;
    }
    .todo-check {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 13px;
    }
    .album-post {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .album-post-date {
        position: static;
        width: fit-content;
        padding: 8px 12px;
    }
    .album-post-body {
        border-radius: 20px;
        padding: 15px;
    }
    .album-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .album-viewer {
        grid-template-columns: 44px 1fr 44px;
        padding: 12px;
    }
    .album-viewer img {
        max-height: 78vh;
    }
    .modern-bottom-nav {
        border-radius: 20px;
        gap: 2px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        width: calc(100% - 16px);
        grid-template-columns: repeat(7, 1fr);
        padding: 6px;
    }
    .modern-bottom-nav a {
        min-height: 42px;
        font-size: 10px;
        border-radius: 14px;
    }
    .modern-player {
        right: 12px;
        bottom: calc(86px + env(safe-area-inset-bottom));
    }
    .music-consent {
        right: 12px;
        bottom: calc(164px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .modern-page {
        width: calc(100% - 16px);
        padding-top: 14px;
        padding-bottom: calc(150px + env(safe-area-inset-bottom));
    }
    .modern-hero {
        gap: 18px;
    }
    .hero-panel {
        padding: 14px;
    }
    .avatar-pair img {
        width: 72px;
        height: 72px;
        border-radius: 22px;
    }
    .avatar-pair .heart-link {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .time-orbit {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .time-chip {
        padding: 10px;
    }
    .time-chip b {
        font-size: 22px;
    }

    .modern-bottom-nav {
        border-radius: 18px;
        gap: 2px;
        padding: 5px 6px;
        width: calc(100% - 12px);
        bottom: calc(8px + env(safe-area-inset-bottom));
    }
    .modern-bottom-nav a {
        min-height: 38px;
        font-size: 9px;
        border-radius: 13px;
    }

    .modern-form-card {
        border-radius: 18px;
        padding: 12px;
    }
    .modern-form-grid {
        gap: 8px;
    }
    .modern-form-grid input,
    .modern-form-grid textarea,
    .modern-form-grid select {
        padding: 10px 11px;
        border-radius: 12px;
        font-size: 14px;
    }

    .preview-card {
        padding: 12px;
    }
    .preview-card h3 {
        font-size: 15px;
    }
    .preview-card p {
        font-size: 12px;
    }
    .preview-card .meta {
        font-size: 11px;
    }

    .todo-group {
        border-radius: 18px;
        padding: 6px 10px;
    }
    .todo-item {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 8px;
        padding: 10px 0;
    }
    .todo-item:hover {
        margin: 0;
    }
    .todo-item h4 {
        font-size: 14px;
    }
    .todo-check {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 12px;
    }
    .todo-swipe.is-open .todo-content {
        transform: translateX(-108px);
    }
    .todo-actions {
        width: 108px;
    }
    .todo-actions a {
        width: 54px;
        font-size: 11px;
    }

    .section-head h2 {
        font-size: 24px;
    }
    .section-head p {
        font-size: 13px;
    }
    .modern-kicker {
        font-size: 10px;
        padding: 5px 10px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .stat-card {
        padding: 12px;
    }
    .stat-link {
        min-height: 62px;
    }
    .stat-card b {
        font-size: 22px;
    }
    .stat-card span {
        font-size: 12px;
    }
    .record-main {
        min-height: 104px;
        grid-template-columns: 46px minmax(0, 1fr) auto 14px;
        gap: 8px;
        padding: 10px 43px 10px 10px;
    }
    .record-date {
        width: 44px;
        min-width: 44px;
        padding: 6px 4px;
    }
    .record-date strong {
        font-size: 19px;
    }
    .record-date small,
    .record-meta,
    .record-detail-meta {
        font-size: 11px;
    }
    .record-copy strong {
        font-size: 15px;
    }
    .record-copy span:last-child {
        -webkit-line-clamp: 2;
        font-size: 12px;
    }
    .record-thumb {
        width: 50px;
        height: 50px;
        border-radius: 13px;
    }
    .record-chevron {
        font-size: 16px;
    }
    .record-menu {
        right: 8px;
        min-width: 108px;
    }
    .record-menu a,
    .record-menu button {
        min-height: 38px;
        font-size: 13px;
    }
    .record-sheet-panel {
        width: calc(100% - 12px);
        padding: 15px;
        border-radius: 20px;
    }
    .record-detail-content h2 {
        font-size: 21px;
    }
    .record-detail-text {
        font-size: 14px;
        line-height: 1.78;
    }
    .schedule-tabs button {
        min-height: 38px;
        font-size: 13px;
    }
    .schedule-legend {
        gap: 8px;
        font-size: 12px;
    }
    .schedule-board {
        border-radius: 18px;
    }
    .schedule-grid {
        grid-template-columns: 38px repeat(7, 78px);
        min-width: 584px;
    }
    .schedule-cell {
        min-height: 54px;
    }
    .schedule-shift {
        min-height: 44px;
        font-size: 12px;
    }
    .schedule-image-card,
    .schedule-upload-box {
        border-radius: 18px;
        padding: 12px;
    }

    .modern-player {
        right: 8px;
        bottom: calc(74px + env(safe-area-inset-bottom));
        border-radius: 18px;
        padding: 10px;
    }
    .player-cover {
        width: 36px;
        height: 36px;
    }
    .player-btn {
        width: 34px;
        height: 34px;
    }

    .timeline {
        grid-template-columns: 1fr;
    }
    .timeline li {
        grid-template-columns: 10px 1fr;
        gap: 8px;
    }
}
