/* Painted frame is art only. All text, controls and progress remain live HTML. */
#system-screen[data-system="tasks"] { padding:8px; }
#system-screen[data-system="tasks"] .system-window {
  position:relative; box-sizing:border-box; width:min(1240px,100%); max-height:calc(100dvh - 16px);
  padding:110px 82px 72px; border:0; border-radius:32px;
  background:radial-gradient(ellipse at 50% 20%,#fff8e7,#f3dfb6 76%,#d7ad6e);
  box-shadow:0 16px 70px #091629c9; overflow:visible;
}
#system-screen[data-system="tasks"] .system-window::before {
  content:''; position:absolute; inset:0; height:auto; width:auto; z-index:4; border:0; border-radius:0;
  background:url('assets/quests/story-frame-v1.png') center / 100% 100% no-repeat;
  pointer-events:none; opacity:1; transform:none;
}
#system-screen[data-system="tasks"] .system-window>header { position:relative; padding:0 40px 6px; text-align:center; }
#system-screen[data-system="tasks"] #system-title { margin:0; font:700 clamp(24px,3vw,36px)/1.1 Georgia,serif !important; color:#743719; text-shadow:0 1px #fff; }
#system-screen[data-system="tasks"] #system-copy { font-size:12px; margin:5px 0 0; color:#7b532e; }
#system-screen[data-system="tasks"] #system-content { padding:0 5px 7px; min-height:0; overflow:auto; scrollbar-width:thin; }
#system-screen[data-system="tasks"] #system-close { position:absolute; z-index:6; top:32px; right:32px; width:38px; height:38px; border:2px solid #ffe49b; border-radius:50%; background:linear-gradient(#cba353,#87551b); color:#fff4cd; box-shadow:0 2px 5px #3e271e88; }
.qv-root { color:#674022; }
.qv-tabs { justify-content:center; gap:9px; margin:6px 0 12px; }
.qv-tab { min-height:34px; border:2px solid #c9964b; border-radius:24px; padding:6px 19px; font:700 14px Georgia,serif; box-shadow:inset 0 1px #fff4cf,0 2px 3px #8b542e55; }
.qv-tab[aria-current="page"] { color:#fff6d6; border-color:#edc45e; background:linear-gradient(#5f9137,#1e5f32 65%,#17492c); box-shadow:inset 0 1px #cdf197,0 0 0 1px #9b702f; }
.qv-overview { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:5px 13px; align-items:center; padding:8px 22px; margin:0;
  border:2px solid #c79448; border-radius:28px; background:linear-gradient(#fff4c4,#e9c16e 58%,#fce6aa); box-shadow:inset 0 2px #fff9d9,0 2px 3px #a6783944; }
.qv-overview strong { font:700 27px Georgia,serif; color:#713d1d; }
.qv-overview>span { font:700 15px Georgia,serif; }
.qv-overview b { margin-left:auto; padding:4px 15px; border-radius:18px; color:#fff7d8; background:linear-gradient(#4a7c31,#245d30); font-size:13px; }
.qv-story-lead { display:flex; gap:10px; align-items:baseline; padding:9px 8px 0; }
.qv-story-lead strong { flex:none; font:700 15px Georgia,serif; color:#764822; }
.qv-story-lead p { margin:0; font:11px/1.4 Arial,sans-serif; color:#856849; }
.qv-instructions { margin:5px 8px 8px; font:600 11px/1.4 Arial,sans-serif; color:#7a5634; }
.qv-period-note { font-size:11px; padding:5px 8px; margin:0 0 6px; background:#fff4d5; border-radius:6px; }
.qv-list-shell { gap:6px; grid-template-columns:30px minmax(0,1fr) 30px; }
.qv-scroll { width:30px; height:40px; border-radius:50%; align-self:center; border:2px solid #f5ce70; color:#fff5cd; background:linear-gradient(#d1a548,#93601f); box-shadow:0 2px 4px #6e402977; }
.qv-carousel { gap:10px; padding:4px 3px 8px; scroll-snap-type:x mandatory; scrollbar-width:thin; }
.qv-card { position:relative; flex-basis:clamp(164px,15vw,192px); min-height:230px; padding:9px 10px; border:2px solid #c79548; border-radius:20px;
  background:radial-gradient(ellipse at 50% 15%,#fffdf3,#fff2d5 65%,#f0d4a2); box-shadow:inset 0 0 0 2px #fff5d9,0 3px 3px #7a4a2744; }
.qv-card::before { content:''; position:absolute; inset:4px; pointer-events:none; border:1px solid #d9b36c; border-radius:15px; }
.qv-card.is-complete { border-color:#93a34c; background:radial-gradient(ellipse at 50% 15%,#fcffe9,#e5edb9); }
.qv-card-art { height:64px; margin-bottom:2px; }
.qv-card.is-complete .qv-card-art { animation:qv-thank .55s ease-out; }
.qv-card h3 { margin:5px 0; min-height:36px; display:grid; place-items:center; font:700 17px/1.08 Georgia,serif !important; color:#693d21; }
.qv-card .qv-character-line { min-height:0; margin:0 0 7px; font:italic 10px/1.35 Georgia,serif; color:#92754e; }
.qv-card .qv-condition { min-height:36px; margin:0 0 8px; font:12px/1.35 Arial,sans-serif; color:#6d4a2c; }
.qv-card-progress { position:relative; margin-top:auto; }
.qv-card-progress .qv-meter { height:19px; border:1px solid #bf8e48; box-shadow:inset 0 2px 3px #92602d66,0 1px #fff; background:linear-gradient(#ba935d,#efd5a7); }
.qv-card-progress>span { position:absolute; top:1px; left:0; right:0; font:700 12px/17px Arial,sans-serif; color:#6b3e1f; }
.qv-card-progress .qv-meter i { background:linear-gradient(#cbe986,#619a36 60%,#316832); }
.qv-card.is-complete .qv-card-progress>span { color:#fff8d7; text-shadow:0 1px #405f25; }
.qv-gift-progress { display:block; font-size:10px; margin-top:4px; }
.qv-go { position:relative; border:1px solid #bb812f; border-radius:22px; margin-top:9px; padding:6px; font:700 15px Georgia,serif; background:linear-gradient(#fff4bc,#efc254 50%,#cf9630); box-shadow:inset 0 1px #fff8d8,0 2px 2px #95622c55; }
.qv-card.is-complete .qv-go { color:#fff9d7; border-color:#7e9c48; background:linear-gradient(#88b657,#377635); }
.qv-footer { position:sticky; z-index:3; bottom:0; margin-top:9px; gap:6px; padding:7px 0 3px; background:linear-gradient(#f6e7cacc,#f4e2bf 22%); }
.qv-claim { min-height:42px; width:min(440px,100%); border:2px solid #bd8a39; border-radius:28px; color:#663819; font:700 19px Georgia,serif; background:linear-gradient(#fff7c9,#f3ca59 50%,#d79d30); box-shadow:inset 0 2px #fff7ca,0 3px 3px #98683255; }
.qv-countdown { color:#72522f; font:600 12px Arial,sans-serif; }
.qv-celebration { position:fixed; z-index:90000; inset:0; pointer-events:none; overflow:hidden; }
.qv-celebration i { position:absolute; left:calc(12% + var(--i)*7%); top:50%; font-size:28px; color:#ffdb67; text-shadow:0 0 12px #fff3ad; animation:qv-spark 1.4s ease-out forwards; animation-delay:calc(var(--i)*.025s); }
@keyframes qv-spark { from { opacity:0; transform:translateY(60px) scale(.3); } 25% { opacity:1; } to { opacity:0; transform:translateY(-180px) scale(1.2) rotate(80deg); } }
@keyframes qv-thank { 40% { transform:translateY(-5px) rotate(-3deg); } }
@media (max-height:700px) and (min-width:760px) {
 #system-screen[data-system="tasks"] .system-window { padding:90px 72px 66px; }
 #system-screen[data-system="tasks"] #system-title { font-size:25px !important; }
 #system-screen[data-system="tasks"] #system-copy { font-size:10px; }
 .qv-tabs { margin:3px 0 7px; }
 .qv-tab { min-height:29px; padding:4px 13px; font-size:12px; }
 .qv-overview { padding:4px 17px; }
 .qv-overview strong { font-size:22px; }
 .qv-story-lead { display:none; }
 .qv-card { min-height:200px; padding:7px 9px; }
 .qv-card-art { height:44px; }
 .qv-card h3 { font-size:15px !important; min-height:32px; }
 .qv-card .qv-character-line { font-size:9px; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
 .qv-card .qv-condition { font-size:11px; min-height:30px; }
 .qv-go { font-size:13px; padding:5px; margin-top:6px; }
 .qv-claim { min-height:35px; font-size:16px; }
}
@media (max-width:759px), (max-height:500px) {
 #system-screen[data-system="tasks"] .system-window { padding:17px 10px 12px; border:5px solid #97602e; border-radius:19px; overflow:hidden; }
 #system-screen[data-system="tasks"] .system-window::before { display:none; }
 #system-screen[data-system="tasks"] .system-window>header { padding:0 35px 5px 0; text-align:left; }
 #system-screen[data-system="tasks"] #system-title { font-size:23px !important; }
 #system-screen[data-system="tasks"] #system-copy { font-size:11px; }
 #system-screen[data-system="tasks"] #system-close { top:8px; right:8px; width:32px; height:32px; }
 .qv-tabs { justify-content:flex-start; gap:4px; flex-wrap:nowrap; }
 .qv-tab { flex:1 1 0; min-width:0; font-size:11px; padding:5px; border-radius:13px; }
 .qv-overview { padding:5px 11px; gap:3px 7px; border-radius:17px; }
 .qv-overview strong { font-size:22px; }
 .qv-overview>span { font-size:13px; }
 .qv-overview b { font-size:11px; padding:3px 7px; }
 .qv-story-lead { display:block; padding-top:8px; }
 .qv-story-lead p { display:none; }
 .qv-list-shell { grid-template-columns:22px minmax(0,1fr) 22px; gap:1px; }
 .qv-scroll { width:23px; height:33px; font-size:23px; }
 .qv-card { flex-basis:calc(100% - 24px); min-height:245px; padding:9px; }
 .qv-card-art { height:58px; }
 .qv-card h3 { font-size:17px !important; }
 .qv-claim { font-size:16px; min-height:38px; }
}
@media(prefers-reduced-motion:reduce) { .qv-card.is-complete .qv-card-art,.qv-celebration i { animation:none; } }
[data-effects="off"] .qv-card-art { animation:none !important; }
@media(max-width:759px) {
 #system-screen[data-system="tasks"] .system-window { padding-top:39px; }
 #system-screen[data-system="tasks"] .system-window::before { display:block; height:35px; background-size:100% auto; background-position:center top; }
 .qv-go { min-height:38px; }
 .qv-scroll { min-height:42px; }
}

/* Compact journal and attendance: no explanatory plaques or completion badges. */
.qv-attendance-count { margin:10px 4px 14px; font:600 12px/1.4 Arial,sans-serif; color:#795734; }
.qv-diamond { display:block; width:46px; height:46px; object-fit:contain; filter:drop-shadow(0 2px 2px #17668b33); }
.qv-overview b { display:flex; align-items:center; gap:7px; }
.qv-inline-diamond { width:22px; height:22px; object-fit:contain; }
.qv-milestone { flex-basis:136px; padding:10px; gap:7px; border-radius:16px; }
.qv-milestone strong { font-size:17px; }
.qv-milestone-claim { min-height:34px; padding:6px; }
.qv-milestone-claim:disabled { color:#8e877b; background:linear-gradient(#eee8dc,#d7d0c2); border-color:#c4bcad; opacity:1; cursor:default; }
@media(max-width:759px) { .qv-milestone { flex-basis:122px; padding:9px; } .qv-diamond { width:40px; height:40px; } }
@media(min-width:760px) and (max-height:500px) {
 .qv-card { flex-basis:clamp(164px,15vw,192px); min-height:190px; padding:7px 9px; }
 .qv-card-art { height:36px; }
 .qv-card h3 { font-size:14px !important; min-height:30px; }
 .qv-card .qv-condition { font-size:11px; min-height:25px; }
 .qv-story-lead { display:none; }
 .qv-go { min-height:30px; font-size:12px; padding:4px; }
}
