:root {
    --bg: #f3f7f6;
    --surface: #ffffff;
    --surface-soft: #e7f1ef;
    --surface-warm: #fff4ec;
    --ink: #13231f;
    --muted: #61716c;
    --line: #d8e3df;
    --brand: #1e7568;
    --brand-dark: #14564d;
    --accent: #df7a49;
    --accent-soft: #fff0e8;
    --blue: #4a83ad;
    --focus: #72bdb4;
    --shadow: 0 22px 54px rgba(22, 39, 37, 0.14);
    --shadow-soft: 0 12px 30px rgba(22, 39, 37, 0.08);
    --shadow-hover: 0 24px 58px rgba(22, 39, 37, 0.16);
    --radius: 8px;
}

body.dark {
    --bg: #101716;
    --surface: #1a2422;
    --surface-soft: #15221f;
    --surface-warm: #2d221d;
    --ink: #edf6f3;
    --muted: #b5c4c0;
    --line: #33413e;
    --brand: #77cbc1;
    --brand-dark: #9ddfd7;
    --accent: #f1a077;
    --accent-soft: #34251f;
    --blue: #8bb8e0;
    --focus: #f09a76;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.24);
    --shadow-hover: 0 24px 58px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at top right, rgba(223, 122, 73, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(255, 244, 236, 0.8) 0, rgba(243, 247, 246, 0) 360px),
        linear-gradient(90deg, rgba(231, 241, 239, 0.78), rgba(255, 255, 255, 0) 52%),
        var(--bg);
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.75;
    overflow-x: hidden;
}

body.dark {
    background:
        radial-gradient(circle at top right, rgba(241, 160, 119, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(42, 32, 28, 0.7) 0, rgba(16, 23, 22, 0) 360px),
        linear-gradient(90deg, rgba(20, 32, 30, 0.78), rgba(16, 23, 22, 0) 52%),
        var(--bg);
}

body.modal-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.section {
    padding: 82px 0;
}

.page-view[hidden] {
    display: none;
}

.no-top {
    padding-top: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(22, 39, 37, 0.04);
}

body.dark .site-header {
    background: rgba(26, 36, 34, 0.92);
}

body.dark .ghost-btn,
body.dark .hero-stats span,
body.dark .gallery-stats span,
body.dark .tool-panel,
body.dark .site-footer {
    background: rgba(26, 36, 34, 0.82);
}

body.dark .post-card {
    background:
        linear-gradient(180deg, rgba(26, 36, 34, 0.95), var(--surface)),
        var(--surface);
}

body.dark .page-hero {
    background: linear-gradient(180deg, rgba(26, 36, 34, 0.9), rgba(16, 23, 22, 0.56));
}

.header-inner {
    position: relative;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    color: var(--brand-dark);
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;
}

.logo::after {
    content: "";
    display: block;
    width: 34px;
    height: 3px;
    margin-top: -2px;
    border-radius: 999px;
    background: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius);
    padding: 0 14px;
    color: var(--muted);
    font-weight: 700;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    background: var(--surface-soft);
    color: var(--brand-dark);
}

.site-nav a:hover {
    transform: translateY(-1px);
}

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

.admin-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    background: var(--surface);
    color: var(--brand-dark);
    font-weight: 900;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--brand-dark);
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
}

.icon-btn:hover {
    transform: translateY(-2px);
    border-color: var(--brand);
    background: var(--surface-soft);
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-btn {
    display: none;
}

.hero {
    position: relative;
    padding-top: 90px;
    border-bottom: 1px solid rgba(213, 223, 220, 0.7);
}

.hero::after {
    content: "";
    position: absolute;
    top: 72px;
    right: -120px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(74, 131, 173, 0.12);
    filter: blur(4px);
    pointer-events: none;
}

.hero-grid {
    min-height: calc(100vh - 168px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
    align-items: center;
    gap: 56px;
}

.eyebrow,
.section-title p {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

.hero-text h1,
.page-title h1 {
    margin: 0;
    max-width: 780px;
    font-size: 52px;
    line-height: 1.14;
    color: var(--ink);
}

.hero-text h1 {
    max-width: 720px;
}

.lead,
.page-title p,
.hero-text p:not(.eyebrow),
.profile-card p,
.feature-card p,
.timeline p,
.snapshot p,
.note-panel p,
.day-card p {
    color: var(--muted);
    font-size: 17px;
}

.lead,
.hero-text p:not(.eyebrow) {
    max-width: 620px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 0 20px;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(22, 39, 37, 0.08);
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.primary-btn {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #ffffff;
}

.primary-btn:hover {
    background: var(--brand-dark);
}

.ghost-btn {
    border-color: var(--brand);
    background: rgba(255, 255, 255, 0.52);
    color: var(--brand-dark);
}

.ghost-btn:hover {
    background: var(--surface-soft);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-stats span,
.gallery-stats span {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    box-shadow: var(--shadow-soft);
}

.hero-stats strong,
.gallery-stats strong {
    color: var(--brand-dark);
    font-size: 22px;
}

.hero-card,
.feature-card,
.profile-card,
.skill-card,
.tool-panel,
.post-card,
.photo-card,
.message-box,
.timeline article,
.note-panel,
.snapshot,
.day-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.hero-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    box-shadow: var(--shadow);
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(14, 32, 29, 0.2));
}

.hero-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hero-card img,
.post-cover,
.photo-card img,
.snapshot img,
.profile-card img {
    filter: saturate(0.96) contrast(1.02);
}

.hero-card figcaption {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    color: var(--muted);
}

.hero-card strong {
    color: var(--ink);
    font-size: 20px;
}

.page-hero {
    border-bottom: 1px solid rgba(213, 223, 220, 0.68);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 247, 243, 0.56));
}

.section-title,
.page-title {
    max-width: 760px;
    margin-bottom: 34px;
}

.section-title h2,
.page-title h1,
.feature-card h3,
.profile-card h2,
.skill-card h2,
.message-box h2,
.note-panel h2,
.snapshot h2,
.day-card h3 {
    margin: 0 0 12px;
    line-height: 1.25;
}

.section-title h2 {
    font-size: 32px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.feature-card {
    --feature-accent: var(--accent);
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 12px;
    padding: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), var(--surface)),
        var(--surface);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card::before,
.day-card::before {
    content: "";
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: var(--feature-accent, var(--accent));
}

.feature-card:nth-child(2) {
    --feature-accent: var(--brand);
}

.feature-card:nth-child(3) {
    --feature-accent: var(--blue);
}

.feature-card:hover,
.day-card:hover,
.snapshot:hover,
.message-box:hover,
.profile-card:hover,
.skill-card:hover,
.timeline article:hover {
    transform: translateY(-4px);
    border-color: rgba(22, 111, 99, 0.35);
    box-shadow: var(--shadow-hover);
}

.feature-card h3 {
    font-size: 22px;
}

.card-label {
    width: max-content;
    border-radius: var(--radius);
    padding: 2px 9px;
    background: var(--surface-soft);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 900;
}

.mini-list {
    display: grid;
    gap: 6px;
    margin: 2px 0 0;
    padding-left: 20px;
    color: var(--muted);
}

.journal-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 0.8fr);
    gap: 26px;
    align-items: start;
}

.note-panel {
    position: sticky;
    top: 96px;
    padding: 26px;
    background:
        linear-gradient(180deg, var(--surface-warm), var(--surface)),
        var(--surface);
}

.note-list {
    display: grid;
    gap: 14px;
    margin: 22px 0 0;
}

.note-list div {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.note-list dt {
    color: var(--brand-dark);
    font-weight: 900;
}

.note-list dd {
    margin: 4px 0 0;
    color: var(--muted);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.post-card {
    overflow: hidden;
    min-width: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), var(--surface)),
        var(--surface);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.post-card:hover {
    transform: translateY(-6px);
    border-color: var(--brand);
    box-shadow: var(--shadow-hover);
}

.post-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--surface-soft);
    transition: transform 0.35s;
}

.post-card:hover .post-cover {
    transform: scale(1.04);
}

.post-body {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
}

.post-body h3 {
    font-size: 21px;
}

.post-body h3,
.post-body p {
    margin: 0;
}

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

.post-mood {
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 8px 10px;
    background: var(--accent-soft);
    font-size: 14px;
    line-height: 1.65;
}

.tag {
    width: max-content;
    border-radius: var(--radius);
    padding: 4px 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.post-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    color: var(--muted);
    font-size: 14px;
}

.post-info span {
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.soft-section {
    background:
        linear-gradient(180deg, rgba(231, 241, 239, 0.92), rgba(255, 244, 236, 0.52)),
        var(--surface-soft);
}

.page-main {
    min-height: calc(100vh - 145px);
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.snapshot {
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.snapshot img {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    transition: transform 0.35s;
}

.snapshot:hover img {
    transform: scale(1.03);
}

.snapshot div {
    padding: 24px;
}

.about-grid,
.message-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    gap: 24px;
    align-items: start;
}

.about-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.about-photo-card {
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.about-photo-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.about-photo-card figcaption {
    padding: 12px 14px;
    color: var(--muted);
    font-weight: 900;
}

.profile-card {
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.profile-card img {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.profile-card div,
.skill-card,
.message-box {
    padding: 26px;
}

.profile-meta {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.profile-meta span {
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    color: var(--muted);
}

.skill-card {
    display: grid;
    gap: 18px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.habit-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.habit-list li {
    display: grid;
    gap: 4px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.habit-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.habit-list strong {
    color: var(--brand-dark);
}

.habit-list span {
    color: var(--muted);
}

.skill-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
}

.skill-item span {
    font-weight: 900;
}

.skill-item strong {
    color: var(--brand-dark);
}

.bar {
    grid-column: 1 / -1;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--line);
}

.bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--blue), var(--accent));
}

.day-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.day-card {
    display: grid;
    gap: 8px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.day-card time {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--blue);
    font-size: 24px;
    font-weight: 900;
}

.day-card p {
    margin: 0;
}

.timeline {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 18px;
}

.timeline time {
    color: var(--accent);
    font-weight: 900;
}

.timeline article {
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.timeline h3,
.timeline p {
    margin: 0;
}

.tool-panel {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(10px);
}

.filter-box,
.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 14px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #ffffff;
}

.input-row label,
.message-box label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.input-row input,
.input-row select,
.message-box input,
.message-box textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    padding: 11px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-row input:focus,
.input-row select:focus,
.message-box input:focus,
.message-box textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(105, 183, 174, 0.16);
    outline: 0;
}

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

.result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.result-text {
    min-height: 28px;
    margin: 0;
    color: var(--muted);
}

.result-bar span {
    border-radius: var(--radius);
    padding: 4px 10px;
    background: var(--surface-soft);
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 900;
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

.gallery-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.56fr);
    gap: 24px;
    align-items: end;
}

.gallery-stats {
    display: grid;
    gap: 12px;
    margin-bottom: 34px;
}

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

.photo-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    min-width: 0;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.2s, transform 0.2s;
}

.photo-card button {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.3s;
}

.photo-card:nth-child(4n + 2) img {
    aspect-ratio: 3 / 4;
}

.photo-card:nth-child(5n) img {
    aspect-ratio: 16 / 10;
}

.photo-card:hover img {
    transform: scale(1.05);
}

.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.photo-card figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    gap: 4px;
    padding: 44px 14px 14px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
    color: #ffffff;
    pointer-events: none;
}

.photo-card figcaption strong {
    line-height: 1.3;
}

.photo-card figcaption span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.45;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 56px minmax(0, 900px) 56px;
    place-content: center;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(7, 13, 13, 0.88);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-content {
    overflow: hidden;
    margin: 0;
    border-radius: var(--radius);
    background: var(--surface);
}

.lightbox-content img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    background: #0b1212;
}

.lightbox-content figcaption {
    padding: 14px 18px;
    color: var(--ink);
    font-weight: 900;
}

.lightbox-close,
.lightbox-arrow {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    cursor: pointer;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 28px;
}

.lightbox-arrow {
    width: 54px;
    height: 54px;
    font-size: 34px;
}

.message-layout {
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1fr);
}

.message-box form,
.message-list {
    display: grid;
    gap: 14px;
}

.message-box {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.message-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.message-heading h2 {
    margin: 0;
}

.message-heading span {
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 900;
}

.suggestion-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-row button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 10px;
    background: var(--surface-soft);
    color: var(--brand-dark);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.suggestion-row button:hover {
    border-color: var(--brand);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.form-line {
    min-height: 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

#formHint {
    color: var(--accent);
}

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

.message-item {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: linear-gradient(180deg, var(--surface-soft), var(--surface));
}

.message-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.message-item strong {
    color: var(--brand-dark);
}

.message-item time {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.message-item p {
    margin: 0;
    color: var(--muted);
}

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

.message-action-btn {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 11px;
    background: var(--surface);
    color: var(--brand-dark);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.message-action-btn:hover {
    border-color: var(--brand);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.message-action-btn.danger {
    color: #a54a45;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 120;
    min-width: 220px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 14px);
    transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #ffffff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s, transform 0.2s;
}

.back-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
}

.footer-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-inner p {
    margin: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s, transform 0.5s;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 981px) and (max-width: 1180px) {
    .shell {
        width: min(100% - 40px, 1080px);
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
        gap: 38px;
    }

    .hero-text h1,
    .page-title h1 {
        font-size: 46px;
    }

    .photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .journal-grid,
    .gallery-intro {
        grid-template-columns: 1fr;
    }

    .note-panel {
        position: static;
    }

    .gallery-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-bottom: 0;
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .about-grid,
    .message-layout {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        min-height: auto;
    }

    .hero-text h1,
    .page-title h1 {
        font-size: 42px;
    }

    .feature-grid,
    .post-grid,
    .photo-grid,
    .day-grid,
    .snapshot-grid,
    .about-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-card img,
    .profile-card img,
    .snapshot img {
        aspect-ratio: 16 / 9;
    }

    .tool-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .menu-btn {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: grid;
        border: 1px solid var(--line);
        border-top: 0;
        border-radius: 0 0 var(--radius) var(--radius);
        padding: 12px;
        background: var(--surface);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.2s, transform 0.2s;
    }

    .site-nav.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 28px, 1180px);
    }

    .section {
        padding: 48px 0;
    }

    .no-top {
        padding-top: 0;
    }

    .header-inner {
        min-height: 64px;
    }

    .logo {
        font-size: 20px;
    }

    .hero {
        padding-top: 48px;
    }

    .hero-text h1,
    .page-title h1 {
        font-size: 34px;
    }

    .lead,
    .page-title p,
    .hero-text p:not(.eyebrow),
    .profile-card p,
    .feature-card p,
    .timeline p,
    .snapshot p,
    .note-panel p,
    .day-card p {
        font-size: 16px;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .feature-grid,
    .post-grid,
    .photo-grid,
    .input-row,
    .day-grid,
    .snapshot-grid,
    .about-photo-grid,
    .gallery-stats {
        grid-template-columns: 1fr;
    }

    .photo-card img,
    .photo-card:nth-child(4n + 2) img,
    .photo-card:nth-child(5n) img {
        aspect-ratio: 4 / 3;
    }

    .input-row {
        display: grid;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-stats {
        display: grid;
    }

    .hero-card figcaption,
    .result-bar,
    .message-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-body {
        min-height: auto;
    }

    .timeline li {
        grid-template-columns: 1fr;
    }

    .lightbox {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 8px;
        padding: 12px;
    }

    .lightbox-arrow {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 16px 0;
    }
}

@media (max-width: 480px) {
    .shell {
        width: min(100% - 20px, 1180px);
    }

    .hero-text h1,
    .page-title h1 {
        font-size: 30px;
    }

    .header-actions {
        gap: 6px;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
    }

    .feature-card,
    .profile-card div,
    .skill-card,
    .message-box,
    .note-panel,
    .snapshot div,
    .day-card,
    .post-body {
        padding: 18px;
    }

    .photo-card figcaption {
        position: static;
        padding: 12px;
        background: var(--surface);
        color: var(--ink);
    }

    .photo-card figcaption span {
        color: var(--muted);
    }

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

    .lightbox-arrow {
        display: none;
    }
}
