/* --- 释放 / 一句话写在星空下 --- */
#lesson.release-write {
  width:min(540px,100% - 24px);
  background:radial-gradient(ellipse at 50% 39%,#153940,transparent 70%),linear-gradient(165deg,#081421,#0c232d);
}
.release-write #horizon { height:clamp(100px,20dvh,174px); object-fit:cover; object-position:center 32%; }
.release-write.reading #horizon { height:clamp(76px,13dvh,120px); }
.release-write #lesson-topic { display:none; }
.release-write #read-method { margin:0; display:inline-flex; align-items:center; gap:7px; color:#f2dbac; }
.release-write #read-method::before {
  content:''; width:12px; height:14px; border:1px solid currentColor; border-radius:3px;
  background:linear-gradient(currentColor 0 0) 50% 35% / 6px 1px no-repeat,
    linear-gradient(currentColor 0 0) 50% 62% / 6px 1px no-repeat;
}
#release-title { margin:12px 0; color:#fff5da; font:400 clamp(23px,5vw,29px)/1.45 var(--serif); outline:none; }
#release-method p { margin:10px 0 0; line-height:1.85; }
#release-method aside { margin-top:20px; padding-top:18px; }
.release-write #method footer { background:linear-gradient(transparent,#0c232d 22%); }
.release-write .lesson-copy { padding:0 clamp(21px,6vw,42px) 34px; margin-top:-35px; text-align:center; }
.release-write #lesson-title { margin:clamp(18px,4vh,36px) 0 0; font-size:clamp(22px,5.8vw,28px); }
.release-write #practice-guide {
  color:#afc9c6; font-size:14px; line-height:1.85; white-space:pre-line; margin:10px auto 0;
}
.release-write .writing { position:relative; margin:clamp(18px,4vh,34px) auto 0; width:94%; padding-bottom:11px; }
.release-write .writing::after {
  content:''; position:absolute; left:0; right:0; bottom:0; height:1px;
  background:linear-gradient(90deg,transparent,#aaccc854 18%,#dcf8e8a6 50%,#aaccc854 82%,transparent);
}
.release-write .writing:focus-within::after { background:linear-gradient(90deg,transparent,#ffe7af 50%,transparent); }
.release-write #practice-input {
  padding:5px 0; text-align:center; overflow-wrap:anywhere; resize:none; overflow-y:auto; max-height:6.5em;
  font:400 clamp(17px,4.8vw,21px)/1.75 var(--serif); letter-spacing:.04em; text-wrap:balance;
  border:none; box-shadow:none; background:transparent; border-radius:0; caret-color:#ffdf9b;
}
.release-write #practice-input::placeholder { font-size:clamp(15px,4vw,17px); color:#afc9c6; letter-spacing:.025em; }
.release-write .practice-actions { justify-content:center; margin:clamp(32px,6dvh,52px) auto 0; }
.release-write #advance { min-width:140px; margin:0; font-size:15px; letter-spacing:.09em; min-height:47px; }
.release-write #advance:disabled { background:#b8d9d61c; color:#a2bdbd; }
.release-write #advance:enabled { box-shadow:0 0 34px #efda9c1c; }
@media(max-height:500px) {
  .release-write #horizon { height:78px; }
  .release-write .lesson-copy { margin-top:-25px; padding-bottom:16px; }
  .release-write #lesson-title,.release-write .writing,.release-write .practice-actions { margin-top:12px; }
}
/* --- 释放 / 字与星体一起消散 --- */
#lesson.release-stage {
  width:min(540px,100% - 24px); background:radial-gradient(ellipse at 50% 54%,#12323c,transparent 67%),
    linear-gradient(160deg,#081421,#0b1e29 60%,#0a2027); border-color:#c9eee530;
}
.release-stage #horizon { display:none; }
.release-stage .lesson-copy { margin:0; padding:27px 0 13px; text-align:center; }
.release-stage .lesson-meta { justify-content:center; }
.release-stage #lesson-topic { color:#b6d7d6; letter-spacing:.25em; }
.release-stage #lesson-topic::before,.release-stage #lesson-topic::after {
  content:''; width:34px; height:1px; background:linear-gradient(90deg,#b1e2db75,transparent);
}
.release-stage #lesson-topic::before { transform:rotate(180deg); }
.release-stage #lesson-title {
  position:absolute; width:1px; height:1px; margin:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
#letting-go {
  --orb:clamp(162px,min(55vw,29dvh),232px);
  position:relative; height:calc(var(--orb) * 1.82 + 64px);
  display:grid; place-items:center; padding:24px 0 40px; isolation:isolate;
}
#release-cue {
  position:absolute; top:12px; inset-inline:10px; color:#edf6ee;
  font:400 clamp(17px,4.8vw,21px)/1.6 var(--serif); letter-spacing:.05em;
  text-shadow:0 0 18px #bcffed47; text-wrap:balance; pointer-events:none;
}
#dust { position:absolute; width:100%; height:calc(100% + 96px); top:-68px; left:0; pointer-events:none; z-index:-1; }
#release-orb {
  position:relative; width:var(--orb); height:var(--orb); padding:0; border-radius:50%;
  touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none;
}
#release-orb:focus-visible { outline:1px dashed #ecf3e7; outline-offset:7px; }
#hold-tip { position:absolute; bottom:7px; color:#c5dddb; font-size:15px; line-height:1.8; letter-spacing:.06em; }
.release-stage .practice-actions { justify-content:center; margin-top:5px; }
.release-stage #previous { font-size:13px; color:#9dbab9; transition:opacity .35s; }
.release-stage #previous:disabled { opacity:0; }
#letting-go[data-phase="ready"] #hold-tip { color:#ffe8b6; }
@media(prefers-reduced-motion:no-preference) {
  [data-phase="hold"] #release-cue { opacity:var(--light); transform:translateY(calc((1 - var(--light)) * 6px)); }
  [data-phase="ready"] #release-cue { color:#fff2cf; animation:quiet-return 1s ease-out both; }
  [data-phase="drift"] #release-cue { animation:drift-words 5s ease-in-out forwards; }
  .release-rest .lesson-copy { animation:quiet-return 1.25s ease-out both; }
  .release-rest .practice-actions { animation:quiet-return .85s .8s ease-out both; }
}
@keyframes quiet-return { from { opacity:0; transform:translateY(5px); } }
@media(max-height:620px) {
  .release-stage .lesson-copy { padding:16px 0 5px; }
  #letting-go { --orb:clamp(156px,32dvh,184px); height:calc(var(--orb) * 1.68 + 54px); padding-bottom:30px; }
  #release-cue { top:5px; font-size:16px; }
  #hold-tip { bottom:0; font-size:13px; }
  .release-stage .practice-actions { margin-top:0; }
  .release-stage .lesson-meta { min-height:25px; }
}
/* --- 换算 / 课堂示范与自己的话分别阅读 --- */
#scenes { display:flex; gap:clamp(10px,4vw,24px); border-bottom:1px solid #c9dcd329; margin-top:10px; }
#scenes button { color:#b2c8c8; margin-bottom:-1px; border-bottom:1px solid transparent; }
#scenes button[aria-pressed=true] { color:#fae1a7; border-color:currentColor; }
#method li { margin-bottom:13px; }
#method #scene-event { color:#e0e6e0; }
#method aside { padding-top:12px; }
.conversion #practice-note { white-space:pre-wrap; margin:15px 0 3px; max-height:6.6em; }
.conversion #sample p { white-space:pre-line; }
.conversion #sample summary { font-size:13px; color:#b7cecc; padding-block:12px; }
.conversion .writing { margin-top:0; }
.conversion #lesson-topic { letter-spacing:.07em; }
.conversion #lesson-topic::after { width:18px; }
.conversion.reviewing #horizon { height:clamp(70px,11dvh,115px); }
.conversion.reviewing #reflection { position:relative; margin:18px 0 16px 3px; }
.conversion.reviewing #reflection button { position:relative; padding:0 0 14px 21px; border:0; color:#e3ede9; line-height:1.6; font-size:16px; }
.conversion.reviewing #reflection button:last-child { padding-bottom:0; color:#ffe7b1; }
.conversion.reviewing #reflection button::before { content:''; position:absolute; top:8px; left:-3px; width:7px; height:7px; border-radius:50%; background:#92b6b6; }
.conversion.reviewing #reflection button:not(:last-child)::after { content:''; position:absolute; left:0; width:1px; top:15px; bottom:-8px; background:#a1c4bf50; }
.conversion.reviewing #reflection button:last-child::before { background:#ffe4a5; box-shadow:0 0 10px #ffe4a58c; }
.conversion.reviewing #reflection small { font-size:12px; line-height:1.7; margin-bottom:2px; }
#resonance { border-top:1px solid #dde5d529; padding-top:14px; }
#resonance h3 { font:400 18px/1.5 var(--serif); color:#fff4d8; margin:0 0 6px; }
#resonance div { display:flex; gap:20px; }
#resonance button { font-size:14px; color:#c1d6d4; padding:0; min-height:44px; }
#resonance button[aria-pressed=true], #resonance #revise { color:#ffe4a6; }
#resonance div button::before { content:'○'; margin-right:6px; }
#resonance div button[aria-pressed=true]::before { content:'●'; }
#resonance #afterthought { margin:0; font-size:14px; line-height:1.8; }
@media (max-width:540px) {
  #method #scenes button { font-size:13px; }
  .conversion.reviewing #reflection button { font-size:15px; padding-bottom:11px; }
  .conversion.reviewing #reflection button:last-child { padding-bottom:0; }
  #resonance h3 { font-size:17px; }
  #resonance div { gap:14px; }
  #resonance button { font-size:13px; }
}
/* --- 换算知识卡 / 同一份感受，两种身份认定 --- */
#method #example-heading { margin:21px 0 0; font-size:16px; color:#ede5d3; }
#method #scenes { margin-top:3px; }
#method #scene-thought { color:#eedab6; }
#method #scene-paths p { margin-top:10px; padding-left:13px; border-left:1px solid #dbc8a355; }
#method #method-qa { margin-top:21px; }
#method #qa-heading { color:#ebd5a7; margin:6px 0; }
#method #method-qa p { margin-top:10px; }
#method button:focus-visible { outline-color:#f1d39f; }
@media(max-width:545px) {
  #method #example-heading { font-size:15px; }
  #method li { margin-bottom:0; }
  #method .method-kicker { letter-spacing:.06em; }
  #method .method-kicker span::before { width:14px; margin:0 7px; }
}

/* --- 修行日记 / 一页可续写的信纸 --- */
#diary {
  --margin:clamp(25px,5.5vw,54px);
  background:#faf8f0; color:#34574f; border:none; padding:0; width:min(700px,100% - 32px);
  max-width:none; height:min(705px,92dvh); max-height:calc(100dvh - 24px);
  overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; border-radius:25px;
  box-shadow:0 32px 110px #04171780,0 0 0 1px #fff8e655;
}
#diary[open] { display:flex; flex-direction:column; }
#diary::backdrop { background:#06151cc4; backdrop-filter:blur(9px); }
#diary button { min-height:42px; padding:0; font-size:14px; transition:color .2s,background .2s; }
#diary button:hover:not(:disabled) { color:#142e25; }
.diary-head { position:relative; isolation:isolate; flex:none; height:clamp(148px,24dvh,202px); }
.diary-landscape,.diary-head::after { position:absolute; z-index:-1; inset:0; width:100%; height:100%; }
.diary-head::after { content:''; background:linear-gradient(90deg,#faf8f0fa,#faf8f0d1 31%,#faf8f000 68%); }
.diary-bar { display:flex; align-items:center; padding:18px 19px 0 var(--margin); gap:10px; }
#diary-title { margin-right:auto; color:#365b4d; font:500 19px/1.5 var(--serif); letter-spacing:.08em; }
#diary .diary-bar button { display:flex; align-items:center; gap:6px; justify-content:center; border-radius:24px; background:#fffff777; backdrop-filter:blur(10px); font-size:13px; min-height:38px; }
#diary .diary-bar button:hover { background:#fffff7c4; }
#diary .diary-bar svg,#diary-browse svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linejoin:round; stroke-linecap:round; }
#diary #diary-inspire { padding:0 15px; }
#diary #diary-browse { flex:none; display:inline-flex; align-items:center; gap:6px; color:#3b634f; font-size:13px; }
#diary #diary-browse:hover { color:#17392b; }
#diary-close { width:38px; }
.diary-date { position:absolute; left:var(--margin); bottom:21%; display:flex; gap:19px; align-items:baseline; }
.diary-date strong { font:400 clamp(33px,5vw,46px)/1.25 var(--serif); letter-spacing:.04em; color:#254d42; }
.diary-date span { font-size:13px; color:#4e695f; letter-spacing:.06em; }
#diary-content { flex:1; display:flex; flex-direction:column; min-height:0; padding:0 var(--margin); }
.diary-idea { display:flex; flex:none; align-items:flex-start; gap:12px; margin:4px 0 19px; }
#diary .diary-idea button { color:#657f6b; font:300 20px/1 system-ui; min-height:34px; min-width:34px; border-radius:50%; margin-right:-8px; }
#diary .diary-idea button:hover { background:#5574590c; }
#diary .diary-question,.diary-source,.diary-pages h3 { margin:0; color:#2c4e41; font:400 clamp(20px,3.2vw,24px)/1.6 var(--serif); text-wrap:pretty; }
#diary .diary-question { flex:1; }
.diary-source { margin:0 0 12px; font-size:18px; }
.diary-paper {
  --leading:38px; display:block; flex:1; width:100%; min-height:calc(3 * var(--leading)); padding:0;
  background:repeating-linear-gradient(transparent 0 calc(var(--leading) - 1px),#48655524 calc(var(--leading) - 1px) var(--leading)) local;
  outline:none; border:0; border-radius:0; resize:none; color:#324a41; caret-color:#265c48;
  font:400 18px/var(--leading) var(--serif); letter-spacing:.035em; scrollbar-width:thin; scrollbar-color:#79948955 transparent;
}
.diary-paper::placeholder { color:#778479; }
.diary-paper:focus-visible { outline:none; }
.diary-footer { flex:none; display:flex; align-items:center; gap:12px; justify-content:space-between; padding:12px var(--margin) 19px; }
.diary-footer small,.diary-meta small { color:#68776c; font-size:12px; line-height:1.65; }
#diary .diary-start { border-radius:30px; background:#305c4d; color:#fffdf0; padding:0 25px; min-height:45px; letter-spacing:.07em; flex:none; }
#diary .diary-start:hover:not(:disabled) { background:#234939; color:white; }

#diary-status:not(:empty) { padding:10px var(--margin) 19px; color:#46694e; background:#f1f1e5; font-size:13px; }
.diary-pages { overflow:auto; outline:none; scrollbar-width:thin; scrollbar-color:#79948955 transparent; padding-bottom:12px; margin-bottom:0; }
.diary-pages article { border-bottom:1px solid #47685929; padding:5px 0 23px; margin-bottom:12px; }
.diary-meta { display:flex; align-items:center; gap:18px; }
.diary-meta small { margin-right:auto; }
#diary .diary-meta button { font-size:13px; color:#526f65; flex:none; }
#diary .diary-meta .diary-danger { color:#913e32; }
.diary-pages article h3 { margin:3px 0 8px; font-size:19px; }
.diary-pages p { font:400 17px/1.95 var(--serif); color:#364f46; margin:0 0 12px; white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:600px) {
  #diary { width:calc(100% - 20px); --margin:clamp(17px,5.7vw,27px); height:min(740px,94dvh); border-radius:21px; }
  .diary-head { height:clamp(155px,23dvh,175px); }
  .diary-bar { padding:12px 12px 0 var(--margin); gap:7px; }
  #diary-title { font-size:clamp(14px,4.25vw,17px); letter-spacing:.035em; text-wrap:balance; }
  #diary .diary-bar button { flex:none; }
  .diary-head::after { background:linear-gradient(90deg,#faf8f0f0,#faf8f0b0 32%,transparent 67%); }
  .diary-date { flex-direction:column; gap:6px; bottom:18%; }
  .diary-date span { font-size:12px; }
  #diary .diary-question { font-size:clamp(18px,5.25vw,21px); }
  .diary-paper { font-size:17px; --leading:35px; }
  .diary-footer { padding:10px var(--margin) max(13px,env(safe-area-inset-bottom)); }
  #diary .diary-start { padding:0 18px; }
  .diary-meta { gap:11px; }
}
@media(max-width:359px) {
  #diary #diary-inspire { padding-inline:10px; }
  #diary #diary-inspire svg { display:none; }
  .diary-bar { gap:4px; }
}
@media(max-height:540px) {
  .diary-head { height:65px; }
  .diary-date { display:none; }
  #diary-content { flex:auto; }
  #diary .diary-question { font-size:18px; }
  .diary-pages { overflow:visible; }
  .diary-footer { padding-block:6px; }
}
@media(prefers-reduced-motion:no-preference) {
  #diary[open] { animation:unfold .38s var(--ease); }
  @keyframes unfold { from { opacity:0; transform:translateY(12px) scale(.98); } }
}

/* --- 松手后，在原来的位置留下空白，再浮出远星 --- */
#lesson.release-rest,#past-sky {
  width:min(540px,100% - 24px); color:#e2ece6; text-align:center;
  background:radial-gradient(ellipse at 70% 28%,#173a49,transparent 63%),
    radial-gradient(ellipse at 13% 76%,#1c4145,transparent 61%),#091725;
}
.release-rest #horizon { display:none; }
.release-rest .lesson-copy {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  min-height:min(var(--rest-height),90dvh); padding:28px clamp(18px,6vw,42px) 22px; margin:0;
}
.release-rest .lesson-meta { width:100%; padding-right:40px; }
.release-rest #lesson-title { margin:auto 0 9px; letter-spacing:.12em; }
.release-rest #lesson-title::before {
  display:block; content:'✦'; margin:16px auto 10px; font:22px/1.4 Georgia,serif;
  color:#fff2c3; text-shadow:0 0 10px #ffefbc,0 0 24px #ffe6a5,0 0 48px #fff0ce;
}
.release-rest #practice-guide { max-width:22em; font-size:15px; text-wrap:balance; white-space:pre-line; }
#past-stars { color:#f2dbac; min-height:44px; font-size:13px; padding:0 3px; }
#past-stars:hover { color:#ffefcc; }
#star-status { color:#e3d7b8; font-size:13px; margin:12px auto 0; }
#star-status:empty { display:none; }
.release-rest .practice-actions { margin:auto auto 12px; padding-top:25px; }
#past-sky {
  border:1px solid #cceee737; border-radius:25px; padding:30px 0 20px; max-height:92dvh;
  box-shadow:0 28px 90px #020d16ba; overflow:auto; color-scheme:dark; scrollbar-width:thin;
}
#past-sky::backdrop { background:#06121cbc; backdrop-filter:blur(9px); }
#past-close { position:absolute; top:8px; right:10px; width:44px; height:44px; font:300 24px system-ui; }
#past-title { margin:4px 0 8px; font:400 28px/1.5 var(--serif); letter-spacing:.14em; color:#fff2d6; }
#past-count { margin:0; font-size:14px; letter-spacing:.04em; color:#bad2d3; }
#star-trail { position:relative; margin:10px auto 4px; width:96%; height:clamp(228px,35dvh,296px); }
#past-dust { position:absolute; inset:0; width:100%; height:100%; mask-image:linear-gradient(transparent,#000 16%,#000 85%,transparent); }
#past-lights button {
  position:absolute; translate:-50% -50%; width:46px; height:46px; padding:0; border-radius:50%;
  color:#d0fbfb; font:18px/1 Georgia,serif; text-shadow:0 0 6px #c4edff,0 0 15px #80e1fb;
  background:radial-gradient(#b2fff638,transparent 65%);
}
#past-lights button::before { content:'✦'; }
#past-lights button:nth-child(3n+1) { color:#fff1bd; font-size:21px; text-shadow:0 0 8px #ffedb8,0 0 20px #fed376; }
#past-lights button[aria-pressed=true],#past-lights button:hover {
  color:#fff7d7; background:radial-gradient(#ffdf9770,transparent 66%); box-shadow:0 0 0 1px #ffebbd6b,0 0 36px #ffe5af38;
}
#past-detail { padding:7px 24px; min-height:154px; }
#past-detail time { color:#ddcda9; font-size:13px; }
#past-detail p { margin:10px auto 0; max-width:20em; font:400 clamp(16px,4.5vw,19px)/1.8 var(--serif); color:#f6f2e4; text-wrap:balance; overflow-wrap:anywhere; }
#past-pages { display:flex; justify-content:space-between; align-items:center; padding-inline:8%; color:#bed2cf; font-size:13px; }
#past-pages button,#past-detail button { padding-inline:12px; font-size:13px; min-height:44px; color:#d2dedc; }
#past-detail button:only-of-type { color:#90abb3; transition:color .2s ease; }
#past-detail button:only-of-type:is(:hover,:focus-visible) { color:#bfd1d4; }
#past-pages button:disabled { opacity:.38; }
#past-sky button:focus-visible { outline:2px solid #ffedbb; }
@media(prefers-reduced-motion:no-preference) {
  #past-sky[open] { animation:quiet-return .5s ease-out both; }
  #past-detail p { animation:quiet-return .18s ease-out both; }
  #past-lights button:not(:hover):not([aria-pressed=true]) { animation:past-shimmer 4.5s ease-in-out infinite alternate; }
}
@keyframes drift-words {
  from { opacity:0; transform:translateY(5px); }
  20%,60% { opacity:1; transform:translateY(0); }
  to { opacity:0; transform:translateY(-4px); }
}
@keyframes past-shimmer { from { opacity:.66; } to { opacity:1; } }
