/* A disposable study sheet. Row geometry stays fixed so ink follows its word. */
.preliminary-worksheet{
  --pw-pink:#f3cbd5;
  --pw-pink-soft:#fff4f7;
  --pw-pink-text:#a75571;
  --pw-text:#343b46;
  --pw-muted:#8c929b;
  position:fixed;
  inset:0;
  z-index:1100;
  display:flex;
  flex-direction:column;
  min-width:0;
  background:#fff;
  color:var(--pw-text);
  font-family:var(--ui-font-family,sans-serif);
  font-size:15px;
  line-height:1.5;
  isolation:isolate;
}
.preliminary-worksheet[hidden],.pw-resume[hidden],.preliminary-worksheet [hidden]{display:none!important;}
body.pw-open{overflow:hidden;}
body.pw-open #studyInkCanvas,body.pw-open #studyInkToolbar,body.pw-open #studyInkLauncher{display:none!important;}
.preliminary-worksheet *{box-sizing:border-box;}
.preliminary-worksheet :where(button,select){font:inherit;}
.preliminary-worksheet button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;}
.preliminary-worksheet button:focus-visible,.preliminary-worksheet select:focus-visible,.pw-resume:focus-visible{outline:3px solid #c488a6;outline-offset:3px;}
.preliminary-worksheet button:disabled{cursor:default;opacity:.4;}
.pw-header{
  flex:none;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  grid-template-rows:auto auto;
  align-items:center;
  gap:16px;
  row-gap:4px;
  width:100%;
  min-height:103px;
  padding:calc(17px + env(safe-area-inset-top,0px)) max(28px,env(safe-area-inset-right,0px)) 13px max(28px,env(safe-area-inset-left,0px));
  background:#fff;
}
.pw-header>div:not(.pw-header-actions){text-align:center;}
.pw-header-title{display:contents;}
.pw-header>.pw-back{grid-column:1;grid-row:1;}
.pw-header .pw-header-title>h2{grid-column:2;grid-row:1;white-space:nowrap;}
.pw-header-actions{grid-column:3;grid-row:1;}
.pw-header-title>[data-pw-retry]{grid-column:1/-1;grid-row:3;justify-self:center;}
.pw-header-meta{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;max-width:100%;white-space:nowrap;}
.pw-header .pw-header-meta .pw-save-status{margin:0;flex:0 1 128px;min-width:0;text-align:right;overflow:hidden;text-overflow:ellipsis;}
.pw-progress{display:inline-flex;flex:none;align-items:center;gap:5px;padding:3px 8px;border:1px solid #f1d9e3;border-radius:999px;background:#fff7fa;color:#ad7b8e;font-size:11px;line-height:1.25;white-space:nowrap;font-variant-numeric:tabular-nums;}
.pw-progress strong{color:#a45272;font-weight:600;}
.pw-progress-divider{color:#d4b9c5;}
.pw-search-compact{display:none;}
.pw-header h2{margin:0;color:#343b46;font-size:25px;line-height:1.3;font-weight:600;letter-spacing:-.045em;}
.pw-header .pw-save-status{margin:5px 0 0;font-size:12px;font-weight:400;color:#9ca1a9;line-height:1.5;}
.pw-header .pw-save-status[data-status="saving"]{color:#a0808b;}
.pw-header .pw-save-status[data-status="error"]{color:#bd4e62;}
.pw-back,.pw-header-actions button{
  border:0;
  background:transparent;
  color:#747a85;
  border-radius:10px;
  padding:9px 10px;
  min-height:42px;
}
.pw-back{justify-self:start;display:inline-flex;align-items:center;gap:6px;}
.pw-header-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;}
.pw-header-actions button{font-size:13px;white-space:nowrap;}
.pw-back:hover,.pw-header-actions button:hover{background:#fff5f8;color:#a75571;}
.pw-header-actions button[data-pw-discard]{color:#a18890;}
.pw-controls{
  flex:none;
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  width:min(1100px,calc(100% - 72px));
  margin:2px auto 0;
}
.pw-controls button{
  min-height:40px;
  border:1px solid #f3d5df;
  border-radius:11px;
  padding:8px 16px;
  background:#fff8fa;
  color:#a65b75;
  font-size:13px;
  font-weight:500;
}
.pw-controls button:hover{background:#ffeef4;}
.pw-controls button[aria-pressed="true"]{background:#fce7ee;border-color:#ecb8c9;color:#9b4967;}
.pw-hint{
  flex:none;
  width:min(1100px,calc(100% - 72px));
  margin:10px auto 13px;
  color:#a099a0;
  font-size:11px;
  line-height:1.6;
}
.pw-scroll-shell{position:relative;display:flex;flex:1;min-height:0;touch-action:none;}
.pw-fixed-head{position:absolute;top:0;left:0;right:0;height:44px;overflow:hidden;z-index:5;background:#fff;touch-action:none;}
.pw-fixed-head .pw-fixed-head-track{position:absolute;top:0;height:44px;min-height:44px;border:1px solid var(--pw-pink);border-radius:0;}
.pw-fixed-head .pw-fixed-head-track>*{padding:8px 4px;overflow:hidden;white-space:nowrap;}
.pw-scroll-rail{position:absolute;top:0;bottom:0;width:24px;z-index:6;touch-action:none;background:#fff9fbbd;}
.pw-scroll-rail[data-pw-scroll-rail="left"]{left:0;}
.pw-scroll-rail[data-pw-scroll-rail="right"]{right:0;}
.pw-scroll-rail::after{content:"";position:absolute;left:50%;top:44%;width:3px;height:48px;border-radius:3px;background:#edd9e1;transform:translateX(-50%);}
.pw-scroll{
  flex:1;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  touch-action:none;
  scrollbar-width:thin;
  scrollbar-color:#efdae1 transparent;
  padding:44px 36px calc(112px + env(safe-area-inset-bottom,0px));
  background:#fff;
}
.pw-zoom-space{position:relative;flex:none;margin:0 auto;}
.pw-paper{position:absolute;left:0;top:0;width:100%;min-width:620px;margin:0;padding-left:11px;transform-origin:0 0;}
.pw-table{position:relative;border:1px solid var(--pw-pink);border-radius:15px;background:#fff;}
.pw-table-head,.pw-row{display:grid;grid-template-columns:25% 43% 22% 10%;}
.pw-table-head{
  position:sticky;
  top:0;
  z-index:4;
  min-height:47px;
  border-bottom:1px solid var(--pw-pink);
  border-radius:14px 14px 0 0;
  background:#fff5f8;
  color:#825867;
  font-size:14px;
  font-weight:500;
  text-align:center;
}
.pw-table-head>*{display:flex;align-items:center;justify-content:center;padding:11px 14px;min-width:0;}
.pw-table-head>*+*{border-left:1px solid var(--pw-pink);}
.pw-row{position:relative;height:88px;min-height:88px;border-bottom:1px solid var(--pw-pink);background:#fff;}
.pw-row:last-child{border-bottom:0;border-radius:0 0 14px 14px;}
.pw-cell{position:relative;display:flex;align-items:center;min-width:0;min-height:0;overflow:hidden;}
.pw-cell+.pw-cell{border-left:1px solid var(--pw-pink);}
.pw-cell-text{display:block;max-width:100%;max-height:100%;overflow:hidden;overflow-wrap:anywhere;line-height:1.65;}
.pw-maskable{
  position:relative;
  display:flex;
  align-items:center;
  width:100%;
  height:100%;
  min-width:0;
  overflow:hidden;
  border:0;
  border-radius:0;
  padding:13px 19px;
  background:transparent;
  color:var(--pw-text);
  font-size:17px;
  text-align:left;
  user-select:none;
  -webkit-user-select:none;
}
.pw-word .pw-maskable{font-size:20px;font-weight:500;letter-spacing:-.025em;}
.pw-word .pw-cell-text{font-family:var(--reading-font-family,'IBM Plex Sans KR',sans-serif);}
.pw-maskable[data-hidden="true"] .pw-cell-text{visibility:hidden;}
.pw-maskable[data-hidden="true"]::after{
  content:"";
  position:absolute;
  inset:14px 10px;
  border:1px solid #f9d9e4;
  border-radius:8px;
  background-color:#fbdce7;
  background-image:repeating-linear-gradient(132deg,transparent 0 5px,#ffffff54 5px 6px);
  box-shadow:inset 0 1px 0 #ffffff80;
  pointer-events:none;
}
.pw-maskable:hover::after{border-color:#efb7ca;}
.pw-pronunciation{padding:13px 17px 27px;color:#737985;font-size:15px;line-height:1.65;}
.pw-pronunciation .pw-cell-text{font-family:var(--ui-font-family,sans-serif);}
.pw-edit-button{position:absolute;right:8px;bottom:2px;min-width:34px;min-height:28px;padding:3px 6px;border:0;border-radius:7px;background:transparent;color:#baa4ae;font-size:10px!important;line-height:1.4;}
.pw-edit-button:hover{background:#fff0f5;color:#a75571;}
.pw-check{justify-content:center;padding:10px;}
.pw-check-button{
  display:flex;
  justify-content:center;
  align-items:center;
  width:29px;
  height:29px;
  padding:0;
  border:1.5px solid #d7d9df;
  border-radius:7px;
  background:#fff;
  color:transparent;
  font-size:18px;
  line-height:1;
  font-weight:600;
}
.pw-check-button:hover{border-color:#c08ba0;background:#fff7fa;}
.pw-check-button[aria-pressed="true"]{background:#aeb2ba;border-color:#aeb2ba;color:#fff;}
.pw-band{position:absolute;left:-12px;top:-1px;bottom:0;width:9px;background:var(--pw-band,#c9f0de);pointer-events:none;}
.pw-band.pw-band-start{border-top-left-radius:6px;border-top-right-radius:6px;top:0;}
.pw-band.pw-band-end{border-bottom-left-radius:6px;border-bottom-right-radius:6px;bottom:1px;}
.pw-row.pw-checked{border-color:#e3e5e9;background:#fafafa;}
.pw-row.pw-checked .pw-cell{border-color:#e3e5e9;}
.pw-row.pw-checked .pw-maskable,.pw-row.pw-checked .pw-pronunciation{color:#999da5;}
.pw-row.pw-checked .pw-maskable[data-hidden="true"]::after{border-color:#e5e6e9;background-color:#eceef1;background-image:repeating-linear-gradient(132deg,transparent 0 5px,#ffffff65 5px 6px);}
.pw-meaning-details{position:absolute;right:8px;bottom:2px;min-height:28px;padding:3px 6px;border:0;border-radius:7px;background:#fff;color:#a75571;font-size:10px!important;}
.pw-ink{position:absolute;inset:0;z-index:2;width:100%;height:100%;overflow:hidden;pointer-events:none;}
.pw-empty{padding:60px 20px;text-align:center;color:#99909a;font-size:14px;line-height:1.8;}
.pw-toolbar{
  position:absolute;
  z-index:6;
  left:50%;
  bottom:calc(20px + env(safe-area-inset-bottom,0px));
  transform:translateX(-50%);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:5px;
  width:max-content;
  max-width:calc(100% - 32px);
  min-height:57px;
  padding:7px 12px;
  border:1px solid #efe8ec;
  border-radius:24px;
  background:#ffffffed;
  box-shadow:0 5px 24px #4931420d,0 2px 7px #49314205;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  user-select:none;
  -webkit-user-select:none;
}
.pw-toolbar.pw-toolbar-positioned{bottom:auto;transform:none;}
.pw-toolbar{max-height:calc(100% - 16px);overflow-y:auto;}
.pw-toolbar .pw-toolbar-grip{min-width:30px;padding:5px;color:#bba5af;font-size:23px;cursor:grab;touch-action:none;}
.pw-toolbar .pw-toolbar-grip.pw-toolbar-dragging{cursor:grabbing;background:#fff0f5;}
.pw-toolbar button{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:5px;
  min-width:38px;
  min-height:38px;
  padding:7px 10px;
  border:0;
  border-radius:13px;
  background:transparent;
  color:#848996;
  font-size:14px;
}
.pw-toolbar button:hover{background:#fff3f7;color:#b76483;}
.pw-toolbar button[aria-pressed="true"]{background:#fff0f5;color:#c26b8c;}
.pw-toolbar .pw-tool-label{font-size:12px;white-space:nowrap;}
.pw-toolbar select{min-height:33px;max-width:96px;padding:4px 5px;border:0;border-left:1px solid #eee7eb;border-radius:0;background:transparent;color:#8f8490;font-size:12px;}
.pw-toolbar .pw-color{
  min-width:27px;
  width:27px;
  min-height:27px;
  height:27px;
  margin:0 1px;
  padding:5px;
  border:1px solid transparent;
  border-radius:50%;
  background:transparent;
  color:var(--pw-color,#367b68);
}
.pw-color::after{content:"";width:14px;height:14px;border-radius:50%;background:var(--pw-color,#367b68);}
.pw-toolbar .pw-color[aria-pressed="true"]{border-color:var(--pw-color,#367b68);background:#fff;}
.pw-toolbar-separator{width:1px;height:22px;margin:0 4px;background:#eee7eb;}
.pw-resume{
  position:fixed;
  z-index:930;
  left:calc(17px + env(safe-area-inset-left,0px));
  bottom:calc(18px + env(safe-area-inset-bottom,0px));
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:43px;
  max-width:calc(100% - 32px);
  padding:10px 16px;
  border:1px solid #f0c6d5;
  border-radius:24px;
  background:#fff5f9;
  color:#a95575;
  font:500 13px/1.5 var(--ui-font-family,sans-serif);
  box-shadow:0 4px 18px #72405710;
  cursor:pointer;
}
.pw-resume:hover{background:#ffedf4;}
body.pw-open .pw-resume{display:none!important;}
.pw-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;padding:13px 15px;border:1px solid #f1d4df;border-radius:13px;background:#fff9fb;}
.pw-entry small{display:block;margin-top:3px;color:#9f8992;font-size:12px;}
@media(min-width:1300px){
  .pw-header{padding-right:max(36px,calc((100vw - 1130px)/2));padding-left:max(36px,calc((100vw - 1130px)/2));}
}
@media(max-width:700px){
  .pw-fixed-head .pw-fixed-head-track{font-size:12px;}
  .pw-scroll-rail{width:16px;}
  .pw-header{min-height:88px;padding:calc(12px + env(safe-area-inset-top,0px)) 14px 9px;gap:6px;row-gap:4px;grid-template-columns:1fr auto 1fr;}
  .pw-header h2{font-size:21px;}
  .pw-header .pw-save-status{font-size:10px;}
  .pw-header-actions{gap:0;flex-wrap:nowrap;}
  .pw-header-meta{gap:7px;}
  .pw-header .pw-header-meta .pw-save-status{flex-basis:108px;}
  .pw-progress{font-size:10px;padding:3px 7px;}
  .pw-back,.pw-header-actions button{padding:7px;min-height:36px;font-size:11px;}
  .pw-controls,.pw-hint{width:calc(100% - 36px);}
  .pw-controls{gap:6px;}
  .pw-controls button{min-height:35px;padding:6px 11px;font-size:12px;border-radius:9px;}
  .pw-hint{font-size:10px;margin:8px auto 11px;}
  .pw-scroll{padding-left:18px;padding-right:18px;padding-bottom:calc(126px + env(safe-area-inset-bottom,0px));}
  .pw-row{height:82px;min-height:82px;}
  .pw-maskable{padding:11px 13px;font-size:15px;}
  .pw-word .pw-maskable{font-size:18px;}
  .pw-pronunciation{padding:11px 12px 27px;font-size:14px;}
  .pw-toolbar{bottom:calc(12px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 24px);gap:2px;padding:6px 8px;border-radius:21px;}
  .pw-toolbar button{min-width:33px;min-height:35px;padding:6px 7px;}
  .pw-toolbar .pw-tool-label{font-size:11px;}
  .pw-toolbar-separator{margin:0 2px;}
}
@media(max-width:360px){
  .pw-search-wide{display:none;}
  .pw-search-compact{display:inline;}
  .pw-header-actions button{padding-left:3px;padding-right:3px;}
}
@media(prefers-reduced-motion:reduce){.preliminary-worksheet *{scroll-behavior:auto!important;}}
