/* HVSC Luyện gõ - chế độ điện thoại: bố cục toàn màn hình theo visualViewport, ô nhập thật >=16px, bàn phím ảo HVSC */
html.ty-lock,html.ty-lock body{overflow:hidden!important;overscroll-behavior:none}
.ty-m.ty-full{position:fixed;left:var(--vvl,0px);right:auto;width:100vw;top:var(--vvt,0px);height:var(--vvh,100dvh);z-index:250;background:linear-gradient(180deg,var(--t-bg1),var(--t-bg0));padding:max(8px,env(safe-area-inset-top)) 12px max(8px,env(safe-area-inset-bottom));gap:8px;display:flex;flex-direction:column;overflow:hidden;color:var(--t-text)}
.ty-m .ty-top{align-items:center;flex-wrap:nowrap;gap:10px;min-height:56px;padding:0}
.ty-m .ty-x{min-width:48px;min-height:48px;border-radius:14px;border:1px solid var(--t-line);background:var(--t-panel2);color:var(--t-text);font-size:18px;cursor:pointer;flex:none}
.ty-m .live{gap:14px}.ty-m .live .st b{font-size:26px}.ty-m .live .st span{font-size:11px;margin-bottom:3px}
.ty-m .ty-tools{display:flex;flex-direction:column;align-items:flex-end;gap:4px;margin-left:auto}
.ty-m .ty-tools .chip{min-height:44px}
.ty-m .ty-top{flex-wrap:wrap}.ty-m .ty-prog{flex:1 0 100%;order:9;min-width:0}
.ty-m .live .st span{white-space:nowrap;letter-spacing:.04em;font-size:11px}
.ty-m{--mfs:clamp(20px,5.6vw,30px)}
.ty-m .ty-sheet{flex:0 1 calc(var(--mfs)*1.8*5 + 30px);min-height:calc(var(--mfs)*1.8*2 + 30px);padding:14px 16px;display:flex;flex-direction:column;border-radius:18px;cursor:text}
.ty-m .sheet{flex:1;height:auto;min-height:0}
.ty-m .inner{font-size:var(--mfs);line-height:1.8}
.ty-m .ty-inp{position:absolute;inset:0;width:100%;height:100%;opacity:.01;font-size:16px;resize:none;border:0;background:transparent;color:transparent;caret-color:transparent;z-index:3;padding:0;margin:0;left:0;top:0}
.ty-m.hv .ty-inp{pointer-events:none}
.ty-m .ty-hint{min-height:28px;font-size:13.5px;flex:none;padding:0 2px}
.ty-m .ty-act{flex:none;gap:10px}.ty-m .ty-act .btn{flex:1;min-height:52px}
.ty-m .ty-note{display:none}
.ty-m .ty-prog .bar{height:5px}
.ty-m .ty-progbar{height:5px}
.ty-m .ty-x[hidden]{display:none}
.ty-vkb{flex:none;margin-top:auto;display:flex;flex-direction:column;gap:6px;touch-action:manipulation;user-select:none;-webkit-user-select:none;padding-top:2px}
.vr{display:flex;gap:5px;justify-content:center}.vr.pad{padding:0 4.5%}
.vk{flex:1 1 0;min-width:0;min-height:48px;height:clamp(48px,7.4vh,60px);border-radius:10px;border:1px solid var(--t-line);background:linear-gradient(180deg,var(--t-key-hi),var(--t-key));color:var(--t-text);font:600 21px var(--font);box-shadow:0 3px 0 var(--t-key-edge);position:relative;display:grid;place-items:center;cursor:pointer;padding:0;touch-action:manipulation}
.vk small{position:absolute;right:4px;top:2px;font-size:11px;color:var(--t-info);font-weight:700}
.vk.wide{flex:1.5 1 0;font-size:15px}.vk.space{flex:5 1 0}.vk.w1{flex:1 1 0}
.vk.hit,.vk:active{transform:translateY(3px);box-shadow:0 0 0 var(--t-key-edge);background:var(--t-accf);color:var(--t-acc-ink)}
.vk.on{background:var(--t-accf);color:var(--t-acc-ink)}
@media(orientation:landscape) and (max-height:520px){
  .ty-m{--mfs:clamp(18px,3.4vw,24px)}
  .ty-m.ty-full{padding:4px 10px;gap:4px}
  .ty-m .ty-top{min-height:40px;flex-wrap:nowrap}
  .ty-m .ty-prog{position:absolute;left:0;right:0;top:0;height:4px;flex:none;order:0;min-height:0}.ty-m .ty-prog small{display:none}.ty-m .ty-prog .bar{height:4px;border-radius:0}
  .ty-m .live .st b{font-size:22px}.ty-m .live .st span{display:none}
  .ty-m .ty-tools{display:none}
  .ty-m .inner{line-height:1.55}
  .ty-m .ty-sheet{flex:0 1 calc(var(--mfs)*1.55*3 + 24px);min-height:calc(var(--mfs)*1.55*2 + 24px);padding:10px 14px}
  .vk{height:48px;font-size:19px}.ty-vkb{gap:4px}.vr{gap:4px}
  .ty-m .ty-hint{display:none}.ty-m .ty-act{display:none}
}
.ty-m.ty-full .ty-act{order:5}
@media(max-width:640px){
  .tp .btn{min-height:48px}
  .tpw{padding:10px 12px 90px}
  .result .actions .btn{flex:1 1 100%}
  .tp .ty:not(.ty-full) .ty-act .btn{flex:1}
  .ty-m:not(.ty-full) .ty-inp{display:none}
  .crs-top{flex-direction:column;align-items:stretch}
}
/* kết quả trên điện thoại: thanh hành động nằm vùng ngón cái */
@media(max-width:640px){.result .ract{position:sticky;bottom:8px;z-index:5;background:color-mix(in srgb,var(--t-panel) 92%,transparent);padding:8px;border-radius:16px;border:1px solid var(--t-line);backdrop-filter:blur(6px)}}
