:root {
    --paper: #fffaf0;
    --paper-deep: #f7eddd;
    --ink: #342f2b;
    --muted: #756d64;
    --line: #c7a97f;
    --accent: #d77945;
    --accent-soft: #f3c999;
    --shadow: 0 18px 48px rgba(83, 61, 38, 0.12);
    --radius-lg: 42px;
    --radius-md: 26px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 1200px;
    color: var(--ink);
    background: #d8d2c9;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 20px;
    line-height: 2;
}

body[data-page="hometown"] {
    --accent: #c94e3f;
    --accent-soft: #b8d8dd;
    --line: #739ba0;
}

body[data-page="food"] {
    --accent: #d65d32;
    --accent-soft: #f3bd6d;
    --line: #c57e47;
}

body[data-page="dorm"] {
    --accent: #bd6e76;
    --accent-soft: #e9b8c2;
    --line: #a97d85;
}

body[data-page="idol"] {
    --accent: #a94b3d;
    --accent-soft: #d9a68d;
    --line: #8d6257;
}

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

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

button {
    font: inherit;
}

.site-shell {
    position: relative;
    display: flex;
    width: 1200px;
    min-height: 7200px;
    margin: 0 auto;
    overflow: hidden;
    flex-direction: column;
    background:
        radial-gradient(circle at 16% 8%, rgba(232, 188, 132, 0.16), transparent 20%),
        radial-gradient(circle at 86% 33%, rgba(197, 151, 104, 0.12), transparent 17%),
        linear-gradient(90deg, rgba(101, 72, 43, 0.025) 1px, transparent 1px),
        var(--paper);
    background-size: auto, auto, 42px 42px, auto;
    box-shadow: 0 0 55px rgba(37, 30, 23, 0.18);
}

.site-header {
    position: relative;
    z-index: 20;
    display: flex;
    height: 122px;
    padding: 0 76px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(122, 93, 59, 0.18);
    background: rgba(255, 250, 240, 0.94);
}

.brand {
    display: flex;
    width: 142px;
    height: 78px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 35px;
    font-style: italic;
    letter-spacing: 2px;
    transform: rotate(-4deg);
}

.brand::after {
    position: absolute;
    width: 154px;
    height: 58px;
    content: "";
    border: 1px solid var(--line);
    border-radius: 50%;
    transform: rotate(8deg);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 54px;
}

.main-nav a {
    position: relative;
    padding: 12px 2px;
    font-family: KaiTi, STKaiti, serif;
    font-size: 25px;
    letter-spacing: 2px;
}

.main-nav a::after {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    height: 3px;
    content: "";
    background: var(--accent);
    transform: scaleX(0) rotate(-1deg);
    transform-origin: left;
    transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1) rotate(-1deg);
}

.main-nav a.active {
    color: var(--accent);
}

.page-main {
    flex: 1;
}

.hero {
    position: relative;
    display: grid;
    width: 1040px;
    min-height: 890px;
    margin: 0 auto;
    padding: 110px 20px 80px;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 70px;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 22px;
    align-items: center;
    gap: 14px;
    color: var(--accent);
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 48px;
    height: 2px;
    content: "";
    background: var(--accent);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: KaiTi, STKaiti, "Microsoft YaHei", serif;
    font-weight: 700;
}

h1 {
    max-width: 640px;
    margin-bottom: 20px;
    font-size: 74px;
    line-height: 1.24;
    letter-spacing: 4px;
}

.hero-en {
    margin-bottom: 34px;
    color: var(--muted);
    font-family: Georgia, serif;
    font-size: 28px;
    font-style: italic;
    line-height: 1.4;
}

.hero-lead {
    max-width: 540px;
    margin-bottom: 0;
    color: #595149;
    font-size: 21px;
    line-height: 2;
}

.hero-visual {
    position: relative;
    min-height: 610px;
}

.hero-photo {
    position: absolute;
    top: 52px;
    right: 18px;
    width: 450px;
    height: 530px;
    object-fit: cover;
    border: 15px solid #fff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    transform: rotate(2.5deg);
}

.hero-photo.secondary {
    top: 332px;
    right: 338px;
    width: 230px;
    height: 250px;
    border-width: 10px;
    transform: rotate(-6deg);
}

.tape {
    position: absolute;
    z-index: 4;
    width: 116px;
    height: 34px;
    background: rgba(233, 187, 113, 0.72);
    clip-path: polygon(4% 10%, 98% 0, 94% 92%, 0 100%);
    transform: rotate(-8deg);
}

.hero-visual .tape {
    top: 36px;
    right: 155px;
}

.scribble {
    position: absolute;
    z-index: 1;
    border: 3px solid var(--line);
    border-radius: 50%;
    opacity: 0.65;
}

.scribble.one {
    top: 86px;
    right: -20px;
    width: 510px;
    height: 470px;
    transform: rotate(-9deg);
}

.scribble.two {
    top: 115px;
    right: 14px;
    width: 485px;
    height: 488px;
    border-style: dashed;
    transform: rotate(6deg);
}

.hero-note {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    display: flex;
    height: 88px;
    padding: 0 36px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--line);
    border-radius: 45% 55% 48% 52% / 55% 45% 55% 45%;
    background: rgba(255, 244, 220, 0.9);
    font-family: KaiTi, STKaiti, serif;
    font-size: 24px;
    letter-spacing: 2px;
}

.content-section {
    position: relative;
    width: 1040px;
    min-height: 920px;
    margin: 0 auto;
    padding: 130px 40px;
}

.content-section.compact {
    min-height: 760px;
}

.section-kicker {
    margin-bottom: 10px;
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.section-title {
    margin-bottom: 54px;
    font-size: 50px;
    line-height: 1.35;
    letter-spacing: 4px;
}

.section-title.center,
.section-kicker.center {
    text-align: center;
}

.section-title.center::after {
    display: block;
    width: 130px;
    height: 4px;
    margin: 24px auto 0;
    content: "";
    border-radius: 50%;
    background: var(--accent);
    transform: rotate(-1deg);
}

.paper-card {
    position: relative;
    padding: 54px 58px;
    border: 2px solid rgba(130, 96, 60, 0.34);
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 247, 0.92);
    box-shadow: var(--shadow);
}

.paper-card::before {
    position: absolute;
    top: -18px;
    left: 58px;
    width: 110px;
    height: 34px;
    content: "";
    background: rgba(232, 184, 109, 0.58);
    transform: rotate(-4deg);
}

.text-block p {
    margin-bottom: 0;
    color: #514a43;
    line-height: 2;
}

.text-block p + p {
    margin-top: 2em;
}

.intro-grid,
.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 70px;
}

.feature-row.reverse .feature-image {
    order: 2;
}

.feature-image {
    position: relative;
}

.feature-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border: 14px solid #fff;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.feature-image::after {
    position: absolute;
    right: -24px;
    bottom: -28px;
    width: 84%;
    height: 86%;
    content: "";
    border: 2px solid var(--line);
    border-radius: 45% 55% 48% 52%;
    transform: rotate(3deg);
    z-index: -1;
}

.feature-copy h2,
.feature-copy h3 {
    margin-bottom: 26px;
    font-size: 43px;
    line-height: 1.4;
}

.feature-number {
    display: flex;
    width: 64px;
    height: 64px;
    margin-bottom: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 25px;
    font-style: italic;
}

.tag-list {
    display: flex;
    margin-top: 42px;
    flex-wrap: wrap;
    gap: 16px;
}

.tag {
    padding: 8px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #675b51;
    background: rgba(255, 250, 240, 0.86);
    font-size: 16px;
    letter-spacing: 1px;
}

.profile-card {
    display: grid;
    padding: 60px;
    grid-template-columns: 240px 1fr;
    gap: 60px;
}

.profile-mark {
    display: flex;
    width: 220px;
    height: 220px;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--ink);
    border-radius: 50% 46% 52% 48%;
    color: var(--accent);
    background: var(--accent-soft);
    font-family: Georgia, serif;
    font-size: 58px;
    font-style: italic;
    transform: rotate(-5deg);
}

.info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 36px;
}

.info-list div {
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(89, 71, 50, 0.32);
}

.info-list strong {
    display: inline-block;
    min-width: 92px;
    color: var(--accent);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 38px;
}

.entry-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 220ms ease;
}

.entry-card:hover {
    transform: translateY(-8px) rotate(-0.5deg);
}

.entry-card img {
    width: 100%;
    height: 330px;
    object-fit: cover;
}

.entry-card-body {
    padding: 34px 38px 42px;
}

.entry-card h3 {
    margin-bottom: 14px;
    font-size: 32px;
}

.entry-card p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 18px;
}

.link-card {
    min-height: 590px;
}

.link-card .card-arrow {
    display: inline-flex;
    margin-top: 28px;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    font-weight: 700;
}

.timeline {
    position: relative;
    display: grid;
    padding-left: 95px;
    gap: 46px;
}

.timeline::before {
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 30px;
    width: 3px;
    content: "";
    background: var(--line);
}

.timeline-item {
    position: relative;
    padding: 36px 44px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
}

.timeline-item::before {
    position: absolute;
    top: 48px;
    left: -78px;
    width: 22px;
    height: 22px;
    content: "";
    border: 7px solid var(--paper);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--line);
}

.timeline-item h3 {
    margin-bottom: 12px;
    font-size: 29px;
}

.quote-section {
    display: flex;
    min-height: 650px;
    padding: 120px 110px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.quote-mark {
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 110px;
    line-height: 0.7;
}

.quote-text {
    max-width: 760px;
    margin: 22px auto 0;
    font-family: KaiTi, STKaiti, serif;
    font-size: 34px;
    line-height: 1.9;
}

.roommate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.roommate-card {
    padding: 16px 16px 34px;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

.roommate-card:nth-child(2n) {
    transform: translateY(38px) rotate(1deg);
}

.roommate-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 18px;
}

.roommate-card h3 {
    margin: 22px 18px 8px;
    font-size: 28px;
}

.roommate-card p {
    margin: 0 18px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
}

.food-card img {
    height: 390px;
}

.food-index {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
}

.flavor-board {
    display: grid;
    padding: 62px;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.flavor-item {
    padding: 40px 28px;
    border: 1px dashed var(--line);
    border-radius: 50%;
    text-align: center;
}

.flavor-item strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-family: KaiTi, STKaiti, serif;
    font-size: 30px;
}

.mosaic {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    grid-template-rows: 310px 310px;
    gap: 22px;
}

.mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 10px solid #fff;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.mosaic img:first-child {
    grid-row: 1 / 3;
}

.idol-polaroids {
    position: relative;
    min-height: 620px;
}

.idol-polaroids img {
    position: absolute;
    width: 330px;
    height: 430px;
    object-fit: cover;
    border: 14px solid #fff;
    border-bottom-width: 58px;
    box-shadow: var(--shadow);
}

.idol-polaroids img:nth-child(1) {
    top: 60px;
    left: 30px;
    transform: rotate(-7deg);
}

.idol-polaroids img:nth-child(2) {
    top: 8px;
    left: 330px;
    transform: rotate(3deg);
}

.idol-polaroids img:nth-child(3) {
    top: 100px;
    right: 10px;
    transform: rotate(8deg);
}

.site-footer {
    position: relative;
    display: grid;
    min-height: 330px;
    padding: 68px 92px;
    grid-template-columns: 1fr auto;
    align-items: end;
    border-top: 2px dashed rgba(111, 82, 52, 0.32);
    background: rgba(249, 237, 218, 0.76);
}

.footer-title {
    margin-bottom: 16px;
    font-family: KaiTi, STKaiti, serif;
    font-size: 34px;
}

.footer-text {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 17px;
}

.footer-meta {
    text-align: right;
    color: var(--muted);
    font-size: 16px;
}

.back-to-top {
    position: fixed;
    z-index: 50;
    right: calc((100vw - 1200px) / 2 + 34px);
    bottom: 38px;
    display: flex;
    width: 58px;
    height: 58px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 8px 24px rgba(80, 48, 29, 0.2);
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

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

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.doodle-star,
.doodle-heart,
.doodle-leaf {
    position: absolute;
    color: var(--accent);
    font-family: Georgia, serif;
    opacity: 0.56;
    pointer-events: none;
}

body[data-page="home"] .content-section {
    min-height: 820px;
    padding-top: 95px;
    padding-bottom: 95px;
}

body[data-page="home"] .link-card {
    min-height: 500px;
}

body[data-page="home"] .link-card img {
    height: 270px;
}

body[data-page="home"] .quote-section {
    min-height: 560px;
}

body[data-page="food"] .content-section {
    min-height: 820px;
    padding-top: 80px;
    padding-bottom: 80px;
}

body[data-page="food"] .quote-section {
    min-height: 560px;
}

.doodle-star {
    font-size: 54px;
}

.doodle-heart {
    font-size: 45px;
    transform: rotate(-10deg);
}

.doodle-leaf {
    width: 46px;
    height: 76px;
    border: 3px solid var(--line);
    border-radius: 100% 0 100% 0;
    transform: rotate(28deg);
}

.at-left {
    top: 80px;
    left: -8px;
}

.at-right {
    right: 0;
    bottom: 86px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal,
    .entry-card,
    .back-to-top {
        transition: none;
    }
}
