/* Luno 綸諾｜原卷直上的畫面樣式。2026-10-21 從 index.html 原樣拆出，檔案順序見 index.html 底部 */

  /* 卷面容器：所有作答區都用百分比定位在影像上，換螢幕寬度不用重算座標 */
  /* 作答控制項的尺寸一律用 em，跟著卷面寬度縮放：卷子在手機上本來就縮小了，
     選項按鈕若維持固定 34px，就會脹得比作答框還大、壓到下一題（實測踩過） */
  .pp-stage { position: relative; display: block; width: 100%; margin: 0 auto 18px; background: #fff;
              box-shadow: 0 2px 10px rgba(0,0,0,.12); border-radius: 6px; overflow: hidden;
              touch-action: manipulation; font-size: clamp(9px, 2.4vw, 15px); }
  .pp-stage > img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
  .pp-region { position: absolute; box-sizing: border-box; border: 2px solid #10b981;
               background: rgba(16,185,129,.10); border-radius: 4px; }
  .pp-region.pp-hand { border-color: #6366f1; background: rgba(99,102,241,.08); }
  .pp-region.pp-fill { border-color: #f59e0b; background: rgba(245,158,11,.08); }
  .pp-region.sel { border-width: 3px; border-color: #ef4444; background: rgba(239,68,68,.10); z-index: 5; }
  /* 編輯模式的框要能拖，作答模式的框不能拖（免得學生把題目拖走） */
  .pp-edit .pp-region { cursor: move; touch-action: none; }
  .pp-region .pp-no { position: absolute; top: -1px; left: -1px; background: #10b981; color: #fff;
                      font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 4px 0 4px 0; pointer-events: none; }
  .pp-region .pp-grip { position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px;
                        background: #fff; border: 2px solid #ef4444; border-radius: 50%; cursor: nwse-resize; touch-action: none; }
  /* 學生端：作答控制項疊在框裡 */
  .pp-ans { position: absolute; box-sizing: border-box; display: flex; align-items: center; flex-wrap: wrap; }
  .pp-opt { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2em; height: 2.2em;
            margin: .1em; padding: 0 .4em; border: 2px solid #cbd5e1; border-radius: .5em; background: #fff;
            font-weight: 700; color: #334155; cursor: pointer; font-size: 1em; line-height: 1; }
  .pp-opt.on { background: #10b981; border-color: #059669; color: #fff; }
  .pp-fillbox { box-sizing: border-box; width: 100%; height: 100%; min-height: 2em;
                border: 2px solid #f59e0b; border-radius: .4em;
                background: rgba(255,255,255,.92); padding: .2em .5em; font-size: 1em; }
  .pp-handcanvas, .pp-bigcanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
  .pp-tool { padding: 6px 10px; border: 2px solid #e5e7eb; border-radius: 8px; background: #fff;
             font-size: 13px; font-weight: 700; color: #475569; cursor: pointer; }
  .pp-tool.on { background: #6366f1; border-color: #4f46e5; color: #fff; }
  .pp-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
  .pp-btn { padding: 10px 16px; border-radius: 10px; font-weight: 700; border: 2px solid transparent; cursor: pointer; }
  .pp-btn-main { background: #10b981; color: #fff; }
  .pp-btn-ghost { background: #fff; color: #475569; border-color: #e5e7eb; }
  .pp-in { border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px 8px; font-size: 14px; }

  /* 手機作答（2026-11-05）：放大卷面可橫向捲動；選項點擊範圍加大；輸入框 16px 以上，iOS 才不會一點就自動縮放 */
  .pp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pp-scroll.pp-zoom .pp-stage { width: 900px; max-width: none; }
  .pp-opt { position: relative; touch-action: manipulation; }
  .pp-opt::after { content: ''; position: absolute; inset: -6px; }
  .pp-fillbox { font-size: 16px; }

  /* 手機簡答面板（paper-focus.js）：底部滑出，上方原題裁切、下方大輸入框；卷面是「紙」，永遠淺色 */
  .pp-focus-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.45); }
  .pp-focus-box { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; color: #1f2937;
    border-radius: 16px 16px 0 0; padding: 0 16px 12px; box-shadow: 0 -6px 24px rgba(0,0,0,.2);
    animation: ppFocusUp .25s ease-out; }
  @keyframes ppFocusUp { from { transform: translateY(100%); } to { transform: none; } }
  @media (prefers-reduced-motion: reduce) { .pp-focus-box { animation: none; } }
  .pp-focus-head { display: flex; align-items: center; justify-content: space-between; height: 48px; }
  .pp-focus-done-top { min-width: 56px; min-height: 44px; border: 0; background: transparent; color: #1a73e8; font-size: 16px; font-weight: 700; }
  .pp-focus-crop { position: relative; height: 120px; overflow: hidden; border-radius: 8px; background-color: #f3f4f6; background-repeat: no-repeat; border: 1px solid #e5e7eb; }
  .pp-focus-mark { position: absolute; box-sizing: border-box; border: 2px solid #1a73e8; background: rgba(26,115,232,.12); border-radius: 4px; }
  .pp-focus-input { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; min-height: 76px; max-height: 150px; padding: 10px 12px;
    font: inherit; font-size: 16px; line-height: 1.5; color: #1f2937; background: #f9fafb; border: 1.5px solid #d1d5db; border-radius: 8px; resize: none; }
  .pp-focus-input:focus { outline: none; border-color: #1a73e8; }
  .pp-focus-hand { position: relative; margin: 10px auto 0; border: 2px solid #6366f1; border-radius: 8px; background-color: #fff; background-repeat: no-repeat; overflow: hidden; }
  .pp-focus-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
  .pp-focus-done { width: 100%; min-height: 44px; margin-top: 10px; border: 0; border-radius: 10px; background: #1a73e8; color: #fff; font-size: 16px; font-weight: 700; }
