/* Magic journal and the two small cultivation toolbar adjustments. */
#shop .cultivation-title{gap:16px;justify-content:space-between}
#shop #magic-history-open{font:inherit;font-size:12px;font-weight:500;min-height:36px;padding:6px 0 6px 12px;white-space:nowrap}
#shop .cultivation-earned-row67{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}
#shop .cultivation-earned-row67 #cultivation-earned{margin:0;min-width:0;overflow-wrap:anywhere}
#shop #cultivation-refresh{flex:none;min-height:36px;padding:6px 0 6px 8px;font:inherit;font-size:12px;white-space:nowrap}
.lottery-pity-rules>p[data-pity-rule]{grid-template-columns:max-content minmax(0,1fr);gap:12px;align-items:start;padding:15px;background:var(--surface-soft,var(--mint2));border:1px solid var(--line);border-radius:14px}
.lottery-pity-rules>p>.lottery-pity-label67{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;margin-top:1px;min-width:2em;color:var(--deep);background:var(--surface-raised,var(--cream));border:1px solid var(--gold,#a58b54);border-radius:7px;font-weight:700;font-size:13px;letter-spacing:.14em;line-height:1.65;box-shadow:0 2px 8px #9e8b5710}
html.magic-history-open67,body.magic-history-open67{overflow:hidden}
.magic-history67{box-sizing:border-box;width:min(620px,calc(100vw - 28px));max-width:620px;max-height:calc(100vh - 28px);max-height:calc(var(--mh67-height,100dvh) - 28px);padding:0;border:1px solid var(--line);border-radius:24px;color:var(--ink,var(--deep));background:var(--surface,var(--cream,#fffdf8));box-shadow:0 24px 90px #173b3040;overflow:hidden}
.magic-history67[open]{display:flex;flex-direction:column}
.magic-history67::backdrop{background:#203c356b;backdrop-filter:blur(5px)}
.magic-history-head67{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:22px 24px 18px;border-bottom:1px solid var(--line);flex:none}
.magic-history-head67>div{min-width:0}
.magic-history-head67 .small-label{margin:0 0 6px;font-size:10px;letter-spacing:.18em;color:var(--muted)}
.magic-history-head67 h2{margin:0;font:500 28px/1.4 var(--serif,serif);color:var(--deep)}
.magic-history-range67{margin:8px 0 0;font-size:11px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.magic-history-close67{display:grid;place-items:center;flex:none;width:44px;height:44px;margin:-4px -8px 0 0;background:transparent;border:1px solid transparent;border-radius:50%;color:var(--deep);font:28px/1 var(--sans,sans-serif);cursor:pointer}
.magic-history-close67:hover{background:var(--surface-soft,var(--mint2));border-color:var(--line)}
.magic-history-scroll67{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:18px 24px 10px;scroll-padding-block:12px}
.magic-history-totals67{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.magic-history-total67{padding:15px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft,var(--mint2))}
.magic-history-total67 span{display:block;color:var(--muted);font-size:11px;line-height:1.5}
.magic-history-total67 strong{display:block;margin-top:8px;color:var(--deep);font:600 clamp(20px,3vw,28px)/1.3 var(--sans,sans-serif);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.magic-history-total67.expense{background:var(--surface-raised,var(--cream))}
.magic-history-status67,.magic-history-note67{font-size:12px;line-height:1.75;color:var(--muted);margin:0 0 14px}
.magic-history-status67:empty{display:none}
.magic-history-table67{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px;font-variant-numeric:tabular-nums}
.magic-history-table67>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.magic-history-table67 th,.magic-history-table67 td{width:33.333%;padding:14px 8px;border-bottom:1px solid var(--line);text-align:right;vertical-align:middle;overflow-wrap:anywhere}
.magic-history-table67 thead th{padding-block:10px;color:var(--muted);font-size:11px;font-weight:500}
.magic-history-table67 th:first-child{padding-left:0;text-align:left}
.magic-history-table67 td:last-child,.magic-history-table67 th:last-child{padding-right:0}
.magic-history-table67 tbody th{font-weight:500}
.magic-history-table67 tbody tr:last-child>*{border-bottom:0}
.magic-history-today67{display:inline-block;margin-left:5px;color:var(--muted);font-size:10px}
.magic-history-coverage67{display:block;margin-top:4px;color:var(--muted);font-size:10px;font-weight:400;line-height:1.5}
.magic-history-income67{color:var(--deep);font-weight:600}
.magic-history-expense67{color:var(--ink,var(--deep))}
.magic-history-foot67{display:flex;align-items:center;justify-content:space-between;flex:none;gap:10px;padding:14px 24px max(14px,env(safe-area-inset-bottom));border-top:1px solid var(--line)}
.magic-history-foot67>span{font-size:11px;color:var(--muted)}
.magic-history-foot67 button{flex:none;min-height:40px;font-size:12px}
.magic-history67 :is(button,summary):focus-visible,#magic-history-open:focus-visible,#cultivation-refresh:focus-visible{outline:2px solid var(--deep);outline-offset:3px}
.magic-history67 [hidden]{display:none!important}
html[data-theme=dark] .lottery-pity-label67{border-color:#b8a77e}
@media(max-width:480px){
 .magic-history67{position:fixed;top:calc(var(--mh67-top,0px) + max(12px,env(safe-area-inset-top)));bottom:auto;margin:0 auto;max-height:calc(var(--mh67-height,100dvh) - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)));width:calc(100vw - 24px);border-radius:20px}
 .magic-history-head67{padding:18px 18px 14px}
 .magic-history-head67 h2{font-size:25px}
 .magic-history-scroll67{padding:16px 18px 8px}
 .magic-history-foot67{padding:12px 18px max(12px,env(safe-area-inset-bottom))}
 .magic-history-total67{padding:12px}
 .magic-history-table67{font-size:12px}
 .magic-history-table67 th,.magic-history-table67 td{padding-block:13px;padding-inline:5px}
 .magic-history-today67{font-size:9px;margin-left:3px}
 .lottery-pity-rules>p[data-pity-rule]{gap:10px;padding:12px}
}
