/* Focused flashcard layout inspired by the supplied mobile references. */
body.dark.study-active{background:#15110f}
body:not(.dark).study-active{background:#f6f2ee}
body.study-active main{background:transparent}
.study-screen{--study-card:#211c19;--study-text:#f4ede6;--study-muted:#9d9189;--study-border:#403732;--study-pill:#302a27;max-width:720px;min-height:100dvh;padding:54px 28px 120px;color:var(--study-text)}
body:not(.dark) .study-screen{--study-card:#fffaf6;--study-text:#332923;--study-muted:#847a73;--study-border:#d8cec7;--study-pill:#eee7e0}
.study-header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.study-header h1{font:700 clamp(30px,3vw,38px)/1.12 Georgia,'Times New Roman',serif;letter-spacing:-.8px;margin:0 0 6px}
.study-header p{color:var(--study-muted);font-size:15px;letter-spacing:.1px;margin:0}
.study-header-actions{display:flex;align-items:center;gap:9px;flex:none}
.study-direction,.study-help summary{height:42px;border-radius:999px;border:1px solid var(--study-border);background:var(--study-pill);color:var(--study-text);display:grid;place-items:center;box-shadow:inset 0 1px rgba(255,255,255,.07)}
.study-direction{min-width:76px;padding:0 14px;font-size:13px}
.study-help{position:relative}
.study-help summary{width:42px;list-style:none;cursor:pointer;font-size:17px}
.study-help summary::-webkit-details-marker,.study-options summary::-webkit-details-marker{display:none}
.study-help[open] summary,.study-options[open] summary{border-color:#c77767;color:#e8a091}
.study-help p{position:absolute;right:0;top:52px;z-index:55;width:min(270px,calc(100vw - 40px));border:1px solid var(--study-border);border-radius:17px;background:var(--study-card);box-shadow:0 16px 35px rgba(0,0,0,.28);padding:16px;color:var(--study-text);font-size:12px;line-height:1.55}
.study-stage{max-width:590px;margin:95px auto 0}
.study-card{position:relative;min-height:389px;display:flex;flex-direction:column;align-items:center;border:1px solid var(--study-border);border-radius:30px;background:var(--study-card);padding:18px 21px 24px;text-align:center;box-shadow:0 4px 0 rgba(0,0,0,.08),0 22px 50px rgba(0,0,0,.14);touch-action:pan-y;animation:cardArrive 200ms var(--ease-out) both}
.study-card.swipe-left{background:#3b1b1c}.study-card.swipe-right{background:#193425}
body:not(.dark) .study-card.swipe-left{background:#f9e0de}body:not(.dark) .study-card.swipe-right{background:#e1f5e9}
.study-card-top{width:100%;min-height:27px;display:flex;justify-content:center;align-items:center;gap:6px;position:relative;padding:0 26px}
.study-tag,.study-level,.study-repeat{border-radius:100px;padding:5px 10px;line-height:1;font-size:11px;white-space:nowrap}
.study-tag{background:#312b28;color:#afa39b}.study-level{background:#10382a;color:#19c789}.study-repeat{background:#57403d;color:#d89183}
body:not(.dark) .study-tag{background:#eee7e0;color:#786d66}body:not(.dark) .study-level{background:#dff3e8;color:#008c5c}body:not(.dark) .study-repeat{background:#f9e2dc;color:#a95c4f}
.study-options{position:absolute;right:0;top:-2px;z-index:40}
.study-options summary{width:29px;height:31px;list-style:none;display:grid;place-items:center;cursor:pointer;color:var(--study-muted);border:1px solid transparent;border-radius:10px;font-size:19px}
.study-options-popover{position:absolute;right:0;top:38px;width:215px;display:grid;gap:11px;padding:15px;border:1px solid var(--study-border);border-radius:18px;background:var(--study-card);box-shadow:0 18px 36px rgba(0,0,0,.32);text-align:left}
.study-options-popover label{display:grid;gap:5px;color:var(--study-muted);font-size:11px}
.study-options-popover select,.study-shuffle{width:100%;border:1px solid var(--study-border);border-radius:11px;background:var(--study-pill);color:var(--study-text);padding:9px 10px;font-size:12px}
.study-shuffle{display:flex;gap:7px;align-items:center;justify-content:center}
.study-word-wrap{width:100%;margin-top:14px}
.study-word{font:700 clamp(42px,6vw,55px)/1.1 Georgia,'Times New Roman',serif;letter-spacing:-1.2px;overflow-wrap:anywhere}
.study-ipa{font:16px/1.2 Georgia,'Times New Roman',serif;color:var(--study-muted);min-height:20px;margin-top:12px}
.study-audio{width:max-content;display:flex;align-items:center;justify-content:center;margin:20px auto 0;padding:0 13px;border-radius:100px;background:#472922;color:#dc8f7d}
body:not(.dark) .study-audio{background:#f6dfd8;color:#a55648}
.study-audio button{height:39px;display:flex;align-items:center;gap:7px;padding:0 8px;border:0;background:none;color:inherit;font-size:15px}
.study-audio .fi{font-size:15px}.study-audio>span{width:1px;height:23px;background:currentColor;opacity:.38;margin:0 4px}
.study-card-bottom{width:100%;display:flex;flex-direction:column;align-items:center;margin-top:auto}
.study-example{font:italic 15px/1.45 Georgia,'Times New Roman',serif;color:var(--study-muted);margin:16px 0 14px;min-height:22px}
.study-divider{width:100%;height:1px;background:var(--study-border);opacity:.55;margin-bottom:14px}
.study-reveal,.study-hint{display:flex;align-items:center;justify-content:center;gap:9px;height:43px;border-radius:100px;font-size:15px}
.study-reveal{min-width:225px;padding:0 18px;border:0;background:var(--study-pill);color:var(--study-text)}
.study-hint{min-width:165px;height:40px;margin-top:10px;padding:0 16px;border:1px solid var(--study-border);background:transparent;color:var(--study-text)}
.study-reveal .fi,.study-hint .fi{font-size:16px}
.study-translation{font-size:18px;font-weight:700;color:#e6a092;margin:-4px 0 11px}.study-hint-copy{margin:9px 0 0;color:var(--study-muted);font-size:12px}
.study-answer-row{display:flex;align-items:center;gap:10px;width:100%;margin-top:18px}
.study-answer-row button{height:52px;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:100px;font-size:16px;font-weight:700;white-space:nowrap}
.study-answer-row .fi{font-size:18px}.study-again,.study-know{flex:1;min-width:0;padding:0 9px}
.study-again{background:#46191b;color:#ff656a}.study-know{background:#103921;color:#16d582}
.study-undo{flex:0 0 52px;background:#261f1d;color:#a49a94}.study-undo:disabled{opacity:.44;cursor:default}
body:not(.dark) .study-again{background:#f9dedd;color:#c9434b}body:not(.dark) .study-know{background:#d9f5e4;color:#078c54}body:not(.dark) .study-undo{background:#eae2db;color:#756c66}
.study-empty{min-height:389px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid var(--study-border);border-radius:30px;background:var(--study-card);padding:28px;text-align:center}
.study-empty-icon{width:55px;height:55px;border-radius:50%;background:#103921;color:#16d582;display:grid;place-items:center;font-size:23px}
.study-empty h2{font:700 28px Georgia,'Times New Roman',serif;margin:18px 0 5px}.study-empty p{color:var(--study-muted);font-size:13px;margin:0 0 18px}.study-empty-link,.study-continue{border:0;border-radius:100px;background:#472922;color:#e0a08f;padding:13px 20px;font-size:13px;font-weight:700}.study-continue{display:flex;align-items:center;gap:8px}
.study-empty-select{display:grid;gap:6px;color:var(--study-muted);font-size:12px;margin:16px 0}.study-empty-select select{background:var(--study-pill);border:1px solid var(--study-border);color:var(--study-text);border-radius:12px;padding:9px 12px}
@media(max-width:730px){
  body.study-active main{padding:0}
  .study-screen{padding:72px 20px 108px;max-width:none}
  .study-header h1{font-size:31px}
  .study-header p{font-size:13px}
  .study-stage{margin-top:81px}
  body.study-active .mobile-nav{left:0;right:0;bottom:0;width:100%;max-width:none;margin:0;border-radius:0;border:0;border-top:1px solid #413731;background:rgba(28,21,18,.96);box-shadow:none;padding:14px 2px max(32px,env(safe-area-inset-bottom))}
  body.study-active .mobile-nav button{color:#968c85;padding:2px 0}
  body.study-active .mobile-nav button.active{color:#dc705e}
  body.study-active .mobile-nav small{font-size:10px;margin-top:5px}
  body:not(.dark).study-active .mobile-nav{background:rgba(255,250,246,.97);border-top-color:#d8cec7}
}
@media(max-width:480px){
  .study-screen{padding-left:20px;padding-right:20px}
  .study-card{min-height:389px;padding:18px 19px 22px}
  .study-header-actions{gap:8px}.study-direction{min-width:68px;padding:0 10px}.study-help summary{width:40px;height:40px}
  .study-card-top{gap:5px}.study-tag,.study-level,.study-repeat{font-size:10px;padding:5px 8px}
  .study-word{font-size:49px}
  .study-ipa{margin-top:10px}
  .study-example{font-size:14px}
  .study-answer-row button{font-size:14px}.study-answer-row .fi{font-size:16px}
  .study-undo{flex-basis:47px}
}
@media(max-width:350px){.study-screen{padding-left:13px;padding-right:13px}.study-header h1{font-size:27px}.study-header p{font-size:11px}.study-direction{min-width:57px;font-size:11px}.study-help summary{width:36px;height:36px}.study-answer-row{gap:5px}.study-undo{flex-basis:40px}.study-answer-row button{font-size:12px}body.study-active .mobile-nav small{font-size:8px}body.study-active .mobile-nav .fi{font-size:19px}}
@media(max-width:480px) and (max-height:740px){.study-screen{padding-top:50px}.study-stage{margin-top:48px}.study-card,.study-empty{min-height:365px}.study-answer-row{margin-top:14px}}
@media(prefers-reduced-motion:reduce){.study-card{animation:none!important}}
