/* Result page "แบบ D" — translated from Paper file 01M7HCSX8PA6B4BTCTC3DAK1MS,
   p-3-0 "06 ผลลัพธ์ · Final (แบบ D)" Desktop 28W-0 / Mobile 2D1-0 (same as p-1-0 ED-0 / BG-0).
   Desktop is the default; phone values sit in @media (max-width:760px). Every rule is scoped
   to #app.f-result-page so it outranks style/design/unslop/final.css. */

/* ---------- Page (artboard) ---------- */
body:has(#app.f-result-page){background:#fff}
#app.f-result-page.f-result-page{max-width:none;width:100%;margin:0;padding:26px 0 48px;overflow:clip;
  background:linear-gradient(rgb(227,235,241) 1px,transparent 1px) 0 0/24px 24px,linear-gradient(90deg,rgb(227,235,241) 1px,transparent 1px) 0 0/24px 24px,#fff}
#app.f-result-page .result-top.f-result{position:relative;display:flex;flex-direction:column;align-items:center;gap:0;max-width:none;width:100%;margin:0;padding:0;background:none;border:0;overflow:visible;text-align:left;min-height:0}

/* Rays (1600×1600, centred on the page, top −620 from the artboard = −646 from .result-top) + confetti bits (1440×419 at artboard 0,0) */
#app.f-result-page .f-result .hero-rays{position:absolute;left:50%;top:-646px;width:1600px;height:1600px;margin:0 0 0 -800px;border-radius:0;z-index:0;pointer-events:none;
  -webkit-mask-image:none;mask-image:none;opacity:0;animation:none;transition:opacity .6s;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1600' viewBox='0 0 1600 1600'%3E%3Cdefs%3E%3CradialGradient id='g' cx='800' cy='800' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0.15' stop-color='%23ffc83d' stop-opacity='0.55'/%3E%3Cstop offset='0.75' stop-color='%23ffc83d' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M800 800L1600 800L1590 925ZM800 800L1552 1074L1500 1188ZM800 800L1413 1314L1325 1404ZM800 800L1200 1493L1087 1547ZM800 800L939 1588L814 1600ZM800 800L661 1588L540 1556ZM800 800L400 1493L297 1422ZM800 800L187 1314L114 1212ZM800 800L48 1074L15 953ZM800 800L0 800L10 675ZM800 800L48 526L100 412ZM800 800L187 286L275 196ZM800 800L400 107L513 53ZM800 800L661 12L786 0ZM800 800L939 12L1060 44ZM800 800L1200 107L1303 178ZM800 800L1413 286L1486 388ZM800 800L1552 526L1585 647Z' fill='url(%23g)'/%3E%3C/svg%3E") 0 0/1600px 1600px no-repeat}
#app.f-result-page .f-result .hero-rays::after{content:"";position:absolute;left:80px;top:620px;width:1440px;height:419px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='419' viewBox='0 0 1440 419'%3E%3Crect x='249.963' y='39.92' width='15.993' height='8.982' rx='2' transform='translate(42.77 -104.91) rotate(25)' fill='%23FFC83D'/%3E%3Crect x='330.148' y='119.744' width='13.992' height='7.986' rx='2' transform='translate(-16.85 185.11) rotate(-30)' fill='%232FFAFE'/%3E%3Ccircle cx='420' cy='57.862' r='5.986' fill='%23FF7A59'/%3E%3Crect x='179.618' y='189.78' width='15.971' height='8.995' rx='2' transform='translate(262.01 -65.81) rotate(60)' fill='%237CE3A0'/%3E%3Cpath d='M500 29.929l6 11.971 13 1.995-9 8.979 2 12.969-12-5.986-12 5.986 2-12.969-9-8.979 13-1.995z' fill='%23FFC83D'/%3E%3Crect x='90.05' y='79.812' width='11.998' height='6.984' rx='2' transform='translate(-18.21 27.67) rotate(-15)' fill='%23FF7A59'/%3E%3Ccircle cx='140' cy='299.286' r='4.988' fill='%23FFC83D'/%3E%3Crect x='1180.04' y='35.914' width='15.993' height='8.982' rx='2' transform='translate(94.4 505.82) rotate(-25)' fill='%237CE3A0'/%3E%3Crect x='1089.854' y='109.792' width='13.989' height='7.987' rx='2' transform='translate(263.78 -608.6) rotate(35)' fill='%23FFC83D'/%3E%3Ccircle cx='1010' cy='49.881' r='5.986' fill='%232FFAFE'/%3E%3Crect x='1300.348' y='169.757' width='15.974' height='8.993' rx='2' transform='translate(415.23 1145.65) rotate(-55)' fill='%23FF7A59'/%3E%3Cpath d='M930 19.952l6 11.972 13 1.995-9 8.979 2 12.969-12-5.986-12 5.986 2-12.969-9-8.979 13-1.995z' fill='%23FF7A59'/%3E%3Crect x='1359.944' y='69.848' width='11.997' height='6.985' rx='2' transform='translate(107.35 -462.8) rotate(20)' fill='%23FFC83D'/%3E%3Ccircle cx='1330' cy='319.238' r='4.988' fill='%237CE3A0'/%3E%3Cpath d='M60 229.452q14-13.967 28 0t28 0' fill='none' stroke='%232FFAFE' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M1370 259.381q14-13.967 28 0t28 0' fill='none' stroke='%23FFC83D' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") 0 0/1440px 419px no-repeat}
#app.f-result-page .f-result.celebrate .hero-rays{opacity:1;animation:rays-in 1.4s cubic-bezier(.22,1,.36,1) both}
@media (prefers-reduced-motion:reduce){#app.f-result-page .f-result.celebrate .hero-rays{animation:none}}

/* ---------- Ribbon title ---------- */
#app.f-result-page .result-top .f-ribbon{position:relative;z-index:2;display:flex;width:fit-content;max-width:calc(100% - 32px);margin:0 0 16px;padding:6px 40px 8px;background:#ffc83d;border:0;border-radius:16px;box-shadow:#c99516 0 5px 0;transform:rotate(-2deg);transform-origin:50% 50%;font:700 40px/52px IBM,sans-serif;letter-spacing:0;color:#273740;text-align:center}

/* ---------- Calculator body ---------- */
#app.f-result-page .result-score.f-result-calc{position:relative;z-index:1;box-sizing:border-box;width:1120px;max-width:calc(100% - 32px);display:flex;flex-direction:column;align-items:center;margin:0;padding:0 28px 28px;background:#e7e7e7;border:1px solid #d0d1d3;border-radius:48px;box-shadow:#ffffffa6 0 2px 0 inset,#b5b6b7 0 8px 0,#27374024 0 26px 48px;text-align:left}
#app.f-result-page .f-result-calc .f-cap{flex-shrink:0;width:220px;height:18px;background:#2ffafe;border-radius:0 0 12px 12px;box-shadow:#16b4c3 0 3px 0}
#app.f-result-page .f-result-calc .f-bezel{box-sizing:border-box;width:100%;min-width:0;margin:22px 0 0;padding:8px;background:#9a9a9a;border-radius:28px;box-shadow:#0000001f 0 2px 0 inset}

/* Screen */
#app.f-result-page .f-result .f-screen.f-screen{box-sizing:border-box;display:flex;flex-direction:column;gap:14px;width:100%;min-height:0;height:auto;margin:0;padding:26px!important;background:#232528;border:0;border-radius:22px;box-shadow:none;color:#fff}
#app.f-result-page .f-result .f-status{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0}
#app.f-result-page .f-result .f-status p{margin:0;font:600 18px/22px IBM,sans-serif;color:#a9b9cf}
/* Paper face glyph (eyes + smile, 60×27); the <img> asset is a different drawing, so it is painted as a background */
#app.f-result-page .f-result .f-status .calculator-face{flex-shrink:0;display:inline-block;width:60px;height:27px;margin:0;position:static;object-position:-9999px 0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 16'%3E%3Crect x='3' y='1' width='6' height='11' rx='3' fill='%232FFAFE'/%3E%3Crect x='27' y='1' width='6' height='11' rx='3' fill='%232FFAFE'/%3E%3Cpath d='M13 8q5 6 10 0' fill='none' stroke='%232FFAFE' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat}

/* Score + stat boxes */
#app.f-result-page .f-result .f-score-row{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;gap:24px;width:100%;flex-wrap:nowrap}
#app.f-result-page .f-result .big-score{display:flex;align-items:baseline;gap:10px;flex:0 0 auto;width:auto;margin:0;padding:0;font:700 170px/165px IBM,sans-serif;letter-spacing:-.03em;white-space:pre;color:#fff;-webkit-text-fill-color:#fff;background:none;text-shadow:none;animation:none}
#app.f-result-page .f-result .big-score span{margin:0;font:600 36px/44px IBM,sans-serif;letter-spacing:0;white-space:pre;color:#2ffafe;-webkit-text-fill-color:#2ffafe}
#app.f-result-page .f-result .f-stats.result-metrics{display:flex;grid-template-columns:none;gap:14px;flex:0 0 auto;width:auto;margin:0;padding:0 0 14px;border:0;background:none}
#app.f-result-page .f-result .f-stats.result-metrics>div{box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:0;flex:0 0 150px;width:150px;padding:14px 18px;border:0;border-radius:14px}
#app.f-result-page .f-result .f-stats.result-metrics>.s-good{background:#1d3a2a;box-shadow:#2f6a49 0 0 0 1px inset}
#app.f-result-page .f-result .f-stats.result-metrics>.s-blue{background:#1b3245;box-shadow:#2d5878 0 0 0 1px inset}
#app.f-result-page .f-result .f-stats.result-metrics>.s-orange{background:#3d2d1a;box-shadow:#6e4f28 0 0 0 1px inset}
#app.f-result-page .f-result .f-stats.result-metrics small{display:block;margin:0;font:600 16px/20px IBM,sans-serif!important}
#app.f-result-page .f-result .f-stats.result-metrics strong{display:block;margin:0;font:700 40px/46px IBM,sans-serif!important}
#app.f-result-page .f-result .f-stats .s-good small{color:#a9e9c2}#app.f-result-page .f-result .f-stats .s-good strong{color:#7ce3a0}
#app.f-result-page .f-result .f-stats .s-blue small{color:#b5dcf7}#app.f-result-page .f-result .f-stats .s-blue strong{color:#8fd0ff}
#app.f-result-page .f-result .f-stats .s-orange small{color:#ffd9a6}#app.f-result-page .f-result .f-stats .s-orange strong{color:#ffc070}

/* ---------- Per-question chart ---------- */
#app.f-result-page .f-result .f-chart-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;width:100%;margin:4px 0 0;font:600 17px/22px IBM,sans-serif;color:#d6e2f0}
#app.f-result-page .f-result .f-chart-head .f-slowest{font:700 16px/20px IBM,sans-serif;color:#ffb3a8}
/* plot: 200px tall, y labels 24px wide + 6px gap (= Paper paddingLeft 30) */
#app.f-result-page .f-result .f-chart{display:flex;align-items:stretch;gap:6px;width:100%;height:200px;margin:18px 0 0}
#app.f-result-page .f-result .f-ticks{flex:0 0 24px;width:24px;height:216px;margin:-9px 0 0;transform:none;display:flex;flex-direction:column;justify-content:space-between;font:400 13px/16px IBM,sans-serif;color:#8d9aab;text-align:right}
#app.f-result-page .f-result .f-ticks span{display:block;height:16px}
#app.f-result-page .f-result .f-bars{position:relative;flex:1;min-width:0;height:200px;display:flex;align-items:flex-end;justify-content:space-between;gap:0;border:0;box-shadow:#33373d 0 -1px 0;
  background:linear-gradient(#33373d,#33373d) 0 39px/100% 1px no-repeat,linear-gradient(#33373d,#33373d) 0 79px/100% 1px no-repeat,linear-gradient(#33373d,#33373d) 0 119px/100% 1px no-repeat,linear-gradient(#33373d,#33373d) 0 159px/100% 1px no-repeat,linear-gradient(#4a5058,#4a5058) 0 199px/100% 1px no-repeat}
#app.f-result-page .f-result .f-bar{flex:0 1 26px;width:26px;min-width:0;max-width:26px;height:200px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}
#app.f-result-page .f-result .f-bar i{position:relative;display:block;width:100%;flex-shrink:0;border-radius:5px 5px 2px 2px}
#app.f-result-page .f-result .f-bar.slow i{box-shadow:#232528 0 0 0 2px,#fff 0 0 0 4px}
#app.f-result-page .f-result .f-bar em{position:absolute;left:50%;bottom:100%;transform:translate(-50%,-6px);font:700 15px/16px IBM,sans-serif;font-style:normal;white-space:pre;color:#ffb3a8}
/* x labels: 6px under the plot (screen gap is 14px) */
#app.f-result-page .f-result .f-marks{display:flex;justify-content:space-between;gap:0;width:100%;margin:-8px 0 0;padding:0 0 0 30px;box-sizing:border-box;font:400 13px/16px IBM,sans-serif;color:#8d9aab}
#app.f-result-page .f-result .f-marks span{flex:0 1 26px;width:26px;min-width:0;max-width:26px;text-align:center;white-space:pre}
#app.f-result-page .f-result .f-exam-score{margin:0;font:600 16px/20px IBM,sans-serif;color:#d6e2f0}

/* ---------- Keys row: weak tables + buttons ---------- */
#app.f-result-page .f-result-keys.result-actions{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:16px;width:100%;margin:20px 0 0;padding:0}
#app.f-result-page .f-result-keys .f-weak-row{display:flex;align-items:center;gap:14px;flex:0 0 auto}
#app.f-result-page .f-result-keys .f-weak-row>span:first-child{display:inline-block;margin:0 2px 0 0;padding-left:4px;font:700 18px/22px IBM,sans-serif;color:#5f7179}
#app.f-result-page .f-result-keys .f-weak-key{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:84px;height:84px;min-height:0;padding:0;border:0;border-radius:50%;background:var(--heat-bg);color:var(--heat-fg);box-shadow:var(--heat-edge) 0 5px 0;font:700 28px/34px IBM,sans-serif}
#app.f-result-page .f-result-keys .f-start.f-start{flex:1 1 0%;min-width:240px;width:auto;height:80px;min-height:80px;margin:0;padding:0 16px;border:0;border-radius:22px;background:#ffc83d;box-shadow:#c99516 0 6px 0;font:700 26px/32px IBM,sans-serif;color:#273740;white-space:normal;text-align:center}
#app.f-result-page .f-result-keys .f-btn.f-btn{flex:0 0 190px;width:190px;height:68px;min-height:68px;margin:0;padding:0 12px;border:0;border-radius:18px;background:#fdf8ec;box-shadow:#b7b7b7 0 4px 0;font:700 20px/24px IBM,sans-serif;color:#273740;text-align:center}
#app.f-result-page .f-result-keys .f-btn.f-btn[data-action="copy-result"],#app.f-result-page .f-result-keys .f-btn.f-btn.ghost{background:#eceff4;box-shadow:#b7bcc4 0 4px 0}
#app.f-result-page .f-result-keys .f-start.f-start:active{transform:translateY(5px);box-shadow:#c99516 0 1px 0}
#app.f-result-page .f-result-keys .f-btn.f-btn:active{transform:translateY(3px);box-shadow:#b7b7b7 0 1px 0}

/* ---------- "สถิติใหม่" sticker: 150×150, rotate 12deg about top-left, 27px inside the body's right edge, 3px below its top ---------- */
#app.f-result-page .f-result-calc .f-sticker{position:absolute;z-index:3;left:calc(100% - 27px);right:auto;top:3px;width:150px;height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;clip-path:none;transform:rotate(12deg);transform-origin:0 0;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 150'%3E%3Cpath d='M75 4 L88 22 L109 14 L113 36 L135 40 L127 61 L146 75 L127 89 L135 110 L113 114 L109 136 L88 128 L75 146 L62 128 L41 136 L37 114 L15 110 L23 89 L4 75 L23 61 L15 40 L37 36 L41 14 L62 22 Z' fill='%23FF5A3C' stroke='%23FFFFFF' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat}
#app.f-result-page .f-result-calc .f-sticker b{display:block;font:700 22px/26px IBM,sans-serif;color:#fff}
#app.f-result-page .f-result-calc .f-sticker small{display:block;font:600 15px/20px IBM,sans-serif;color:#fff3c4}

/* ---------- Not in Paper: keep existing look, align to the 1120 column ---------- */
#app.f-result-page .result-comparison{position:relative;z-index:1}
#app.f-result-page>.sample-banner,#app.f-result-page>.result-disclaimer{max-width:1120px;margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px}
#app.f-result-page>.review{box-sizing:border-box;width:1120px;max-width:calc(100% - 32px);margin:24px auto 0}

/* ---------- Between phone and the 1440 artboard ---------- */
@media (max-width:1400px) and (min-width:761px){
  /* keep the sticker inside the page instead of letting #app clip it */
  #app.f-result-page .f-result-calc .f-sticker{left:calc(100% - 150px);top:-30px}
}
@media (max-width:1100px) and (min-width:761px){
  #app.f-result-page .f-result .f-score-row{flex-wrap:wrap}
  #app.f-result-page .f-result .big-score{font-size:140px;line-height:140px}
}

/* ---------- Phone (Paper 390 artboard; its iOS status bar maps to the site top bar) ---------- */
@media (max-width:760px){
  #app.f-result-page.f-result-page{padding:0 0 32px}
  #app.f-result-page .f-result .hero-rays{top:-762px}
  #app.f-result-page .f-result .hero-rays::after{top:710px}

  #app.f-result-page .result-top .f-ribbon{margin:4px 0 12px;padding:4px 26px 6px;border-radius:14px;box-shadow:#c99516 0 4px 0;font-size:26px;line-height:36px}

  #app.f-result-page .result-score.f-result-calc{width:358px;max-width:calc(100% - 32px);padding:0 12px 16px;border-radius:36px;box-shadow:#ffffffa6 0 2px 0 inset,#b5b6b7 0 7px 0,#27374024 0 22px 40px}
  #app.f-result-page .f-result-calc .f-cap{width:120px;height:14px;border-radius:0 0 10px 10px}
  #app.f-result-page .f-result-calc .f-bezel{margin-top:12px;padding:8px;border-radius:24px}
  #app.f-result-page .f-result .f-screen.f-screen{gap:10px;padding:14px!important;border-radius:18px}
  #app.f-result-page .f-result .f-status p{font-size:13px;line-height:16px}
  #app.f-result-page .f-result .f-status .calculator-face{width:44px;height:20px}

  #app.f-result-page .f-result .f-score-row{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:10px}
  #app.f-result-page .f-result .big-score{flex-wrap:wrap;font-size:96px;line-height:98px}
  #app.f-result-page .f-result .big-score span{font-size:24px;line-height:30px}
  #app.f-result-page .f-result .f-stats.result-metrics{width:100%;gap:8px;padding:0}
  #app.f-result-page .f-result .f-stats.result-metrics>div{flex:1 1 0%;width:auto;min-width:0;padding:8px 10px;border-radius:10px}
  #app.f-result-page .f-result .f-stats.result-metrics small{font-size:12px!important;line-height:16px!important}
  #app.f-result-page .f-result .f-stats.result-metrics strong{font-size:22px!important;line-height:26px!important}

  #app.f-result-page .f-result .f-chart-head{margin-top:2px;font-size:13px;line-height:16px}
  #app.f-result-page .f-result .f-chart-head .f-slowest{font-size:12px;line-height:16px}
  #app.f-result-page .f-result .f-chart{height:118px;margin-top:14px;gap:6px}
  #app.f-result-page .f-result .f-ticks{flex-basis:18px;width:18px;height:134px;font-size:11px}
  #app.f-result-page .f-result .f-bars{height:118px;
    background:linear-gradient(#33373d,#33373d) 0 23px/100% 1px no-repeat,linear-gradient(#33373d,#33373d) 0 46px/100% 1px no-repeat,linear-gradient(#33373d,#33373d) 0 70px/100% 1px no-repeat,linear-gradient(#33373d,#33373d) 0 93px/100% 1px no-repeat,linear-gradient(#4a5058,#4a5058) 0 117px/100% 1px no-repeat}
  #app.f-result-page .f-result .f-bar{flex-basis:10px;width:10px;max-width:10px;height:118px}
  #app.f-result-page .f-result .f-bar i{border-radius:3px 3px 2px 2px}
  #app.f-result-page .f-result .f-bar em{font-size:12px;line-height:16px}
  #app.f-result-page .f-result .f-marks{margin-top:-4px;padding-left:24px;font-size:11px;line-height:14px}
  #app.f-result-page .f-result .f-marks span{flex-basis:10px;width:10px;max-width:10px}

  #app.f-result-page .f-result-keys.result-actions{gap:10px;margin-top:14px}
  #app.f-result-page .f-result-keys .f-weak-row{flex:1 1 100%;gap:10px}
  #app.f-result-page .f-result-keys .f-weak-row>span:first-child{flex:1 1 0%;margin:0;font-size:14px;line-height:18px}
  #app.f-result-page .f-result-keys .f-weak-key{width:54px;height:54px;box-shadow:var(--heat-edge) 0 4px 0;font-size:18px;line-height:22px}
  #app.f-result-page .f-result-keys .f-start.f-start{flex:1 1 100%;min-width:0;height:56px;min-height:56px;border-radius:18px;box-shadow:#c99516 0 5px 0;font-size:19px;line-height:24px}
  #app.f-result-page .f-result-keys .f-btn.f-btn{flex:1 1 calc(50% - 5px);width:auto;height:50px;min-height:50px;border-radius:16px;font-size:16px;line-height:20px}

  #app.f-result-page .f-result-calc .f-sticker{left:calc(100% - 77px);top:-25px;width:100px;height:100px}
  #app.f-result-page .f-result-calc .f-sticker b{font-size:15px;line-height:18px}
  #app.f-result-page .f-result-calc .f-sticker small{font-size:11px;line-height:14px}
}
