@import url('./animations.css');
:root{font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#233c37;background:#f5f5ef;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}[hidden]{display:none!important}.shell{max-width:1040px;margin:auto;padding:30px 38px}.masthead{display:flex;justify-content:space-between;align-items:center;margin-bottom:58px}.brand{color:inherit;text-decoration:none;font-size:21px;font-weight:700;display:flex;gap:12px;align-items:center}.brand-mark{display:grid;place-items:center;width:43px;height:43px;border-radius:12px;background:#264e48;color:#fff;font-family:Georgia,serif;font-size:25px}.eyebrow{font-size:11px;letter-spacing:1.7px;font-weight:750;color:#526b61}.intro{display:flex;justify-content:space-between;align-items:center;gap:30px;margin:16px 0 32px}h1{font-family:Georgia,serif;font-size:clamp(34px,5vw,51px);line-height:1.13;font-weight:400;letter-spacing:-1.5px;margin:0}h1 em{color:#597868;font-weight:400}.intro p,p{line-height:1.65}.intro p{font-size:14px;color:#607269}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:26px}.metrics button{display:flex;align-items:center;gap:14px;text-align:left;border:1px solid #dce1d7;background:#fcfcf7;border-radius:13px;padding:18px;color:inherit;font-size:12px}.metrics button>span:last-child{margin-left:auto;color:#617368}.metric-icon{font-size:27px;background:#e8eee2;border-radius:10px;display:grid;place-items:center;width:42px;height:46px}.metrics strong{display:block;font-size:26px;line-height:1.25;margin-top:5px;font-weight:500}.panel{background:#fffef9;border:1px solid #dce1d7;border-radius:19px;padding:29px 34px;box-shadow:0 9px 30px #233c3705}.panel-top{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid #e6e9df;padding-bottom:20px;margin-bottom:26px}#progress{font-size:12px;color:#667669}h2{font-size:25px;font-weight:550;letter-spacing:-.5px;margin:12px 0 9px}#lesson>p{max-width:700px;color:#54665d}#lesson>.primary{margin-top:14px}.examples{display:flex;flex-wrap:wrap;gap:15px;margin:25px 0}.examples span{background:#edf1e7;padding:17px 22px;border-radius:9px;letter-spacing:3px;font-size:20px}.prompt{display:flex;justify-content:space-between;align-items:center;gap:20px}.prompt p{font-size:14px;color:#69776d;margin-top:0}.audio{background:#edf2e8;color:#294d43;border:1px solid #ccd8c9;border-radius:30px;padding:13px 19px;white-space:nowrap;min-height:46px}.tiles{display:flex;flex-wrap:wrap;gap:9px;align-content:center;min-height:91px;padding:17px;border-radius:12px}.board{border:2px dashed #bbcbb9;background:#f4f6ed;margin:19px 0 25px;min-height:105px}.board:empty:before{content:'Your word goes here';color:#6d7a6a;font-size:14px;margin:auto}.bank{background:#f1f0e9}.bank-label{display:flex;justify-content:space-between;font-size:10px;font-weight:700;letter-spacing:1.2px;color:#667363;margin-bottom:10px}.bank-label span:last-child{font-weight:400;letter-spacing:0}.tile{touch-action:none;user-select:none;position:relative;width:53px;height:58px;background:#fffef9;border:1px solid #c9cdbd;border-bottom:3px solid #b9c0ae;border-radius:9px;color:#29443c;font-size:26px;font-weight:600;box-shadow:0 2px 3px #243d3710;transition:transform .16s,box-shadow .16s}.tile:hover{box-shadow:0 5px 9px #243d3720;transform:translateY(-2px)}.dragging{z-index:5;box-shadow:0 12px 20px #243d3730;transition:none}.instructions{font-size:12px;color:#637267}#feedback{background:#eef3e8;border-left:3px solid #819775;padding:15px 18px;line-height:1.65;font-size:14px;margin:20px 0;min-height:58px}#model{letter-spacing:2px;line-height:1.6}.actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:24px}.primary,.quiet,.text-button{min-height:44px;border-radius:8px;padding:11px 18px;border:1px solid transparent}.primary{background:#294e44;color:white}.primary span{margin-left:24px}.quiet{background:transparent;border-color:#cdd5c8;color:#365448}.text-button{background:transparent;color:#3e6654;text-decoration:underline;text-underline-offset:4px}#finish{margin-left:auto}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #b47a2e;outline-offset:4px}footer{display:flex;justify-content:space-between;margin:25px 2px;color:#657467;font-size:12px}dialog{width:min(630px,94vw);max-height:85vh;overflow:auto;border:1px solid #d5dece;border-radius:18px;background:#fffef9;padding:26px;color:inherit}dialog::backdrop{background:#19312b66}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.collection-card{border-top:1px solid #dce1d7;padding:10px 0}#dialog-body>button,#dialog-body>label{display:block;margin:16px 0}input{max-width:100%;margin:12px 0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#notice:empty{display:none}@media(max-width:650px){.shell{padding:20px 16px}.masthead{margin-bottom:35px}.intro{display:block}.intro p{margin-top:20px}.metrics{gap:7px}.metrics button{padding:12px 9px;font-size:10px;gap:0}.metric-icon,.metrics button>span:last-child{display:none}.panel{padding:22px 17px}.panel-top{flex-direction:column;gap:9px}.prompt{align-items:flex-start;flex-direction:column;gap:4px}.tile{width:44px;height:51px;font-size:22px}.tiles{gap:7px;padding:12px}footer{gap:15px;line-height:1.6}#finish{margin-left:0}}

/* Two rooms, one shared navigation and palette. */
.masthead{margin-bottom:24px}.metrics{margin-bottom:22px}.panel{transition:background-color .18s ease}
.room-subtitle{color:#687667;font-size:14px;margin:13px 0 26px}
#library{max-width:740px;margin:auto;padding:10px 20px 22px}
#library h1{font-size:40px;letter-spacing:-1px}
#library #lesson h2{font-family:Georgia,serif;font-size:27px;font-weight:400;line-height:1.4;margin-top:26px}
#library #lesson>p{max-width:62ch;font-size:15px}
body[data-room="library"] .panel{background:#fffaf0;border-color:#dfd8c5}
body[data-room="library"] .panel-top .eyebrow{color:#796447}
.reading-directions{border-top:1px solid #e6dfce;padding-top:21px}
.reading-page{margin:28px 0 18px;padding:26px 30px 30px;border:1px solid #e6ddc7;border-radius:3px 14px 14px 3px;background:linear-gradient(90deg,#e8deca55,transparent 16px),#fffdf6;box-shadow:2px 3px 0 #e7dec84d}
.passage{font-family:Georgia,'Times New Roman',serif;font-size:clamp(23px,3.1vw,31px);line-height:1.8;max-width:42ch;margin:18px 0 0;color:#3e4537}
.reading-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.reading-controls .primary{background:transparent;border-color:#c8d0bd;color:#355044}.reading-controls .primary:last-child{background:#294e44;color:#fff;margin-left:auto}
body[data-room="workshop"] .panel{background:#fdfdf8}
body[data-room="workshop"] .metrics button{padding:12px 16px}
body[data-room="workshop"] .metrics strong{font-size:22px}
body[data-room="workshop"] .panel-top{margin-bottom:17px;padding-bottom:16px}
#workbench .prompt h2{font-size:25px;margin-top:0}
#workbench .board{min-height:126px;background:linear-gradient(135deg,#f0f3e8,#f6f6ee);border-color:#a9bca5;align-content:center;gap:5px}
.tile-shell{display:inline-block;flex:0 0 66px;position:relative;width:66px;height:74px;vertical-align:middle;transform:rotate(var(--angle,0deg));transition:left .16s ease,top .16s ease,transform .16s ease}
.tile-shell .tile{position:absolute;left:6px;top:8px;width:54px;height:60px;border:0;padding:0;background:transparent;color:#344436;box-shadow:none;transform:none;border-radius:8px;font-family:ui-rounded,'Segoe UI',sans-serif;font-size:27px}
/* Only this inner painted face scales; button bounds and shell transforms stay fixed. */
.tile-face{display:grid;place-items:center;width:100%;height:100%;pointer-events:none;border:1px solid #c5c6b1;border-bottom:4px solid #b8b99f;border-radius:8px;background:linear-gradient(135deg,#fffef7,#f1eddc);box-shadow:1px 3px 5px #3d412c24;transform:scale(1);transform-origin:center;transition:transform .16s ease-out,box-shadow .16s ease-out}
.tile-shell.dragging .tile-face{transform:scale(var(--drag-visual-scale,1))}
.tile-shell .tile:hover{transform:none;box-shadow:none}
.tile-shell .tile:hover .tile-face{box-shadow:0 5px 10px #3d412c30}
.tile-shell.picked-up{z-index:10;transition:none}
.tile-shell.picked-up .tile .tile-face{box-shadow:0 12px 18px #3d412c40}
.tile-shell.dragging{z-index:10;transition:none;box-shadow:none}
.tile-shell.placing{transition:none!important;animation:none!important}
.board{position:relative}
.bank{position:relative;display:block;min-height:205px;padding:0;isolation:isolate;overflow:visible;border:1px solid #d0ceba;background:repeating-linear-gradient(2deg,#ddd8c60d 0px,#ddd8c60d 1px,transparent 1px,transparent 5px),linear-gradient(135deg,#e9e5d6,#f1edde);box-shadow:inset 0 2px 8px #554e3810;border-radius:14px}
.bank .tile-shell{position:absolute;margin:0}
/* Optional, book-like reference; typography is separate from letter data. */
#letter-inspector{
 --biography-letter-size:34px;
 --biography-classification-size:18px;
 --biography-section-size:20px;
 --biography-pattern-size:16px;
 --biography-body-size:16px;
 --biography-example-size:15px;
 --biography-label-size:12px;
 --biography-line-height:1.7;
 --biography-space:20px;
 --biography-block-gap:26px;
 width:min(660px,calc(100vw - 28px));max-height:88vh;max-height:88dvh;margin:auto;inset:0;padding:25px 30px;overflow:auto;border:1px solid #c8cbb9;border-radius:16px;background:#fffdf5;color:#293f34;box-shadow:0 18px 60px #233c3733
}
#letter-inspector::backdrop{background:#24392e66}
#letter-inspector .biography-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--biography-space);border-bottom:1px solid #e3dfcf;padding-bottom:var(--biography-space)}
#letter-inspector .biography-kicker{display:block;font-size:var(--biography-label-size);font-weight:500;letter-spacing:1px;line-height:1.4;color:#53644d}
#letter-inspector .biography-header h2{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:var(--biography-letter-size);font-weight:400;line-height:1.3;margin:5px 0 12px}
#letter-inspector p,#letter-inspector li{font-size:var(--biography-body-size);line-height:var(--biography-line-height)}
#letter-inspector .biography-classification{font-size:var(--biography-classification-size);font-weight:600;line-height:1.4;margin:0 0 10px}
#letter-inspector .biography-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:0;border-radius:6px;background:transparent;color:#3b5142;font:26px/1 system-ui;cursor:pointer}
#letter-inspector .biography-close:hover{background:#eeeede}
#letter-inspector h3{font-family:Georgia,serif;font-size:var(--biography-section-size);font-weight:400;line-height:1.45;margin:var(--biography-space) 0 14px}
#letter-inspector h4{font-size:var(--biography-pattern-size);font-weight:600;line-height:1.5;margin:0 0 7px}
#letter-inspector .letterforms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:250px;margin:var(--biography-space) 0}
#letter-inspector .letterforms[data-cursive="true"]{grid-template-columns:repeat(4,minmax(0,1fr));max-width:none}
#letter-inspector .letterform{border:1px solid #e3ddc9;border-radius:8px;background:#f6f2e5;padding:10px 12px;text-align:center}
#letter-inspector .letterform>span:first-child{font-size:var(--biography-label-size);color:#53644d}
#letter-inspector .letterform-glyph{display:block;font:44px/1.45 Georgia,serif}
#letter-inspector .letterform small{display:block;font-size:var(--biography-label-size);line-height:1.45;color:#53644d}
#letter-inspector .letter-sounds{padding-left:20px;margin:10px 0}
#letter-inspector .letter-examples{font-size:var(--biography-example-size);font-weight:500;line-height:1.6;letter-spacing:.3px;color:#3d5e42;margin:10px 0 0}
#letter-inspector .biography-note{font-size:var(--biography-label-size);color:#5f6c58;margin-top:16px}
#letter-inspector .biography-section{border-top:1px solid #dddccf;margin-top:24px;padding-top:16px}
#letter-inspector .biography-section summary{font-family:Georgia,serif;font-size:var(--biography-section-size);line-height:1.5;cursor:pointer;padding:5px 0;min-height:44px}
#letter-inspector .biography-block{margin:var(--biography-block-gap) 0}
#letter-inspector .biography-block>p{margin:7px 0 0}
#letter-inspector .biography-block>.letter-examples{margin-top:10px}
#letter-inspector .did-you-know{background:#edf2e5;border-left:3px solid #84986d;padding:18px 20px;margin-top:22px;border-radius:0 8px 8px 0}
#letter-inspector .did-you-know h4{margin-top:10px}
#letter-inspector .related-letters{display:flex;gap:10px;flex-wrap:wrap;margin:24px 0}
#letter-inspector .related-letters button{text-align:left;font-size:var(--biography-label-size)}
@media(max-width:500px){#letter-inspector{padding:20px 17px}#letter-inspector .letterforms[data-cursive="true"]{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(max-width:650px){#library{padding:4px 0 15px}#library h1{font-size:34px}.reading-page{padding:22px 19px}.reading-controls .primary:last-child{margin-left:0}body[data-room="workshop"] .metrics button{padding:11px 9px}.tile-shell{flex-basis:66px}.tile-shell .tile{width:54px;height:60px}.masthead{margin-bottom:22px}#workbench .board{padding:10px;gap:1px}}
@media(prefers-reduced-motion:reduce){.tile-shell.picked-up{transition:none}.tile-shell,.panel{transition:none!important}}

#app-version{font-size:11px;margin-left:10px;white-space:nowrap;color:#687667}

@media(prefers-reduced-motion:reduce){.tile-face{transition:none!important;animation:none!important}}
