@font-face{font-family:Sarabun;src:url("fonts/THSarabunNew.ttf")}@font-face{font-family:Sarabun;src:url("fonts/THSarabunNew Bold.ttf");font-weight:700}@font-face{font-family:Sarabun;src:url("fonts/THSarabunNew Italic.ttf");font-style:italic}@font-face{font-family:Sarabun;src:url("fonts/THSarabunNew BoldItalic.ttf");font-style:italic;font-weight:700}
@font-face{font-family:InsomPali;src:url("fonts/CR_Insom_Pali.ttf")}@font-face{font-family:PaliUFix2;src:url("fonts/CR_Insom_Pali_MaejoSize_UFix2.ttf")}@font-face{font-family:InsomLanna;src:url("fonts/CR_Insom_Lanna.ttf")}@font-face{font-family:MooLanna;src:url("fonts/CR_Moo_Lanna-F1.ttf")}
*{box-sizing:border-box}body{margin:0;background:#11141b;color:#f1ede5;font:14px system-ui,sans-serif;color-scheme:dark}button,input,select,textarea{font:inherit;color:inherit}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:34px;height:34px;padding:0 8px;border:1px solid transparent;border-radius:7px;background:transparent;cursor:pointer}button:hover,button:focus-visible{background:#33313a;border-color:#68616b}button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}input,textarea,select{background:#12151d;border:1px solid #373945;border-radius:6px;padding:7px;width:100%;min-width:0}input[type=color]{height:34px;padding:3px}input[type=checkbox]{width:auto}header{display:flex;align-items:center;gap:16px;padding:10px 18px;background:#191c25;border-bottom:1px solid #30323e;min-height:60px}.brand{display:flex;align-items:center;gap:10px;white-space:nowrap}.logo{display:grid;place-items:center;width:31px;height:31px;border:1px solid #c6a574;border-radius:8px;color:#e4c995;font:22px Georgia}#title{max-width:330px;margin-right:auto}#present{background:#e4c995;color:#211c16;font-weight:700;white-space:nowrap}.tools{display:flex;align-items:center;gap:3px}main{display:grid;grid-template-columns:184px minmax(0,1fr) 252px;height:calc(100dvh - 60px)}aside{background:#191c25;overflow:auto}.slides{border-right:1px solid #30323e}.inspector{border-left:1px solid #30323e}.sidehead{padding:10px 12px;min-height:48px;display:flex;align-items:center;justify-content:space-between;color:#e4c995;border-bottom:1px solid #30323e;font-weight:650}.thumb{display:flex;width:100%;height:auto;padding:7px;align-items:flex-start;color:#c1bbc5}.thumb.active{border-color:#d8b983;background:#302b2b}.mini{width:100%;aspect-ratio:16/9;overflow:hidden;position:relative;pointer-events:none}#slides{padding:9px;display:grid;gap:8px}.workspace{display:flex;flex-direction:column;min-width:0;min-height:0}#insert{padding:7px 14px;border-bottom:1px solid #30323e;background:#191c25}#desk{flex:1;min-height:0;display:grid;place-items:center;padding:22px;background:radial-gradient(ellipse at center,#222631,#101319)}#frame,#showFrame{position:relative}#stage,#showStage,.mini-stage{width:960px;height:540px;position:absolute;top:0;left:0;transform-origin:top left;overflow:hidden}#frame{box-shadow:0 16px 44px #0008}footer{display:flex;justify-content:space-between;color:#b9b7c3;padding:8px 14px;border-top:1px solid #30323e}.object{position:absolute;display:flex;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.12}.object .content{width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column}.object img,.object video{width:100%;height:100%;object-fit:contain;pointer-events:none}#stage .object{cursor:move;touch-action:none}#stage .selected{outline:2px solid #b28748}.handle{position:absolute;bottom:0;right:0;width:18px;height:18px;background:#d6ab6b;border:2px solid #fff;border-radius:3px;cursor:nwse-resize}#properties{padding:12px;display:grid;gap:10px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}label{display:grid;gap:4px;color:#d3cdd5;font-size:13px}textarea{resize:vertical;min-height:86px}hr{width:100%;border:0;border-top:1px solid #383a45;margin:4px 0}#show{position:fixed;inset:0;background:#000;display:grid;place-items:center;z-index:10}#show[hidden]{display:none}#showNav{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);background:#181b23e8;padding:4px 8px;border-radius:10px;opacity:.75}#showNav:hover,#showNav:focus-within{opacity:1}.fade{animation:fade .38s ease-out}.push{animation:push .38s ease-out}.zoom{animation:zoom .38s ease-out}@keyframes fade{from{opacity:0}}@keyframes push{from{translate:14% 0;opacity:.2}}@keyframes zoom{from{scale:.91;opacity:0}}@media(prefers-reduced-motion:reduce){.fade,.push,.zoom{animation:none}}
@media(max-width:780px){main{grid-template-columns:1fr;height:auto}.slides,.inspector{border:0}.slides{order:1}.workspace{order:0}.inspector{order:2}#slides{display:flex;overflow:auto}.thumb{min-width:110px;width:110px}#desk{height:52dvh;flex:none;padding:10px}header{flex-wrap:wrap;gap:6px;padding:8px}#title{order:2;max-width:none}#files{margin-left:auto}#properties{grid-template-columns:repeat(2,minmax(0,1fr))}#properties hr,#properties textarea,#properties .fields{grid-column:1/-1}}

#insert{flex-wrap:wrap}
button[aria-pressed=true]{border-color:#c6a574;background:#413828;color:#fff1d3}
button:disabled{opacity:.42;cursor:default}
.arrange-hint,.alignment{grid-column:1/-1}.alignment{flex-wrap:wrap}
#grid{pointer-events:none;position:absolute;inset:0;background-image:linear-gradient(to right,#655e6790 1px,transparent 1px),linear-gradient(to bottom,#655e6790 1px,transparent 1px);background-size:2.0833333333% 3.7037037037%;mix-blend-mode:normal}
#stage .arranged{outline:2px solid #2892c5}
:root[data-theme=light] body{color-scheme:light;color:#292520;background:#f3f0ea}
[data-theme=light] header,[data-theme=light] aside,[data-theme=light] #insert{background:#faf8f3;border-color:#ded6c9}
[data-theme=light] .sidehead,[data-theme=light] footer{color:#594327;border-color:#ded6c9}
[data-theme=light] .logo{color:#745422;border-color:#ac8956}
[data-theme=light] input,[data-theme=light] textarea,[data-theme=light] select{background:#fffdf9;border-color:#c9bfae}
[data-theme=light] label,[data-theme=light] .thumb{color:#352d24}
[data-theme=light] button:hover,[data-theme=light] button:focus-visible{background:#eee3d0;border-color:#a8916c}
[data-theme=light] button[aria-pressed=true],[data-theme=light] .thumb.active{color:#3b2a13;background:#f2e2c3;border-color:#a67c3a}
[data-theme=light] #desk{background:radial-gradient(ellipse at center,#e9e4da,#d9d1c3)}
[data-theme=light] #frame{box-shadow:0 12px 35px #45382738}
[data-theme=light] #showNav{color:#f1ede5}
[data-theme=light] #showNav button:hover,[data-theme=light] #showNav button:focus-visible{background:#47424a}
dialog{width:min(92vw,470px);border:1px solid #9a815e;border-radius:12px;background:#191c25;color:inherit;padding:20px}
dialog::backdrop{background:#0007}
[data-theme=light] dialog{background:#faf8f3}
[hidden]{display:none!important}
#remotePin{display:inline-block;margin-inline:8px;color:#e4c995;font-size:32px;letter-spacing:.12em}
[data-theme=light] #remotePin{color:#745422}
dialog button,.phone form button{border-color:#9a815e}
.phone{max-width:660px;margin:auto;padding:18px;font-size:18px}
.phone h1{font-size:24px;color:#e4c995}
.phone form{display:flex;align-items:end;gap:12px}
.phone form input{font-size:24px;max-width:140px}
.phone-nav{display:flex;align-items:center;justify-content:space-between}
.phone-nav button{width:70px;height:54px;font-size:38px;background:#40382c;color:#e4c995}
#phoneNotes{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;font-size:22px}
#remoteEntry{display:grid;gap:8px;margin-top:12px}
.phone #pairForm{flex-wrap:wrap}
#phoneLinkRow{width:100%}
.phone #phoneLink{max-width:none;font-size:16px}
#remoteBack{margin-bottom:10px}
.host-list{display:grid;gap:6px;margin-top:8px}
.host-list button{justify-content:flex-start;height:auto;min-height:44px;white-space:normal;overflow-wrap:anywhere;border:1px solid #9a815e;text-align:left}
#phoneDiscovery{margin-bottom:12px}
.remote-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.remote-top #remoteBack{margin:0}
#phonePreviewSwitch{display:flex;align-items:center;gap:8px;color:inherit;min-height:36px}
#phonePreviewToggle{width:20px;height:20px;accent-color:#d5ad6a}
#phonePreview{margin:0 0 12px;aspect-ratio:16/9;background:#1a1e28;border:1px solid #414756;border-radius:8px;overflow:hidden;display:grid;place-items:center}
#phonePreviewImage{display:block;width:100%;height:100%;object-fit:contain}
#phonePreviewStatus{padding:8px;text-align:center;font-size:14px}

/* Let notes take the remaining viewport space while presentation controls stay visible. */
html:has(.phone #phoneControls:not([hidden])){overflow:hidden;overscroll-behavior:none}
.phone:has(#phoneControls:not([hidden])){
 height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;
}
.phone:has(#phoneControls:not([hidden]))>h1{margin:0 0 10px}
.phone #phoneStatus:empty{display:none}
.phone #phonePreview{
 flex:none;align-self:center;
 width:min(100%,48dvh);grid-template: minmax(0,1fr) / minmax(0,1fr);
}
.phone #phonePreviewImage{min-width:0;min-height:0}
.phone #phoneControls{display:flex;flex:1;min-height:0;flex-direction:column}
.phone .remote-top,.phone .phone-nav,.phone #phoneNotesHeading{flex:none}
.phone #phoneNotesHeading{font-size:1.25em;margin:12px 0 8px}
.phone #phoneNotes{
 flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;
 touch-action:pan-y;scrollbar-gutter:stable;padding-inline-end:6px;
}
@media (max-height:480px){
 .phone:has(#phoneControls:not([hidden])){padding-block:8px}
 .phone:has(#phoneControls:not([hidden]))>h1{font-size:18px;margin-bottom:2px}
 .phone .remote-top{margin-bottom:4px}
 .phone #phonePreview{width:min(100%,35dvh);margin-bottom:5px}
 .phone .phone-nav button{height:38px}
 .phone #phoneNotesHeading{margin:5px 0;font-size:1em}
}
#stage,#showStage,.mini-stage{width:var(--slide-width,960px);height:var(--slide-height,540px)}
.mini{aspect-ratio:var(--slide-ratio,16/9);max-height:150px}
.mini-stage{left:50%;transform-origin:top center;translate:-50% 0}
.deck-options{display:flex;gap:10px;flex-wrap:wrap}
.deck-options label{font-size:11px}
.workspace footer{flex-wrap:wrap;gap:8px}
#stage .object.editing{outline:2px solid #e4c995;cursor:text;touch-action:auto}
#stage .object.editing .content>div{min-height:1em;outline:none;cursor:text}
#stage .object.editing .handle{display:none}
.bullet-row{display:grid;grid-template-columns:.9em minmax(0,1fr);min-height:1.12em}
.bullet-row > span:first-child{text-align:left}
.bullet-row > span:last-child{grid-column:2;text-align:inherit}
.bullet-underlined{text-decoration-line:underline;text-decoration-thickness:.075em;text-underline-offset:.15em}

.bullet-underlined.bullet-brush{text-decoration-line:none}
.bullet-brush > .bullet-words{
 background:var(--bullet-brush-image) left bottom .24em / 100% .15em no-repeat;
 -webkit-box-decoration-break:clone;
 box-decoration-break:clone;
}

.slides{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.slides > .sidehead{flex:none}
#slides{min-height:0;overflow:auto;align-content:start;overscroll-behavior:contain}

#showInk{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#phoneBoard{flex:none}
#boardTools{justify-content:center;flex-wrap:wrap;margin:0 0 6px}
#boardTools button{border-color:#414756}
#phoneBoard #phonePreview{position:relative;margin-inline:auto}
#phoneInk{position:absolute;inset:0;width:100%;height:100%;touch-action:none}
#phoneInk:not(.drawing){pointer-events:none}
#phoneBoard.board-full{position:fixed;inset:0;z-index:20;display:flex;flex-direction:column;background:#11141b;padding:6px}
#phoneBoard.board-full #phonePreview{flex:1;min-height:0;width:100%;aspect-ratio:auto;margin:0;border:0}

#cloudControls{border:1px solid #414756;border-radius:8px;margin-top:12px;min-width:0}
#cloudControls .tools{flex-wrap:wrap;margin-top:6px}
#cloudShare{overflow-wrap:anywhere}
#cloudShare a{color:inherit}
#cloudJoin{flex-wrap:wrap}
#cloudJoin label:first-child{width:100%}
#cloudJoin #phoneCloudUrl{max-width:none;font-size:16px}
