:root{--dg-award-gold:#e6be59;--dg-award-ink:var(--dg-ui-ink,#edf5ed);--dg-award-surface:var(--dg-ui-card,#182e21);--dg-award-border:var(--dg-ui-border,#4d6f54)}
.dg-award-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 14px;background:var(--dg-award-surface);color:var(--dg-award-ink);border:1px solid var(--dg-award-border);border-radius:12px;text-decoration:none;font:650 16px/1.5 system-ui;cursor:pointer;max-width:100%;white-space:normal}
.dg-award-button:focus-visible,.dg-room-award a:focus-visible{outline:3px solid var(--dg-award-gold);outline-offset:3px}
#dg-mode-heading{font-size:clamp(20px,3vw,26px);font-weight:800;margin:20px 0 10px;color:var(--ft-text,var(--dg-award-ink))}
#dg-flashcard-guide{display:block;width:fit-content;max-width:100%;padding:10px 14px;border:1px solid #bd974b;border-radius:12px;background:var(--ft-card,var(--dg-award-surface));color:var(--ft-text,var(--dg-award-ink));font-size:16px;line-height:1.6;margin:0 0 12px;box-shadow:inset 3px 0 #e6be59}
html body[data-dg-page="flashcard-typing"] #view-room #room-modes{align-items:stretch;margin-top:8px}
html body[data-dg-page="flashcard-typing"] #view-room #room-modes .ft-mode-card{position:relative;display:flex;flex-direction:column;gap:12px;min-height:230px;padding:20px 16px;border:1px solid #637d68!important;box-shadow:0 5px 12px #0002;cursor:pointer;transition:transform .16s,box-shadow .16s}
#room-modes .ft-mode-icon{display:grid;place-items:center;width:54px;height:54px;border:1px solid currentColor;border-radius:16px}
#room-modes .ft-mode-icon svg{width:30px;height:30px}
#room-modes .ft-mode-desc{flex:1}
#room-modes .dg-mode-cta{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:44px;padding:8px 12px;border:1px solid currentColor;border-radius:12px;background:#ffffff15;font-size:16px;font-weight:750;line-height:1.4}
html body[data-dg-page="flashcard-typing"] #view-room #room-modes .ft-mode-card[data-mode=flashcard]{border-color:#e6be59!important;box-shadow:0 0 0 1px #e6be5940,0 0 18px #e6be5928}
#room-modes [data-mode=flashcard] .dg-mode-cta{background:#e6be59;color:#241c0e;border-color:#f3d98a}
#room-modes [data-mode=flashcard].dg-encourage{animation:dgAwardPulse 3s ease-in-out 3}
@keyframes dgAwardPulse{0%,100%{box-shadow:0 0 0 1px #e6be5940,0 0 10px #e6be5920}50%{box-shadow:0 0 0 2px #e6be59a0,0 0 24px #e6be5960}}
#room-modes .ft-mode-card:focus-visible{outline:3px solid #f5d578;outline-offset:4px}
@media(hover:hover){#room-modes .ft-mode-card:hover{transform:translateY(-3px);box-shadow:0 8px 20px #0003!important}}
.dg-awards-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.85fr);gap:8px 20px;align-items:center}
.dg-awards-hero>.ft-room-hero-title,.dg-awards-hero>.ft-room-hero-meta,.dg-awards-hero>.ft-room-hero-actions{grid-column:1}
.dg-room-award{grid-column:2;grid-row:1/span 3;display:flex;align-items:center;gap:14px;min-width:0;padding:16px;border:1px solid #b59651;border-radius:16px;background:var(--ft-card,var(--dg-award-surface));color:var(--ft-text,var(--dg-award-ink));font-size:16px;line-height:1.6}
.dg-room-award svg{flex:none;width:76px;height:86px}.dg-room-award h3{font-size:17px;margin:0 0 6px}.dg-room-award p{margin:4px 0}.dg-room-award a{display:inline-flex;align-items:center;min-height:44px;color:inherit;text-decoration:underline;text-underline-offset:4px}
.dg-room-award [role=status]{font-size:14px;line-height:1.5}.dg-room-award meter{display:block;width:100%;height:12px;margin:8px 0}
html body[data-dg-page="flashcard-typing"] #view-room #room-leaderboard{position:static!important;max-height:none!important;height:auto!important;overflow:visible!important}
html body[data-dg-page="flashcard-typing"] #view-room #room-leaderboard .lr-details{min-width:0;height:auto!important;max-height:none!important;overflow:visible!important;align-items:start}
#room-leaderboard .lr-details>div{min-width:0;max-width:100%;overflow:visible!important}
#room-leaderboard .lr-note{overflow-wrap:anywhere}
.dg-weak-hint{margin:4px 0 10px;font-size:14px;color:var(--ft-dim,var(--dg-award-ink));line-height:1.5}
.dg-weak-scroll{display:grid;grid-template-columns:minmax(0,1fr) 44px;position:relative;min-width:0;max-width:100%;border:1px solid var(--ft-border,var(--dg-award-border));border-radius:14px;padding:8px}
.dg-weak-scroll.no-overflow{grid-template-columns:minmax(0,1fr)}
html body #view-room #learning-difficult{max-height:340px!important;max-height:clamp(200px,40dvh,340px)!important;overflow-y:auto!important;overflow-x:hidden!important;min-width:0;padding:0 4px;overscroll-behavior:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
#view-room #learning-difficult::-webkit-scrollbar{width:0;height:0}
#learning-difficult .lr-word{min-width:0;overflow-wrap:anywhere;padding:6px 0}
#learning-difficult .lr-word>summary{min-height:48px;padding:10px 12px;border:1px solid var(--ft-border,var(--dg-award-border));border-radius:10px;font-size:16px;line-height:1.6;white-space:normal}
#learning-difficult .lr-word>summary span{float:none;display:block;font-size:13px;line-height:1.5}
.dg-weak-track{position:relative;width:44px;min-height:80px;touch-action:none;cursor:pointer;border-radius:12px}
.dg-weak-track[hidden]{display:none}
.dg-weak-track::before{content:'';position:absolute;top:0;bottom:0;left:15px;width:14px;border-radius:10px;background:#4c6955}
.dg-weak-thumb{position:absolute;left:15px;width:14px;top:var(--dg-thumb-y,0px);height:var(--dg-thumb-height,40px);background:#c6de75;border:1px solid #e2edb0;border-radius:10px;pointer-events:none}
.dg-weak-track:focus-visible{outline:3px solid #e6be59;outline-offset:2px}
.dg-weak-scroll.has-more::after{content:'↓';position:absolute;bottom:2px;left:8px;right:52px;height:28px;display:flex;align-items:flex-end;justify-content:center;background:linear-gradient(transparent,var(--ft-card,#182e21));color:#e6be59;pointer-events:none;font-weight:800}
.dg-award-notice{margin:14px auto;padding:14px 18px;max-width:1000px;border:1px solid #e6be59;border-radius:14px;color:var(--dg-award-ink);background:var(--dg-award-surface);font:16px/1.6 system-ui}
.dg-award-notice a{display:inline-flex;align-items:center;min-height:44px;color:inherit;margin-left:12px;font-weight:700}
.dg-profile-page{max-width:1100px;width:100%;min-width:0;margin:auto;padding:20px;color:var(--dg-award-ink);font:16px/1.7 system-ui}
.dg-profile-page *{box-sizing:border-box;min-width:0}
.dg-profile-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.dg-profile-heading h1{font-size:clamp(26px,4vw,36px);font-weight:800;margin:0}
#dg-profile-search{margin:0 0 20px}#dg-profile-search label{display:block;margin-bottom:6px;font-weight:650}#dg-profile-search>div{display:flex;gap:8px}#dg-profile-query{flex:1;min-width:0;font:inherit;font-size:16px;padding:10px 12px;min-height:46px;background:var(--dg-award-surface);color:inherit;border:1px solid var(--dg-award-border);border-radius:12px}
#dg-profile-search-results{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 20px}
#dg-profile-hero{display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:24px;border:1px solid var(--dg-award-border);border-radius:22px;background:var(--dg-award-surface);margin:20px 0}
#dg-profile-hero h2{font-size:28px;font-weight:800;overflow-wrap:anywhere;margin:0 0 8px}
.dg-learner-avatar{display:grid;place-items:center;width:100px;height:100px;flex:none;border:3px solid #e6be59;border-radius:50%;background:#245c39;color:#fff;font-size:38px;overflow:hidden}
.dg-learner-avatar img{width:100%;height:100%;object-fit:cover}
.dg-awards-section{margin:24px 0;padding:20px;border:1px solid var(--dg-award-border);border-radius:20px;background:var(--dg-award-surface);color:var(--dg-award-ink)}
.dg-awards-section h2,#dg-profile-awards h2{font-size:24px;font-weight:800;margin:0 0 8px}
.dg-awards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px}
.dg-earned-award{display:flex;flex-direction:column;align-items:center;gap:8px;padding:20px;border:1px solid #af9552;border-radius:18px;background:var(--dg-award-surface);color:var(--dg-award-ink);text-align:center;min-width:0}
.dg-earned-award svg{width:110px;height:124px}.dg-earned-award h3{font-size:18px;font-weight:750;margin:0;line-height:1.6;overflow-wrap:anywhere}.dg-earned-award p{margin:0;line-height:1.6;overflow-wrap:anywhere}.dg-earned-award a{margin-top:auto;display:inline-flex;align-items:center;min-height:44px;color:inherit;text-decoration:underline;text-underline-offset:3px}
.dg-awards-status{font-size:16px;margin:12px 0;line-height:1.6}
@media(max-width:900px){.dg-awards-hero{grid-template-columns:minmax(0,1fr)}.dg-room-award{grid-column:1;grid-row:auto}.dg-awards-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.dg-awards-grid{grid-template-columns:minmax(0,1fr)}.dg-profile-page{padding:14px}.dg-awards-section{padding:14px}.dg-room-award{padding:12px;gap:10px}.dg-room-award svg{width:58px;height:70px}html body[data-dg-page="flashcard-typing"] #view-room #room-modes .ft-mode-card{min-height:200px;padding:16px 14px}#room-leaderboard .lr-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.dg-weak-scroll{padding:6px}.dg-profile-heading{align-items:start}#dg-profile-hero{padding:18px;gap:16px}}
@media(prefers-reduced-motion:reduce){#room-modes .ft-mode-card{animation:none!important;transition:none!important;transform:none!important}.dg-weak-scroll *{scroll-behavior:auto!important}}
@media(max-width:600px){.dg-room-award{align-items:flex-start;font-size:14px;line-height:1.5}.dg-room-award h3{font-size:15px;line-height:1.5}.dg-room-award a{font-size:14px}.dg-room-award .dg-award-room-name{font-size:15px}#dg-profile-hero{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:start}#dg-profile-hero .dg-learner-avatar{width:72px;height:72px;font-size:28px}#dg-profile-hero h2{font-size:22px}#dg-profile-hero p{font-size:14px;line-height:1.6;margin:6px 0}#dg-profile-hero .dg-award-button{font-size:14px;padding:8px 10px}}
@media(max-width:409px){.dg-room-award .dg-award-room-name{display:none}}
/* 20261028: reference-matched learning cards and a single award/profile visual language. */
html body #view-room #room-modes .ft-mode-card{--mode-rgb:178,155,226;border-color:rgba(var(--mode-rgb),.65)!important;background:linear-gradient(145deg,rgba(var(--mode-rgb),.13),transparent 80%),var(--ft-card,var(--dg-award-surface));overflow:hidden;isolation:isolate;border-radius:16px}
html body #view-room #room-modes [data-mode=flashcard]{--mode-rgb:255,209,76;border-color:#ffd75f!important;box-shadow:0 0 0 1px #ffcd5870,0 0 18px #ffcf4c45!important}
html body #view-room #room-modes [data-mode=listening]{--mode-rgb:97,203,234}
html body #view-room #room-modes [data-mode=cloze]{--mode-rgb:75,207,168}
html body #view-room #room-modes [data-mode=memory]{--mode-rgb:233,181,80}
html body #view-room #room-modes .ft-mode-icon{color:rgb(var(--mode-rgb));background:linear-gradient(145deg,rgba(var(--mode-rgb),.24),rgba(var(--mode-rgb),.06));box-shadow:inset 0 1px 5px #ffffff25}
html body #view-room #room-modes .dg-mode-cta{box-sizing:border-box;background:linear-gradient(180deg,rgba(var(--mode-rgb),.48),rgba(var(--mode-rgb),.2));border:1px solid rgba(var(--mode-rgb),.8);box-shadow:inset 0 2px 5px #ffffff24,0 3px 8px #0003;color:var(--ft-text,#fff);position:relative;z-index:1}
html body #view-room #room-modes [data-mode=flashcard] .dg-mode-cta{color:#241b06;background:linear-gradient(180deg,#ffe577,#e4b32f);border-color:#ffe38a;box-shadow:inset 0 2px 3px #fff7c677,0 3px 12px #edba3144}
html body #view-room #room-modes .dg-encourage{animation:none}
html body #view-room #room-modes .dg-encourage::after{content:'';position:absolute;inset:0;border:2px solid #ffe889;border-radius:inherit;box-shadow:inset 0 0 20px #ffd84a44,0 0 15px #ffd84aaa;pointer-events:none;z-index:2;animation:dgGoldBreath 3.6s ease-in-out infinite}
html body #view-room #room-modes .dg-encourage::before{content:'';position:absolute;top:-60%;left:-110%;width:75%;height:220%;background:linear-gradient(110deg,transparent 30%,#fff2af26 50%,transparent 70%);transform:rotate(20deg);pointer-events:none;z-index:0;animation:dgGoldSweep 6s ease-in-out infinite}
@keyframes dgGoldBreath{0%,100%{opacity:.3}50%{opacity:1}}
@keyframes dgGoldSweep{0%,20%{translate:0 0;opacity:0}28%{opacity:1}58%,100%{translate:310% 0;opacity:0}}
.dg-guide-bulb{display:inline-block;margin-right:8px;font-size:22px;vertical-align:middle}
html body #dg-flashcard-guide{background:linear-gradient(100deg,#d7a8311a,transparent);border-color:#cea638;box-shadow:inset 0 1px 5px #f7d56620}
html body #view-room .ft-room-hero-inner.dg-awards-hero{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(380px,1fr);column-gap:24px;align-items:center}
html body #view-room .dg-awards-hero .dg-room-award{grid-column:2;grid-row:1/span 3;width:100%;box-sizing:border-box;display:grid;grid-template-columns:100px minmax(0,1fr) 112px;gap:6px 12px;padding:14px;border-color:#ad923e;background:linear-gradient(125deg,#e5b83716,transparent 65%),var(--ft-card,var(--dg-award-surface));box-shadow:inset 0 1px 0 #ffdf731a;border-radius:16px;min-width:0}
html body .dg-room-award>svg{grid-column:1;grid-row:1/span 2;width:100%;height:auto;filter:drop-shadow(0 3px 5px #11090066)}
.dg-room-award-copy{grid-column:2;min-width:0;overflow-wrap:anywhere}.dg-room-award-copy h3{font-size:14px;font-weight:500;margin:0 0 3px}.dg-room-award-copy strong{display:block;color:var(--ft-text,var(--dg-award-ink));font-size:17px;line-height:1.5}.dg-room-award-copy p{font-size:14px;line-height:1.5}.dg-room-award-copy small{font-size:13px;line-height:1.5}
html body .dg-room-award .dg-award-room-name{display:block}
.dg-room-award-action{display:flex;flex-direction:column;align-items:center;gap:8px}.dg-award-state{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--dg-award-border);border-radius:14px;color:inherit}.dg-award-state svg{width:20px;height:24px}
html body .dg-room-award .dg-award-button{font-size:13px;padding:7px 10px;white-space:normal;text-align:center;text-decoration:none;min-height:44px;border-color:#7d9c7b;box-shadow:inset 0 1px 4px #fff2}
html body .dg-room-award .dg-award-profile-note{grid-column:2/-1;min-height:24px;font-size:12px;line-height:1.5;text-align:right;justify-self:end}
.dg-award-progress{height:6px;background:#65806944;border-radius:5px;overflow:hidden;margin:8px 0 4px}.dg-award-progress>span{display:block;height:100%;background:linear-gradient(90deg,#c69833,#ffe78e);border-radius:inherit}
.dg-room-award.is-earned{border-color:#e5bd55}.dg-room-award.is-earned .dg-award-state{color:#d4eeae;border-color:#8aaf70}
.dg-earned-award>svg{width:130px;height:130px;filter:drop-shadow(0 4px 7px #0003)}
/* Public profile reuses DGDecor, the actual saved wardrobe frame/title/cover. */
#dg-profile-hero.dg-synced-profile{position:relative;isolation:isolate;overflow:hidden;min-height:190px;padding:32px;gap:28px}
.dg-public-cover{position:absolute;inset:0;z-index:-1;pointer-events:none}.dg-public-cover>.dc-cover{width:100%;height:100%;border-radius:0}.dg-public-cover .dc-cover-shade{background:linear-gradient(90deg,#10251dec,#10251d85)}
html body #dg-profile-hero .dg-learner-avatar{position:relative;overflow:visible;align-self:center;width:100px;height:100px}
html body #dg-profile-hero .dg-learner-avatar.dg-has-frame{border:0;background:transparent;font-size:38px}
#dg-profile-hero .dc-frame{width:100%;height:100%;margin:0;display:block}#dg-profile-hero .dc-photo{max-width:none}
.dg-avatar-initial{display:grid;place-items:center;width:100%;height:100%;border-radius:24%;background:#245c39;color:#fff;position:relative;z-index:2}
.dg-has-frame .dg-avatar-initial{position:absolute;inset:6px;width:calc(100% - 12px);height:calc(100% - 12px)}
.dg-public-info{position:relative;min-width:0;z-index:1}.dg-public-title .dc-title{margin:8px 16px 12px;max-width:calc(100% - 32px);font-size:16px}.dg-public-title .dc-title-text{font-size:15px}.dg-public-title{line-height:1.6}
@media(min-width:1100px){html body #view-room #room-modes .ft-mode-card{min-height:220px;padding:18px 16px;gap:10px}}
@media(max-width:1199px){html body #view-room .ft-room-hero-inner.dg-awards-hero{grid-template-columns:minmax(0,1fr)}html body #view-room .dg-awards-hero .dg-room-award{grid-column:1;grid-row:auto;max-width:640px}}
@media(max-width:600px){html body #view-room .dg-awards-hero .dg-room-award{grid-template-columns:72px minmax(0,1fr);gap:8px;padding:12px}html body .dg-room-award>svg{grid-column:1;grid-row:1}.dg-room-award-action{grid-column:1/-1;flex-direction:row;justify-content:flex-end}.dg-room-award-action .dg-award-button{flex:1}.dg-award-state{width:36px;height:36px}.dg-room-award-copy strong{font-size:16px}html body .dg-room-award .dg-award-profile-note{grid-column:1/-1;text-align:left;justify-self:start;min-height:44px}#dg-profile-hero.dg-synced-profile{padding:26px 22px;gap:22px;grid-template-columns:72px minmax(0,1fr)}html body #dg-profile-hero .dg-learner-avatar{width:72px;height:72px}.dg-public-title .dc-title{padding:8px 12px}.dg-public-title .dc-title-text{font-size:14px}}
@media(prefers-reduced-motion:reduce){html body #view-room #room-modes .dg-encourage::before,html body #view-room #room-modes .dg-encourage::after{animation:none!important}.dg-synced-profile .dc-animated,.dg-synced-profile .dc-animated *{animation:none!important}}
html[data-dg-motion=reduced] #room-modes .dg-encourage::before,html[data-dg-motion=reduced] #room-modes .dg-encourage::after{animation:none!important}
#dg-profile-hero.dg-profile-has-cover{color:#f0f7ee}#dg-profile-hero.dg-profile-has-cover .dg-award-button{color:#f0f7ee;background:#163526e8;border-color:#94b68b}
.dg-guide-bulb svg{display:block;width:23px;height:23px;stroke:#ffdc70;fill:#ffdc7022}
@media(max-width:420px){#dg-profile-hero.dg-synced-profile{padding:24px 18px;gap:18px}#dg-profile-hero h2{font-size:20px;line-height:1.4}}
/* Room-specific collectible medals. Automatic motion, independent of hover. */
html body svg.dg-room-medal{overflow:visible;filter:drop-shadow(0 4px 4px #0005);flex-shrink:0}
html body .dg-room-medal .dg-badge-body{animation:dgBadgeFloat 6s ease-in-out infinite;transform-origin:100px 110px;animation-play-state:running!important}
html body .dg-room-medal .dg-badge-sheen{animation:dgBadgeSheen 8s ease-in-out infinite;animation-play-state:running!important;pointer-events:none}
html body .dg-room-medal .dg-badge-spark{animation:dgBadgeSpark 4.8s ease-in-out infinite;animation-play-state:running!important;transform-box:fill-box;transform-origin:center;pointer-events:none}
@keyframes dgBadgeFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes dgBadgeSheen{0%,20%{translate:0 0;opacity:0}28%{opacity:.7}65%,100%{translate:310px 0;opacity:0}}
@keyframes dgBadgeSpark{0%,100%{opacity:.35;transform:scale(.8)}50%{opacity:1;transform:scale(1.08)}}
html body .dg-earned-award>svg.dg-room-medal{width:160px;height:176px}
html body .dg-earned-award{background:radial-gradient(ellipse at 50% 10%,#d8b85e12,transparent 70%),var(--dg-award-surface);border:1px solid #b89857;box-shadow:inset 0 1px 0 #ffe8b326,0 5px 18px #0002}
html body .dg-room-award>svg.dg-room-medal{width:100%;height:auto;align-self:center}
html body #view-room #room-modes .dg-encourage::before,html body #view-room #room-modes .dg-encourage::after{animation-play-state:running!important}
@media(prefers-reduced-motion:reduce){html body .dg-room-medal .dg-badge-body,html body .dg-room-medal .dg-badge-sheen,html body .dg-room-medal .dg-badge-spark{animation:none!important}html body .dg-room-medal .dg-badge-sheen{opacity:0}}
html[data-dg-motion=reduced] body .dg-room-medal .dg-badge-body,html[data-dg-motion=reduced] body .dg-room-medal .dg-badge-sheen,html[data-dg-motion=reduced] body .dg-room-medal .dg-badge-spark{animation:none!important}
html[data-dg-motion=reduced] body .dg-room-medal .dg-badge-sheen{opacity:0}
