@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@300;400;500;700&display=swap');

:root{
  --ink:#26171a;
  --card:#372630;
  --card-2:#2b1c22;
  --pink:#eb879c;
  --pink-soft:#ffb6c1;
  --text:#f8ecee;
  --muted:#d3bcc1;
  --line:rgba(255,182,193,.18);
  --r:28px;
}

*,*::before,*::after{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  font-family:'Noto Sans Hebrew',system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.78;
  color:var(--text);
  background-color:var(--ink);
  background-image:
    radial-gradient(900px 520px at 88% -10%, rgba(235,135,156,.24), transparent 62%),
    radial-gradient(720px 480px at 2% 16%, rgba(255,182,193,.12), transparent 66%);
  background-attachment:fixed;
}

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

a{color:var(--pink-soft);text-decoration:none;transition:color .2s ease}
a:hover{color:#fff}

:focus-visible{outline:3px solid var(--pink-soft);outline-offset:3px;border-radius:8px}

.shell{max-width:1120px;margin:0 auto;padding:0 20px}

/* 顶部细条 */
.topbar{
  background:linear-gradient(90deg, rgba(235,135,156,.26), rgba(255,182,193,.06) 70%);
  border-bottom:1px solid var(--line);
}
.slogan{
  margin:0;
  padding:9px 20px;
  max-width:1120px;
  margin:0 auto;
  text-align:center;
  font-size:15px;
  letter-spacing:.08em;
  color:#f2dde1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 品牌行 + 菜单行 */
.masthead{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(38,23,26,.92);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
  box-shadow:0 2px 4px rgba(0,0,0,.35);
}
.masthead-inner{padding:10px 20px 6px}

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

.logo{display:inline-flex;align-items:center;gap:11px;min-height:44px;padding:4px 0;color:var(--text)}
.logo:hover{color:#fff}
.logo .mark{
  display:grid;
  place-items:center;
  width:40px;height:40px;
  border-radius:14px;
  background:linear-gradient(150deg,var(--pink),var(--pink-soft));
  color:#3a1620;
  font-weight:700;
  font-size:19px;
  line-height:1;
  box-shadow:0 2px 4px rgba(0,0,0,.42), 0 14px 26px -16px rgba(235,135,156,.95);
}
.logo .brand{font-size:20px;font-weight:500;letter-spacing:.16em}

.menu-tag{
  font-size:14px;
  letter-spacing:.3em;
  color:var(--muted);
  padding-right:2px;
}

.menu{margin-top:2px}
.menu-list{display:flex;gap:4px;list-style:none;margin:0;padding:0 0 4px}
.menu-list > li{position:relative}
.menu-list > li > a,
.sub a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 14px;
  border-radius:16px;
  font-size:16px;
  color:#ecd9dd;
  white-space:nowrap;
  transition:background .25s ease, color .25s ease;
}
.menu-list > li > a:hover,
.menu-list > li > a:focus-visible,
.sub a:hover,
.sub a:focus-visible{background:rgba(255,182,193,.16);color:#fff}

.sub{
  position:absolute;
  top:100%;
  left:0;
  margin:6px 0 0;
  padding:10px;
  min-width:190px;
  display:grid;
  gap:2px;
  list-style:none;
  background:#3a2831;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:0 2px 4px rgba(0,0,0,.35), 0 26px 46px -24px #000;
  opacity:0;
  visibility:hidden;
  transform:translateY(-6px);
  transition:opacity .22s ease, transform .22s ease, visibility .22s;
}
.grp:hover .sub,
.grp:focus-within .sub{opacity:1;visibility:visible;transform:none}

/* Hero */
.hero{
  position:relative;
  display:flex;
  align-items:flex-end;
  min-height:45vh;
  max-height:470px;
  overflow:hidden;
  border-bottom:1px solid var(--line);
  background:linear-gradient(200deg,#432c34,#26171a 78%);
}
.hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hero-mask{
  position:absolute;
  inset:0;
  background:
    linear-gradient(to left, rgba(38,23,26,.95) 6%, rgba(38,23,26,.5) 52%, rgba(38,23,26,.92) 98%),
    linear-gradient(to top, rgba(38,23,26,.9), transparent 62%);
}
.hero-inner{position:relative;width:100%;padding-bottom:36px;text-align:right}
.hero h1{
  margin:0;
  font-size:clamp(1.6rem, 4.6vw, 2.7rem);
  font-weight:500;
  line-height:1.36;
  letter-spacing:.02em;
}
.hero h1 span{
  padding-bottom:3px;
  background:linear-gradient(90deg, rgba(235,135,156,.85), rgba(255,182,193,.5)) no-repeat left bottom / 100% 10px;
}

/* 正文区 */
main{padding:34px 0 64px}
.wrap{display:grid;grid-template-columns:250px minmax(0,1fr);gap:30px;align-items:start}

.side{position:sticky;top:142px;display:grid;gap:18px}
.side-card{
  position:relative;
  padding:20px 16px 24px;
  border:1px solid var(--line);
  border-radius:var(--r);
  background:linear-gradient(160deg,#3b2831,var(--card-2));
  box-shadow:0 2px 4px rgba(0,0,0,.36), 0 22px 42px -28px #000;
}
.side-card::after{
  content:"";
  position:absolute;
  left:16px;right:16px;
  bottom:8px;
  height:3px;
  border-radius:3px;
  background:linear-gradient(90deg,var(--pink),rgba(255,182,193,.35),transparent);
}
.side-card h2{
  margin:0 0 12px;
  font-size:16px;
  font-weight:500;
  letter-spacing:.16em;
  color:#f6e0e4;
}
.side-card h2 span{display:inline-block;padding-bottom:6px;background:linear-gradient(90deg,var(--pink),rgba(255,182,193,.08)) no-repeat left bottom / 100% 2px}

.toc{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.toc a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:4px 11px;
  border-radius:14px;
  font-size:16px;
  line-height:1.4;
  color:var(--muted);
  transition:background .25s ease, color .25s ease;
}
.toc a:hover,
.toc a.on,
.toc a:focus-visible{background:rgba(255,182,193,.16);color:#fff}

.body{min-width:0}
.prose{
  position:relative;
  padding:30px 26px 44px;
  border:1px solid var(--line);
  border-radius:var(--r);
  background:linear-gradient(172deg,#382730,#2a1c21 70%);
  box-shadow:0 2px 4px rgba(0,0,0,.4), 0 30px 60px -34px #000;
}
.prose::after{
  content:"";
  position:absolute;
  left:26px;right:26px;
  bottom:14px;
  height:4px;
  border-radius:4px;
  background:linear-gradient(90deg,var(--pink),rgba(255,182,193,.4),transparent);
}

.prose section{padding:6px 0 26px;scroll-margin-top:152px}
.prose [id]{scroll-margin-top:152px}
.prose section + section{border-top:1px solid var(--line);padding-top:34px;margin-top:16px}

.prose h2{
  margin:0 0 14px;
  font-size:clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight:500;
  line-height:1.42;
  color:#fff;
}
.prose h2 span{
  display:inline-block;
  padding-bottom:8px;
  background:linear-gradient(90deg,var(--pink),rgba(255,182,193,.1)) no-repeat left bottom / 100% 3px;
}
.prose h3{
  margin:26px 0 10px;
  font-size:1.1rem;
  font-weight:500;
  color:#fff;
}
.prose h3 span{
  display:inline-block;
  padding-bottom:6px;
  background:linear-gradient(90deg,rgba(235,135,156,.9),transparent) no-repeat left bottom / 100% 2px;
}

.prose p{margin:0 0 16px;color:#f2e3e6}
.prose ul,.prose ol{margin:0 0 18px;padding-left:22px}
.prose li{margin:0 0 8px}
.prose li::marker{color:var(--pink-soft)}
.prose strong{color:#fff;font-weight:500}
.prose blockquote{
  margin:22px 0;
  padding:14px 18px;
  border-left:4px solid var(--pink);
  border-radius:0 18px 18px 0;
  background:rgba(255,182,193,.08);
  color:#f4e4e7;
}
.prose img{border-radius:22px;margin:22px 0;box-shadow:0 2px 4px rgba(0,0,0,.4), 0 24px 44px -28px #000}
.prose figure{margin:22px 0}
.prose figcaption{font-size:16px;color:var(--muted);margin-top:8px}
.prose table{width:100%;border-collapse:collapse;margin:22px 0;font-size:16px}
.prose th,.prose td{border:1px solid var(--line);padding:10px 12px;text-align:left}
.prose th{background:rgba(255,182,193,.1);color:#fff;font-weight:500}
.prose hr{border:0;height:1px;background:var(--line);margin:26px 0}
.prose a{border-bottom:1px solid rgba(255,182,193,.45)}
.prose a:hover{border-bottom-color:#fff}

/* 页脚 */
footer{
  border-top:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,182,193,.07), transparent 78%);
  padding:26px 0 30px;
}
.foot-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.foot-brand{display:inline-flex;align-items:center;gap:10px;min-height:44px;color:var(--text);font-size:17px;letter-spacing:.12em}
.foot-brand:hover{color:#fff}
.foot-brand .mark{
  display:grid;place-items:center;
  width:34px;height:34px;
  border-radius:12px;
  background:linear-gradient(150deg,var(--pink),var(--pink-soft));
  color:#3a1620;font-weight:700;font-size:16px;line-height:1;
}
.foot-nav ol{list-style:none;display:flex;flex-wrap:wrap;gap:2px;margin:0;padding:0}
.foot-nav a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 11px;
  border-radius:13px;
  font-size:16px;
  color:var(--muted);
}
.foot-nav a:hover,
.foot-nav a:focus-visible{background:rgba(255,182,193,.16);color:#fff}
.foot-copy{margin:0;font-size:16px;color:var(--muted);letter-spacing:.06em}

/* 回到顶部 */
.to-top{
  position:fixed;
  right:16px;bottom:16px;
  z-index:60;
  min-height:46px;
  padding:0 20px;
  font-family:inherit;
  font-size:16px;
  color:var(--text);
  background:#3c2932;
  border:1px solid var(--line);
  border-radius:999px;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  transform:translateY(10px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s ease, background .25s ease;
  box-shadow:0 2px 4px rgba(0,0,0,.45), 0 18px 32px -20px #000;
}
.to-top:hover{background:#4a333d;color:#fff}
.to-top.show{opacity:1;visibility:visible;transform:none}

/* 入场 */
.reveal{opacity:0;transform:translateY(16px);transition:opacity .3s ease, transform .3s ease}
.reveal.in{opacity:1;transform:none}

@media (max-width:960px){
  .wrap{grid-template-columns:216px minmax(0,1fr);gap:22px}
}

@media (max-width:720px){
  body{font-size:16px}
  .slogan{font-size:14px;padding:8px 14px}
  .masthead-inner{padding:8px 14px 4px}
  .shell{padding:0 14px}
  .menu-list{gap:0;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .menu-list::-webkit-scrollbar{display:none}
  .grp,.sub{display:contents}
  .menu-list > li > a,
  .sub a{padding:0 12px;border-radius:14px}
  .hero{min-height:46vh;max-height:none}
  .hero-inner{padding-bottom:26px}
  main{padding:24px 0 48px}
  .wrap{grid-template-columns:1fr;gap:18px}
  .side{position:static;order:2;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
  .side-card{padding:16px 13px 20px;border-radius:22px}
  .side-card::after{left:13px;right:13px}
  .toc a{font-size:16px;min-height:40px;padding:4px 9px}
  .prose{padding:22px 16px 38px;border-radius:22px}
  .prose::after{left:16px;right:16px;height:3px}
  .prose section,.prose [id]{scroll-margin-top:132px}
  .foot-row{justify-content:space-between;gap:10px}
  .foot-copy{font-size:15px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition-duration:.01ms !important;animation-duration:.01ms !important}
  .reveal{opacity:1;transform:none}
}

button[aria-expanded]{min-width:44px;min-height:44px}
