.enchant-practice { min-width:0; scroll-margin-top:calc(var(--nav-h,70px) + 16px); }
.ep-jump { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:8px 13px; margin-top:14px; font-size:12px; text-decoration:none; }
.ep-jump img { object-fit:contain; }
.ep-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.ep-heading .kicker { margin:0 0 4px; }
.ep-heading h2 { margin:0; }
.ep-local { flex:none; border:1px solid #53425f; border-radius:20px; padding:4px 11px; font-size:11px; color:#c8b7d7; }
.ep-intro { color:var(--muted); max-width:80ch; }
.ep-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 16px; margin:18px 0 12px; }
.ep-toolbar button { flex:none; min-height:44px; margin:0; padding:9px 16px; font-size:12px; }
.ep-toolbar p { flex:1 1 240px; margin:0; color:#b8a8c5; font-size:11px; line-height:1.8; }
.ep-workbench { display:grid; grid-template-columns:minmax(230px,.9fr) minmax(0,1.1fr); gap:14px; margin-top:20px; }
.ep-window { min-width:0; padding:20px; border:1px solid #4b3b58; border-radius:12px; background:linear-gradient(150deg,#211a2a,#15121b 80%); }
.ep-window .ep-window-title { margin:0; font-size:16px; color:#eee3f5; }
.ep-window-subtitle { margin:3px 0 18px; color:#ab9ab6; font-size:11px; }
.ep-paper { display:grid; grid-template-columns:repeat(3,minmax(0,76px)); grid-template-rows:repeat(4,86px); justify-content:center; gap:6px 10px; padding:5px 0 12px; }
.ep-equip-slot { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; border:1px solid #332b3c; border-radius:7px; background:#141019; }
.ep-paper .ep-equip-slot { margin:0; padding:0; font:inherit; min-height:0; color:inherit; }
.ep-paper .ep-equip-slot:disabled { opacity:1; cursor:default; }
.ep-paper .ep-equip-slot.is-equipped { cursor:pointer; }
.ep-equip-slot[data-slot="head"] { grid-area:1/2; }
.ep-equip-slot[data-slot="main_hand"] { grid-area:2/1; }
.ep-equip-slot[data-slot="chest"] { grid-area:2/2; }
.ep-equip-slot[data-slot="off_hand"] { grid-area:2/3; }
.ep-equip-slot[data-slot="hands"] { grid-area:3/1; }
.ep-equip-slot[data-slot="pants"] { grid-area:3/2; }
.ep-equip-slot[data-slot="back"] { grid-area:3/3; }
.ep-equip-slot[data-slot="boots"] { grid-area:4/2; }
.ep-equip-picture { position:relative; display:flex; align-items:center; justify-content:center; width:100%; height:58px; }
.ep-equip-picture:empty::after { content:""; width:20px; height:20px; border:1px solid #3d3248; border-radius:4px; opacity:.5; }
.ep-slot-label { font-size:10px; line-height:1.4; color:#a99ab4; padding-bottom:6px; }
.ep-equip-slot.is-equipped { border-color:#b29cc6; background:radial-gradient(ellipse at 50% 30%,#493455,#251c2f); box-shadow:inset 0 0 16px #bfa1e010; }
.ep-equip-picture img { object-fit:contain; image-rendering:auto; }
.ep-plus { position:absolute; right:5px; top:0; color:#e2d0f5; font-size:12px; font-weight:700; text-shadow:0 1px 3px #000; }
.ep-item-name { margin:12px 0 2px; min-height:25px; color:#e7d9f4; font-weight:600; overflow-wrap:anywhere; }
.ep-item-fact { min-height:42px; margin:0 0 12px; font-size:11px; color:#baadca; line-height:1.7; overflow-wrap:anywhere; }
.ep-lock { display:flex; align-items:center; gap:8px; min-height:44px; font-size:11px; color:#c7b7d2; cursor:pointer; }
.ep-lock input { width:16px; height:16px; flex:none; }
.ep-stock { margin:0 0 10px; color:#bdafc9; font-size:11px; line-height:1.7; font-variant-numeric:tabular-nums; }
.ep-bag { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; max-height:480px; align-content:start; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; padding:2px 4px 2px 2px; border-radius:8px; }
.ep-bag-item,.ep-bag-empty { min-width:0; min-height:84px; border:1px solid #42364e; border-radius:7px; background:#120e18; }
.ep-bag .ep-bag-item { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:9px 4px 7px; color:var(--ink); line-height:1.4; }
.ep-bag button { margin:0; font:inherit; font-size:11px; }
.ep-bag-item img { width:42px; height:42px; max-width:100%; object-fit:contain; }
.ep-bag-item.ep-scroll { border-color:#a089b7; background:#302338; cursor:pointer; transition:background-color .15s ease-out,border-color .15s ease-out; }
.ep-bag-item.ep-scroll:active { background:#4a3558; }
.ep-bag .ep-spare { cursor:pointer; }
.ep-bag .ep-spare:disabled { cursor:default; opacity:.52; }
.ep-bag .ep-gear { cursor:pointer; border-color:#675178; background:radial-gradient(ellipse at 50% 25%,#2f233c,#17111f); transition:background-color .15s cubic-bezier(.23,1,.32,1),border-color .15s cubic-bezier(.23,1,.32,1); }
.ep-bag .ep-gear:active { background:#3d2b4b; }
.ep-bag .ep-gear:disabled { opacity:.52; cursor:default; }
.ep-bag .ep-plus { top:3px; right:5px; padding:0 2px; border-radius:3px; background:#100c16d9; font-size:11px; font-variant-numeric:tabular-nums; }
.ep-gear-lock { position:absolute; top:4px; left:5px; font-size:10px; color:#e6d4f4; line-height:1.4; }
.enchant-practice button:focus-visible,.enchant-practice input:focus-visible,.enchant-practice summary:focus-visible { outline:2px solid #d0b6e6; outline-offset:3px; }
.ep-bag-label { display:-webkit-box; width:100%; font-size:10px; margin-top:7px; overflow:hidden; overflow-wrap:anywhere; word-break:keep-all; text-align:center; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-height:1.4; }
.ep-item-count { position:absolute; top:5px; right:6px; min-width:17px; color:#f1e9f9; background:#100c16d9; border-radius:4px; font-size:11px; text-align:center; padding:1px 3px; font-variant-numeric:tabular-nums; }
.ep-bag-empty { opacity:.55; background:linear-gradient(145deg,#18121e,#100d15); }
.ep-next { margin:22px 0 8px; min-height:25px; color:#e0cdef; font-size:13px; line-height:1.8; }
.ep-chance-bar { height:5px; border-radius:5px; background:#0f0b14; overflow:hidden; }
.ep-chance-bar span { display:block; height:100%; min-width:1px; background:#ae91c5; border-radius:inherit; transition:width .18s ease-out; }
.ep-bag-hint { font-size:11px; color:#b4a4c0; line-height:1.8; min-height:54px; }
.ep-result { display:flex; flex-direction:column; gap:5px; margin:14px 0; border:1px solid #544361; border-radius:9px; padding:16px 18px; background:#21192a; min-height:88px; }
.ep-result strong { color:#ddc9ee; font-size:14px; }
.ep-result span { color:#bdafc6; font-size:12px; line-height:1.8; }
.ep-result[data-outcome="success"] { border-color:#517660; background:#18251e; }
.ep-result[data-outcome="success"] strong { color:#bae3ca; }
.ep-result[data-outcome="broken"] { border-color:#8b5964; background:#2b1b24; }
.ep-result[data-outcome="broken"] strong { color:#efb6c3; }
.ep-result[data-outcome="blocked"] { border-style:dashed; }
.ep-summary table { width:100%; margin:0; font-size:12px; }
.ep-summary caption { text-align:left; padding:10px 14px; font-size:11px; }
.ep-summary th,.ep-summary td { padding:8px 14px; }
.ep-summary th { width:55%; font-weight:400; color:#b9a8c7; }
.ep-summary td { color:#e7d8f4; font-variant-numeric:tabular-nums; }
.ep-actions { display:flex; align-items:center; gap:14px; margin:14px 0; }
.ep-actions button { flex:none; min-height:44px; font-size:12px; }
.ep-actions p { margin:0; font-size:11px; }
.ep-records { margin:18px 0; }
.ep-records summary { min-height:44px; cursor:pointer; }
.ep-records table { width:100%; min-width:320px; font-size:12px; }
.ep-records th,.ep-records td { padding:9px 12px; white-space:nowrap; }
.ep-records tr[data-outcome="success"] td:last-child { color:#b1d8be; }
.ep-records tr[data-outcome="broken"] td:last-child { color:#e4aab8; }
.ep-source { margin:18px 0; font-size:11px; }
@media (hover:hover) { .ep-scroll:hover { background:#3d2c49; border-color:#d0b6e6; } .ep-spare:not(:disabled):hover,.ep-gear:not(:disabled):hover { background:#302338; border-color:#c1a5d6; } .ep-paper .ep-equip-slot.is-equipped:hover { border-color:#e1cbf3; } }
@media (min-width:1100px) { .ep-bag { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media (max-width:650px) {
  .ep-workbench { grid-template-columns:minmax(0,1fr); }
  .ep-window { padding:16px; }
  .ep-paper { grid-template-rows:repeat(4,74px); grid-template-columns:repeat(3,minmax(0,72px)); gap:6px 10px; }
  .ep-equip-picture { height:48px; }
  .ep-equip-picture img { width:44px; height:44px; }
  .ep-item-fact { min-height:0; }
  .ep-bag { gap:5px; max-height:376px; }
  .ep-bag-item,.ep-bag-empty { min-height:72px; }
  .ep-bag .ep-bag-item { padding:8px 2px 5px; }
  .ep-bag-item img { width:34px; height:34px; }
  .ep-bag-label { font-size:9px; margin-top:5px; line-height:1.3; }
  .ep-bag-hint { min-height:0; }
  .ep-heading { align-items:flex-start; gap:8px; }
  .ep-local { font-size:10px; padding:3px 8px; }
  .ep-actions { align-items:flex-start; flex-direction:column; gap:8px; }
  .ep-toolbar { align-items:flex-start; }
  .ep-toolbar p { flex-basis:100%; }
  .ep-result { padding:14px; }
}
@media (max-width:360px) { .ep-bag { grid-template-columns:repeat(4,minmax(0,1fr)); } .ep-item-count,.ep-bag .ep-plus { right:2px; font-size:10px; } .ep-gear-lock { left:2px; font-size:9px; } .ep-local { display:none; } }
@media (prefers-reduced-motion:reduce) { .enchant-practice * { transition:none !important; animation:none !important; } }
