:root {
  --paper: #f5f0e6;
  --paper-2: #ebe3d5;
  --surface: #fffdf8;
  --surface-2: #f8f4ec;
  --ink: #19211d;
  --muted: #657068;
  --line: #dcd4c7;
  --green: #194b38;
  --green-2: #246b4f;
  --sage: #b9c9b5;
  --orange: #d66a3a;
  --gold: #d7ae60;
  --danger: #a23b32;
  --shadow: 0 24px 70px rgba(40, 51, 44, .10);
  --shadow-soft: 0 10px 30px rgba(40, 51, 44, .07);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 5%, rgba(215, 174, 96, .18), transparent 24rem),
    radial-gradient(circle at 5% 45%, rgba(185, 201, 181, .24), transparent 28rem),
    var(--paper);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(220, 212, 199, .85);
  background: rgba(245, 240, 230, .88);
  backdrop-filter: blur(18px);
}
.nav-shell { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50% 50% 44% 56%;
  color: #fff; font: 24px/1 "DM Serif Display", serif; background: var(--green); transform: rotate(-4deg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy b { font-size: 16px; letter-spacing: .06em; }
.brand-copy i { color: var(--orange); font-style: normal; padding: 0 2px; }
.brand-copy small { color: var(--muted); margin-top: 4px; font-size: 11px; letter-spacing: .22em; }
.site-nav { display: flex; align-items: center; gap: 5px; }
.site-nav > a { color: #455148; font-size: 14px; font-weight: 600; padding: 10px 13px; border-radius: 999px; }
.site-nav > a:hover, .site-nav > a.active { background: rgba(255,255,255,.7); color: var(--green); }
.user-box { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.menu-button { display: none; }

.btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  font-weight: 700; font-size: 14px; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--green); color: white; box-shadow: 0 9px 20px rgba(25, 75, 56, .18); }
.btn-primary:hover { background: var(--green-2); }
.btn-light { background: var(--surface); border-color: var(--line); }
.btn-light:hover { box-shadow: var(--shadow-soft); }
.btn-orange { background: var(--orange); color: white; }
.btn-danger { background: #fff4f1; border-color: #ebc4bd; color: var(--danger); }
.btn-small { min-height: 36px; padding: 7px 13px; font-size: 12px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.hero { padding: 76px 0 48px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: 66px; }
.kicker { color: var(--orange); font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1, .display-title {
  font-family: "DM Serif Display", "Noto Serif SC", serif; font-weight: 400; letter-spacing: -.035em;
}
.hero h1 { max-width: 700px; margin: 16px 0 22px; font-size: clamp(48px, 6.6vw, 84px); line-height: 1.04; }
.hero h1 em { color: var(--green); font-style: normal; position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 4%; right: 0; bottom: -3px; height: 8px; border-radius: 50%; background: var(--gold); opacity: .65; transform: rotate(-1deg); z-index: -1; }
.hero-copy > p { max-width: 620px; color: var(--muted); font-size: 18px; }
.hero-copy .button-row { margin-top: 30px; }
.micro-proof { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 34px; color: var(--muted); font-size: 13px; }
.micro-proof span::before { content: "✓"; color: var(--green-2); font-weight: 800; margin-right: 7px; }
.hero-collage { min-height: 520px; position: relative; }
.hero-orbit { position: absolute; inset: 12% 4% 6%; border: 1px solid rgba(25,75,56,.18); border-radius: 50%; transform: rotate(-8deg); }
.portrait-card { position: absolute; overflow: hidden; border: 8px solid var(--surface); box-shadow: var(--shadow); background: var(--sage); }
.portrait-card img { width: 100%; height: 100%; object-fit: cover; }
.portrait-card.main { width: 58%; height: 72%; left: 17%; top: 5%; border-radius: 46% 46% 20px 20px; }
.portrait-card.small { width: 36%; height: 43%; right: 0; bottom: 2%; border-radius: 50% 50% 18px 18px; }
.portrait-card.mini { width: 28%; height: 34%; left: 0; bottom: 5%; border-radius: 18px 18px 50% 50%; }
.hero-note { position: absolute; right: 2%; top: 3%; width: 154px; padding: 15px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); transform: rotate(4deg); font-size: 12px; }
.hero-note b { display: block; color: var(--green); font-size: 22px; }

.section { padding: 62px 0; }
.section-tint { background: rgba(255, 253, 248, .55); border-block: 1px solid rgba(220, 212, 199, .7); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.section-head h1, .section-head h2 { margin: 4px 0 0; font-family: "DM Serif Display", "Noto Serif SC", serif; font-size: clamp(34px, 5vw, 52px); font-weight: 400; line-height: 1.15; }
.section-head p { color: var(--muted); max-width: 540px; margin: 0; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.service-card { min-height: 184px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,248,.75); transition: .2s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); background: var(--surface); }
.service-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--green); background: #e4ece2; font: 16px "DM Serif Display", serif; }
.service-card h3 { margin: 18px 0 8px; font-size: 17px; }
.service-card p { margin: 0; color: var(--muted); font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; background: var(--line); }
.step { padding: 32px; background: var(--surface); }
.step strong { font: 36px "DM Serif Display", serif; color: var(--orange); }
.step h3 { margin: 14px 0 6px; }
.step p { margin: 0; color: var(--muted); }
.cta-band { padding: 46px; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; color: white; background: var(--green); border-radius: 34px; overflow: hidden; position: relative; }
.cta-band::after { content: "藤"; position: absolute; right: 22%; top: -75px; font: 190px "DM Serif Display", serif; color: rgba(255,255,255,.04); transform: rotate(-10deg); }
.cta-band h2 { position: relative; margin: 0 0 8px; font: 40px "DM Serif Display", serif; }
.cta-band p { position: relative; color: rgba(255,255,255,.72); margin: 0; }
.cta-band .btn { position: relative; background: #fff; color: var(--green); }

.filter-bar { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; padding: 12px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,248,.78); }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; color: #3f4b43; }
.input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface);
  padding: 12px 14px; outline: none; transition: border .15s, box-shadow .15s;
}
.input:focus, select:focus, textarea:focus { border-color: #7ba08b; box-shadow: 0 0 0 4px rgba(36, 107, 79, .10); }
textarea { min-height: 120px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.full { grid-column: 1 / -1; }
.help { color: var(--muted); font-size: 12px; margin: 0; }
.form-error { padding: 10px 12px; border-radius: 12px; color: var(--danger); background: #fff1ee; font-size: 13px; }

.mentor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mentor-card { display: flex; min-height: 410px; flex-direction: column; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.6); transition: .2s ease; }
.mentor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.mentor-photo { height: 210px; overflow: hidden; position: relative; background: linear-gradient(140deg, #d9e2d7, #bdcdbd); }
.mentor-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.mentor-card:hover .mentor-photo img { transform: scale(1.025); }
.avatar-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: white; background: linear-gradient(140deg, var(--green), #6f927d); font: 66px "DM Serif Display", serif; }
.price-badge { position: absolute; right: 13px; bottom: 13px; padding: 7px 11px; border-radius: 999px; background: rgba(255,253,248,.94); font-weight: 800; font-size: 12px; }
.mentor-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.mentor-body h3 { margin: 0; font-size: 20px; }
.mentor-school { color: var(--green); font-weight: 600; font-size: 13px; }
.mentor-major { color: var(--muted); font-size: 13px; }
.mentor-intro { color: var(--muted); font-size: 13px; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.tag { padding: 5px 9px; border-radius: 999px; background: #edf1e9; color: #496052; font-size: 11px; font-weight: 600; }
.empty-state { padding: 52px 24px; grid-column: 1 / -1; border: 1px dashed #bdb5a8; border-radius: 24px; text-align: center; color: var(--muted); background: rgba(255,253,248,.5); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.profile-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.profile-card { overflow: hidden; }
.profile-hero { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 28px; background: linear-gradient(135deg, #f8f4ea, #edf3ea); }
.profile-image { height: 300px; border-radius: 24px; overflow: hidden; background: var(--sage); }
.profile-image img { width: 100%; height: 100%; object-fit: cover; }
.profile-title h1 { margin: 12px 0 3px; font: 42px "DM Serif Display", "Noto Serif SC", serif; }
.profile-title p { margin: 2px 0; color: var(--muted); }
.profile-content { padding: 28px; }
.profile-content h2 { margin-top: 0; font-size: 20px; }
.question-list { margin: 0; padding-left: 20px; color: var(--muted); }
.question-list li { margin-bottom: 10px; }
.panel { padding: 22px; }
.sticky-panel { position: sticky; top: 100px; }
.price-line { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 18px; }
.price-line strong { color: var(--green); font: 34px "DM Serif Display", serif; }
.price-line span { color: var(--muted); font-size: 13px; }
.fee-box { padding: 12px; border-radius: 13px; background: var(--surface-2); color: var(--muted); font-size: 12px; }

.auth-wrap { min-height: 670px; padding: 70px 0; display: grid; place-items: center; }
.auth-card { width: min(920px, calc(100% - 40px)); display: grid; grid-template-columns: .82fr 1.18fr; overflow: hidden; border-radius: 30px; background: var(--surface); box-shadow: var(--shadow); }
.auth-aside { padding: 42px; color: white; background: var(--green); position: relative; overflow: hidden; }
.auth-aside::after { content: "藤"; position: absolute; right: -20px; bottom: -90px; font: 210px "DM Serif Display", serif; color: rgba(255,255,255,.06); transform: rotate(-8deg); }
.auth-aside h1 { position: relative; margin: 14px 0; font: 42px/1.15 "DM Serif Display", serif; }
.auth-aside p, .demo-box { position: relative; color: rgba(255,255,255,.72); }
.demo-box { margin-top: 32px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.09); font-size: 12px; }
.auth-main { padding: 40px; }
.auth-tabs { display: flex; gap: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.auth-tab { padding: 0 1px 12px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font-weight: 700; }
.auth-tab.active { color: var(--green); border-color: var(--green); }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.dashboard-grid { display: grid; grid-template-columns: 250px 1fr; gap: 22px; }
.account-card { position: sticky; top: 100px; }
.account-avatar { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font: 24px "DM Serif Display", serif; }
.account-card h3 { margin: 12px 0 0; }
.account-card p { margin: 0; color: var(--muted); font-size: 13px; }
.account-links { display: grid; gap: 5px; margin-top: 20px; }
.account-links a { padding: 9px 10px; border-radius: 10px; color: var(--muted); font-size: 13px; }
.account-links a:hover { background: var(--surface-2); color: var(--green); }
.booking-list { display: grid; gap: 12px; }
.booking-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.booking-card h3 { margin: 0 0 5px; font-size: 17px; }
.booking-meta { color: var(--muted); font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending_confirmation, .status-awaiting_payment, .status-completion_pending { color: #8c5b18; background: #fff2d8; }
.status-confirmed, .status-in_service { color: #176044; background: #e4f2e9; }
.status-completed, .status-approved { color: #315e78; background: #e6f0f5; }
.status-declined, .status-cancelled, .status-rejected { color: #963c34; background: #f9e6e2; }
.status-support_required { color: #6f4985; background: #f0e7f5; }
.status-pending { color: #8c5b18; background: #fff2d8; }

.booking-detail { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.timeline { display: grid; gap: 0; margin-top: 18px; }
.timeline-item { position: relative; padding: 0 0 22px 28px; }
.timeline-item::before { content: ""; position: absolute; left: 7px; top: 16px; bottom: -2px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 2px; top: 6px; width: 11px; height: 11px; border: 2px solid var(--surface); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline-item b { display: block; font-size: 13px; }
.timeline-item span { color: var(--muted); font-size: 11px; }
.messages { max-height: 420px; display: flex; flex-direction: column; gap: 10px; overflow: auto; padding: 4px; }
.message { max-width: 78%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); }
.message.mine { align-self: end; border-radius: 14px 14px 4px 14px; color: white; background: var(--green); }
.message b { display: block; font-size: 10px; opacity: .68; }
.message p { margin: 2px 0 0; font-size: 13px; white-space: pre-wrap; }
.message-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.message-form .input { min-width: 0; }
.qr-wrap { width: 280px; max-width: 100%; margin: 14px auto; padding: 10px; border-radius: 18px; background: white; }
.qr-wrap svg { display: block; width: 100%; height: auto; }

.admin-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.admin-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { color: var(--muted); background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.admin-tab { border: 1px solid var(--line); padding: 8px 13px; border-radius: 999px; background: var(--surface); cursor: pointer; }
.admin-tab.active { color: white; border-color: var(--green); background: var(--green); }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.check-card { display: flex; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.check-card input { margin-top: 5px; }
.check-card b { display: block; font-size: 13px; }
.check-card small { display: block; color: var(--muted); }

.notice { padding: 12px 14px; border: 1px solid #d9cfba; border-radius: 13px; color: #6e5a37; background: #fff8e9; font-size: 13px; }
.notice.success { border-color: #b9d8c5; color: var(--green); background: #edf7f0; }
.space-top { margin-top: 18px; }
.space-bottom { margin-bottom: 18px; }
.toast-root { position: fixed; z-index: 60; right: 18px; top: 92px; display: grid; gap: 9px; width: min(360px, calc(100% - 36px)); }
.toast { padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); animation: toast-in .2s ease; font-size: 13px; }
.toast.error { color: var(--danger); border-color: #e6bdb7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
.loading-screen { min-height: 520px; display: grid; place-items: center; align-content: center; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid #d7d1c7; border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { min-height: 180px; overflow: hidden; border-radius: 20px; background: linear-gradient(100deg, #ebe6dc 30%, #f6f2ea 50%, #ebe6dc 70%); background-size: 300% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

.site-footer { margin-top: 70px; padding: 50px 0 20px; color: #d6dfd9; background: #14261e; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; }
.footer-grid > div { display: grid; align-content: start; gap: 8px; }
.footer-grid a, .footer-grid span, .footer-grid p { color: #8fa197; font-size: 13px; margin: 0; }
.footer-brand { font: 28px "DM Serif Display", serif; color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); color: #789087; font-size: 11px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-collage { min-height: 440px; width: min(620px, 100%); margin: 0 auto; }
  .service-grid, .mentor-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid, .booking-detail { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .profile-hero { grid-template-columns: 210px 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .account-card { position: static; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1180px); }
  .nav-shell { min-height: 68px; flex-wrap: wrap; }
  .menu-button { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: var(--surface); }
  .site-nav { display: none; width: 100%; padding: 4px 0 14px; align-items: stretch; flex-direction: column; }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 10px; }
  .user-box { margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: clamp(43px, 14vw, 62px); }
  .hero-copy > p { font-size: 16px; }
  .hero-collage { min-height: 360px; }
  .section { padding: 44px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .service-grid, .mentor-grid, .steps { grid-template-columns: 1fr; }
  .filter-bar, .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .steps { gap: 1px; }
  .cta-band { padding: 30px; grid-template-columns: 1fr; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-aside { padding: 28px; }
  .auth-main { padding: 28px; }
  .profile-hero { grid-template-columns: 1fr; }
  .profile-image { height: 360px; }
  .booking-card { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
