/* Keep the current header, paper backgrounds and type system. */
.sky-student[hidden], #dse-countdown[hidden] { display:none !important; }
.sky-student {
  --student-ink:var(--learn-ink,#202d48);
  --student-paper:var(--paper,#fffdf8);
  --student-gold:var(--learn-gold,#977539);
  position:relative; display:flex; align-items:center; gap:.6rem; margin-inline-start:auto;
  z-index:12; font-family:inherit; color:var(--student-ink);
}
.sky-student button, .sky-student summary { font:inherit; cursor:pointer; }
.sky-student button:focus-visible, .sky-student summary:focus-visible, .sky-student a:focus-visible {
  outline:2px solid var(--student-gold); outline-offset:3px;
}
.sky-student details summary { list-style:none; display:flex; gap:.45rem; align-items:center; }
.sky-student details summary::-webkit-details-marker { display:none; }
.sky-student svg { width:1.2rem; height:1.2rem; flex:none; }
.sky-student-fire {
  display:inline-flex; gap:.35rem; align-items:center; padding:.32rem .6rem;
  border:1px solid currentColor; border-radius:999px; background:var(--student-paper);
  font-variant-numeric:tabular-nums;
}
.sky-student :is(.sky-student-profile, .sky-student-menu summary) {
  display:grid; place-items:center; box-sizing:border-box;
  width:2.5rem; height:2.5rem; padding:0;
  border:1px solid currentColor; border-radius:50%;
  background:var(--student-paper); color:inherit; text-decoration:none;
}
.sky-student-links {
  position:absolute; top:calc(100% + .45rem); right:0; min-width:13rem; padding:.5rem;
  border:1px solid var(--learn-line,#e2ded4); border-radius:.85rem; background:var(--student-paper);
  box-shadow:0 .7rem 2rem #202d4826; display:grid; gap:.15rem;
}
.sky-student-links a, .sky-student-links button {
  text-align:start; display:block; width:100%; border:0; border-radius:.4rem;
  background:transparent; color:inherit; padding:.45rem .65rem; text-decoration:none;
}
.sky-student-links a:hover, .sky-student-links button:hover { background:#b99a581c; }
.sky-student-identity { display:flex; gap:.55rem; align-items:center; padding:.4rem .65rem; overflow-wrap:anywhere; }
.sky-student-avatar { width:1.7rem; height:1.7rem; object-fit:cover; border-radius:50%; }
.sky-student-avatar[hidden] { display:none; }
.sky-student-dialog {
  width:min(42rem, calc(100% - 1.5rem)); max-height:calc(100dvh - 1.5rem);
  border:1px solid var(--learn-line,#e2ded4); border-radius:1rem; color:var(--learn-ink,#202d48);
  background:var(--paper,#fffdf8); padding:clamp(1rem,4vw,2rem); font:inherit;
}
.sky-student-dialog::backdrop { background:#202d4866; }
.sky-student-dialog h2 { margin:0; }
.sky-student-dialog img { max-width:100%; height:auto; display:block; margin:.5rem auto; }
.sky-student-dialog .sky-task-close { float:right; cursor:pointer; }
.sky-student-dialog fieldset { border:0; margin:.5rem 0; padding:0; }
.sky-student-dialog .actions { display:flex; flex-wrap:wrap; gap:.65rem; align-items:center; }
.sky-student-dialog .sky-task-text { white-space:pre-wrap; }
.sky-student-dialog label { cursor:pointer; }
#dse-countdown { margin-bottom:1rem; font-variant-numeric:tabular-nums; }
body:not([data-sky-profile]) :is(#account-details,#account-security,[data-account-tab=details],[data-account-tab=security]) { display:none; }
body[data-sky-profile] :is(.metric-grid,.sky-explorer,.chapter-progress-panel,[data-account-tab=data],.account-tabs a[href="/profile"]) { display:none; }
body[data-sky-profile] .account-tabs { margin-top:1rem; }
#avatar-form { margin-bottom:1.5rem; }

.sky-avatar-frame { display:inline-grid; place-items:center; width:1.7rem; height:1.7rem; flex:none; }
.sky-avatar-frame > * { grid-area:1 / 1; }
.sky-avatar-covered { visibility:hidden; }
.sky-student-links p:empty { display:none; }

@media (max-width:800px) {
  header.has-sky-student > nav, header.has-sky-student > a:not(.brand):not(.studio-brand) { display:none; }
}

.sky-student-flame { width:1.2rem; height:1.3rem; object-fit:contain; flex:none; }
.sky-student-dialog {
  --task-scene:url('/sky/daily/daily-quest-courtyard.jpg');
  background-image:linear-gradient(#fffdf8ec,#fffdf8 11rem),var(--task-scene);
  background-size:auto,100% auto;
  background-repeat:no-repeat;
}
.sky-student-dialog[data-scene=review] { --task-scene:url('/sky/daily/mistake-review-study.jpg'); }
.sky-student-dialog[data-scene=complete] { --task-scene:url('/sky/daily/quest-complete-skygate.jpg'); }
.sky-student-menu[open] .sky-student-identity {
  background:linear-gradient(90deg,#fffdf8f5,#fffdf8a6),url('/sky/daily/streak-pavilion.jpg') center/cover;
}
body[data-sky-profile] .account-welcome {
  background-image:linear-gradient(90deg,#fffdf8f5,#fffdf899),url('/sky/daily/student-profile-garden.jpg');
  background-position:center;
  background-size:cover;
}

.account-page #status:empty { display:none; }

#avatar-file[hidden], #avatar-note:empty, .sky-avatar-editor p:empty { display:none; }
#avatar-preview .sky-avatar-frame, #avatar-preview img { width:3rem; height:3rem; }
#avatar-preview .sky-avatar-frame { border:1px solid var(--learn-line,#d4e3e5); border-radius:50%; overflow:hidden; }
.sky-avatar-editor canvas { display:block; width:min(12rem,100%); height:auto; border-radius:50%; margin:1rem auto; }
.sky-avatar-editor .actions { margin-top:1rem; }

body:is(.account-page, .study-page) header.page-header.has-sky-student > nav[aria-label="主要導覽"] { display: none; }
