/* Reusable game item skin. Validated server tokens; no powers or commerce. */
html body [data-ph8700-grade] { --rank:var(--ig-c,#abb2bd)!important; --rarity:var(--rank)!important; --ig-name:var(--ig-light,#43516a); }
html.theme--dark body [data-ph8700-grade] { --ig-name:var(--ig-dark,#bdc8d8); }
html body .ph8700-item-name[data-ph8700-grade] { color:var(--ig-name)!important; }
html body .ph8630-item-frame[data-ph8700-grade] {
 --ig-bg:radial-gradient(ellipse at 35% 15%,#ffffff0b,transparent 65%),#151a22;
 border:var(--ig-w,2px) solid var(--ig-c)!important; border-radius:4px!important;
 background:var(--ig-bg)!important; box-shadow:inset 1px 1px 0 #ffffff6b,inset -1px -1px 0 #000b,0 0 0 1px #131821,0 0 var(--ig-glow,7px) color-mix(in srgb,var(--ig-c) 25%,transparent)!important;
}
html body .ph8630-item-frame[data-grade-bg=tinted] { --ig-bg:linear-gradient(145deg,color-mix(in srgb,var(--ig-c) calc(var(--ig-alpha) + 12%),#1a202a),#141920); }
html body .ph8630-item-frame[data-grade-bg=transparent] { --ig-bg:transparent; }
html body .ph8630-item-frame[data-grade-bg=glass] { --ig-bg:linear-gradient(145deg,#ffffff1c,color-mix(in srgb,var(--ig-c) var(--ig-alpha),transparent)); }
html body .ph8630-item-frame[data-grade-bg=glow] { --ig-bg:radial-gradient(circle,color-mix(in srgb,var(--ig-c) calc(var(--ig-alpha) + 15%),transparent),transparent 72%); }
html body .ph8630-item-frame[data-grade-bg=runes] { --ig-bg:repeating-conic-gradient(from 45deg at 50% 50%,#0000 0deg 86deg,color-mix(in srgb,var(--ig-c) 20%,transparent) 87deg 90deg),radial-gradient(circle,color-mix(in srgb,var(--ig-c) var(--ig-alpha),#151a22),#151a22); }
html body .ph8630-item-frame[data-ph8700-grade]::before { inset:2px; border:1px solid color-mix(in srgb,var(--ig-c) 45%,transparent); border-radius:1px; clip-path:none; opacity:.65; animation:none!important; }
html body .ph8630-item-frame[data-grade-border=etched]::before { inset:4px; border-color:color-mix(in srgb,var(--ig-c) 60%,#111); }
html body .ph8630-item-frame[data-grade-border=ornate]::before { inset:2px; border-width:2px; opacity:1; clip-path:polygon(0 0,25% 0,25% 4%,4% 4%,4% 25%,0 25%,0 0,100% 0,100% 25%,96% 25%,96% 4%,75% 4%,75% 0,100% 0,100% 100%,75% 100%,75% 96%,96% 96%,96% 75%,100% 75%,100% 100%,0 100%,0 75%,4% 75%,4% 96%,25% 96%,25% 100%,0 100%); }
html body .ph8630-item-frame[data-ph8700-grade]::after { background:linear-gradient(115deg,transparent 40%,color-mix(in srgb,var(--ig-c) 55%,transparent) 47%,#fffb 50%,transparent 58%); animation:none!important; }
html body .ph8630-item-frame.is-animated[data-grade-motion=glint]::after,
html body .ph8630-item-frame.is-animated[data-grade-motion=both]::after { animation:ph8630-glint var(--ig-speed,7s) ease-in-out infinite!important; }
html body .ph8630-item-frame.is-animated[data-grade-motion=pulse]::before,
html body .ph8630-item-frame.is-animated[data-grade-motion=both]::before { animation:ph8700-pulse var(--ig-speed,7s) ease-in-out infinite!important; }
@keyframes ph8700-pulse { 0%,100%{opacity:.35}50%{opacity:1} }
/* Compact bag cells, independent of remaining horizontal space. */
html.ph8550-design-system body .ph8600-inventory .ph8700-bag-grid {
 display:grid!important; grid-template-columns:repeat(auto-fill,var(--ig-slot,52px))!important;
 gap:var(--ig-gap,8px)!important; width:100%; max-width:calc(var(--ig-cols,8)*(var(--ig-slot,52px) + var(--ig-gap,8px)) - var(--ig-gap,8px))!important; margin:0 auto!important;
}
html.ph8550-design-system body .ph8600-inventory .ph8700-bag-grid>.ph8600-item-slot { width:var(--ig-slot,52px)!important; height:var(--ig-slot,52px)!important; min-height:0!important; padding:2px!important; aspect-ratio:1!important; border-radius:4px!important; }
html.ph8550-design-system body .ph8600-inventory .ph8700-bag-grid .ph8600-slot-icon { width:92%!important; height:92%!important; margin:0!important; }
html.ph8550-design-system body .ph8600-inventory .ph8700-bag-grid .ph8600-slot-name { display:none!important; }
html.ph8550-design-system body .ph8600-inventory .ph8700-bag-grid .ph8600-item-slot>b { right:2px!important; bottom:2px!important; padding:1px 3px; max-width:calc(100% - 4px); border-radius:2px; background:#0009; color:#fff!important; font-size:11px!important; line-height:1.2!important; text-shadow:0 1px 2px #000; }
html.ph8550-design-system body .ph8600-inventory .ph8700-bag-grid>.ph8600-item-slot.is-empty { border:1px solid color-mix(in srgb,var(--bag-line) 65%,#8a8273)!important; background:linear-gradient(135deg,#0000000b,#ffffff03)!important; box-shadow:inset 1px 1px 3px #00000022,inset -1px -1px 0 #ffffff22!important; }
html.ph8550-design-system body .ph8600-inventory .ph8700-bag-grid>.ph8600-item-slot.is-selected { outline:1px solid var(--ig-c,var(--rank))!important; outline-offset:2px!important; box-shadow:inset 1px 1px 0 #fff5,inset -1px -1px 0 #000b,0 0 12px color-mix(in srgb,var(--ig-c) 35%,transparent)!important; }
html body .ph8600-bag-area:has(.ph8600-bag-empty) { min-height:350px; }
html body .ph8600-inventory .ph8630-item-frame--detail { --frame-size:72px; }
html body .ph8600-detail-content h2 { font-size:19px!important; }
html body .ph8700-legend { margin-top:18px; font-size:11px; color:var(--relic-muted); }
html body .ph8700-legend summary { display:inline-block; cursor:pointer; padding:9px 12px; border:1px solid var(--relic-line); border-radius:6px; }
html body .ph8700-legend>div { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
html body .ph8700-legend .ph8700-item-name { padding:6px 9px; border:1px solid var(--ig-c); border-radius:4px; font-size:10px; }
html body .ph8700-consume-note { padding:14px; border:1px solid var(--ph8570-line); background:var(--ph8570-soft); border-radius:7px; }
/* New owner-scoped talisman workspace and existing reveal UI share the shell. */
html.ph8550-design-system body :is(.ph8700-talisman-workspace,.ph8620-reveal) { --relic-bg:var(--ph8570-bg); --relic-panel:var(--ph8570-soft); --relic-line:var(--ph8570-line); --relic-ink:var(--ph8570-text); --relic-muted:var(--ph8570-muted); --relic-gold:var(--ph8570-gold); width:calc(100% - 32px)!important; max-width:1200px!important; margin:0 auto 28px!important; color:var(--ph8570-text); box-sizing:border-box; }
html.ph8550-design-system body .main>.ph8620-record-action { box-sizing:border-box; width:calc(100% - 32px)!important; max-width:1200px!important; margin:0 auto 22px!important; background:var(--ph8570-bg)!important; border-color:var(--ph8570-line)!important; color:var(--ph8570-text)!important; }
html.ph8550-design-system body .ph8620-record-action strong { color:var(--ph8570-text)!important; }
html.ph8550-design-system body .ph8620-record-action span { color:var(--ph8570-muted)!important; }
html.ph8550-design-system body .ph8620-record-action .ph8620-button { color:var(--ph8570-blue)!important; border-color:var(--ph8570-line)!important; background:var(--ph8570-soft)!important; }
html body .ph8700-talisman-head { display:flex; align-items:center; gap:20px; padding:25px; border:1px solid var(--ph8570-line); border-radius:14px; background:var(--ph8570-bg); }
html body .ph8700-talisman-head>div { min-width:0; flex:1; }
html body .ph8700-talisman-head img { object-fit:contain; flex:none; }
html body .ph8700-talisman-head span { color:var(--ph8570-blue); font-size:9px; letter-spacing:.1em; font-weight:700; }
html body .ph8700-talisman-head h1 { color:var(--ph8570-text)!important; font-size:23px; line-height:1.6; margin:7px 0; }
html body .ph8700-talisman-head p { color:var(--ph8570-muted); font-size:12px; line-height:1.8; margin:0; }
html body .ph8700-use-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:0; margin:20px 0; list-style:none; }
html body .ph8700-use-steps li { display:flex; align-items:center; gap:9px; min-width:0; padding:12px; border:1px solid var(--ph8570-line); border-radius:9px; background:var(--ph8570-bg); color:var(--ph8570-muted); font-size:11px; line-height:1.8; }
html body .ph8700-use-steps b { display:grid; place-items:center; width:25px; height:25px; flex:none; border-radius:50%; background:var(--ph8570-soft); color:var(--ph8570-blue); }
html body .ph8700-use-steps [aria-current=step] { color:var(--ph8570-text); border-color:var(--ph8570-blue); }
html body .ph8700-submission-list>a { display:grid; grid-template-columns:40px minmax(0,1fr) auto; align-items:center; gap:15px; padding:20px; border-bottom:1px solid var(--ph8570-line); color:var(--ph8570-text); text-decoration:none; }
html body .ph8700-submission-list>a>span { display:grid; place-items:center; height:40px; background:var(--ph8570-soft); border-radius:8px; color:var(--ph8570-blue); }
html body .ph8700-submission-list svg { width:22px; height:22px; }
html body .ph8700-submission-list h3 { margin:5px 0; font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
html body .ph8700-submission-list :is(small,time) { color:var(--ph8570-muted); font-size:10px; }
html body .ph8700-submission-list>a>b { color:var(--ph8570-blue); font-size:11px; }
html body .ph8700-use-empty { padding:36px; text-align:center; }
html body .ph8700-use-empty>svg { width:35px; height:35px; color:var(--ph8570-blue); }
html body .ph8700-use-note { color:var(--ph8570-muted); font-size:11px; line-height:1.9; }
html.ph8550-design-system body .ph8620-reveal .ph8620-reveal-head { background:var(--ph8570-bg)!important; }
html.ph8550-design-system body .ph8620-reveal :is(.ph8620-reveal-head p,.ph8620-reveal-head h1) { color:var(--ph8570-text)!important; }
html.ph8550-design-system body .ph8620-reveal pre { background:var(--ph8670-code-bg,#f3f6fa)!important; color:var(--ph8670-code-ink,#23384f)!important; }
html.ph8550-design-system body .ph8620-reveal .ph8620-copy { color:var(--ph8570-blue)!important; background:var(--ph8570-soft)!important; border-color:var(--ph8570-line)!important; min-height:30px!important; }
html body .ph8620-reveal .ph8620-locked form { max-width:600px; margin:22px auto 0; }
/* Admin studio. */
html body .ph8700-studio { width:calc(100% - 32px); max-width:1200px; margin:0 auto 32px; color:var(--ph8570-text); box-sizing:border-box; }
html body .ph8700-studio * { box-sizing:border-box; }
html body .ph8700-studio-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:26px; border:1px solid var(--ph8570-line); border-radius:15px; background:var(--ph8570-bg); }
html body .ph8700-studio-head span { color:var(--ph8570-blue); font-size:9px; letter-spacing:.12em; }
html body .ph8700-studio-head h1 { font-size:25px; line-height:1.5; margin:9px 0; color:var(--ph8570-text)!important; }
html body .ph8700-studio-head p { font-size:12px; line-height:1.9; color:var(--ph8570-muted); margin:0; }
html body .ph8700-tabs { display:flex; flex-wrap:wrap; gap:8px; padding:8px; margin:18px 0; background:var(--ph8570-bg); border:1px solid var(--ph8570-line); border-radius:10px; }
html body .ph8700-tabs a { padding:10px 13px; color:var(--ph8570-text); font-size:12px; text-decoration:none; border-radius:7px; }
html body .ph8700-tabs [aria-current] { background:var(--ph8570-soft); color:var(--ph8570-blue); }
html body .ph8700-studio-layout { display:grid; grid-template-columns:300px minmax(0,1fr); gap:20px; align-items:start; }
html body .ph8700-panel { min-width:0; margin:0 0 20px; border:1px solid var(--ph8570-line); border-radius:13px; background:var(--ph8570-bg); overflow:hidden; }
html body .ph8700-panel>header { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:20px; border-bottom:1px solid var(--ph8570-line); }
html body .ph8700-panel>header :is(h2,p) { margin:0; }
html body .ph8700-panel>header h2 { color:var(--ph8570-text)!important; font-size:17px; line-height:1.7; }
html body .ph8700-panel>header :is(a,span) { color:var(--ph8570-blue); font-size:10px; }
html body .ph8700-grade-list { max-height:650px; overflow:auto; padding:8px; }
html body .ph8700-grade-list>a { display:flex; align-items:center; gap:12px; padding:10px; border-radius:8px; color:var(--ph8570-text); text-decoration:none; }
html body .ph8700-grade-list>a[aria-current] { background:var(--ph8570-soft); }
html body .ph8700-grade-list small { display:block; margin-top:5px; font-size:9px; color:var(--ph8570-muted); }
html body .ph8700-grade-list .ph8700-item-name { font-size:12px; font-weight:700; }
html body .ph8700-fields { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; padding:20px; }
html body .ph8700-fields.is-two { grid-template-columns:repeat(2,minmax(0,1fr)); }
html body .ph8700-fields label { display:flex; flex-direction:column; gap:8px; min-width:0; font-size:11px; line-height:1.7; color:var(--ph8570-text); }
html body .ph8700-fields :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select) { width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid var(--ph8570-line); border-radius:6px; background:var(--ph8570-soft); color:var(--ph8570-text); font:inherit; font-size:12px; }
html body .ph8700-fields input[type=color] { height:42px; padding:3px!important; }
html body .ph8700-fields input[type=range] { width:100%; accent-color:var(--ph8570-blue); }
html body .ph8700-fields :is(p,small) { color:var(--ph8570-muted); font-size:10px; line-height:1.8; margin:0; }
html body .ph8700-fields .ph8700-check { flex-direction:row; align-items:center; grid-column:1 / -1; }
html body .ph8700-editor details { border-top:1px solid var(--ph8570-line); }
html body .ph8700-editor summary { padding:17px 20px; cursor:pointer; font-size:13px; font-weight:700; }
html body .ph8700-preview-shelf { display:grid; grid-template-columns:1fr 1fr; margin:20px; border:1px solid var(--ph8570-line); border-radius:10px; overflow:hidden; }
html body .ph8700-preview-shelf>div { display:flex; flex-direction:column; align-items:center; gap:15px; padding:20px 12px; background:#fff8ec; color:#544333; }
html body .ph8700-preview-shelf>[data-ph8700-preview-theme=dark] { background:#1a202a; color:#d9e2ef; }
html body .ph8700-preview-shelf small { font-size:9px; letter-spacing:.1em; }
html body .ph8700-preview-shelf b { font-size:12px; line-height:1.7; text-align:center; }
html body .ph8700-preview-shelf .ph8630-item-frame { --frame-size:64px; }
html body .ph8700-backgrounds { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
html body .ph8700-backgrounds label { align-items:center; position:relative; gap:6px; padding:10px; border:1px solid var(--ph8570-line); border-radius:7px; cursor:pointer; text-align:center; font-size:10px; }
html body .ph8700-backgrounds label:has(input:checked) { border-color:var(--ph8570-blue); background:var(--ph8570-soft); }
html body .ph8700-backgrounds input { position:absolute; top:6px; left:6px; }
html body [data-ph8700-bg-swatch] { display:block; width:42px; height:42px; border:1px solid #8094ed; border-radius:4px; background:#151a22; }
html body [data-ph8700-bg-swatch=tinted] { background:linear-gradient(135deg,#5265a0,#17202c); }
html body [data-ph8700-bg-swatch=transparent] { background:transparent; }
html body [data-ph8700-bg-swatch=glass] { background:#8094ed22; }
html body [data-ph8700-bg-swatch=glow] { background:radial-gradient(circle,#8094ed77,transparent 70%); }
html body [data-ph8700-bg-swatch=runes] { background:repeating-conic-gradient(#8094ed44 0 5%,#151a22 5% 25%); }
html body .ph8700-save { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:18px 20px; border-top:1px solid var(--ph8570-line); background:var(--ph8570-soft); }
html body .ph8700-save p { margin:0; font-size:10px; color:var(--ph8570-muted); line-height:1.8; }
html body .ph8700-success { padding:15px 20px; border:1px solid #51a87e; border-radius:8px; background:#51a87e10; color:var(--ph8670-success,#227255); font-size:12px; }
@media(max-width:960px) { html body .ph8700-studio-layout { grid-template-columns:minmax(0,1fr); } html body .ph8700-grade-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); } html body .ph8700-talisman-head { flex-wrap:wrap; } }
@media(max-width:600px) { html body .ph8700-studio-head { flex-wrap:wrap; padding:20px; } html body .ph8700-grade-list { grid-template-columns:1fr 1fr; } html body .ph8700-fields.is-two { grid-template-columns:minmax(0,1fr); } html body .ph8700-use-steps { gap:7px; } html body .ph8700-use-steps li { flex-direction:column; align-items:flex-start; gap:6px; font-size:10px; padding:10px; } html body .ph8700-submission-list>a { grid-template-columns:32px minmax(0,1fr); gap:12px; padding:16px; } html body .ph8700-submission-list>a>b { grid-column:2; } html body .ph8700-talisman-head { padding:18px; gap:12px; } html body .ph8700-talisman-head img { width:52px; height:52px; } html body .ph8700-talisman-head h1 { font-size:19px; } html body .ph8700-save { flex-wrap:wrap; } }
@media(max-width:400px) { html body .ph8700-grade-list { grid-template-columns:minmax(0,1fr); } html body .ph8700-backgrounds { grid-template-columns:1fr 1fr; } }
@media(prefers-reduced-motion:reduce) { html body .ph8630-item-frame[data-ph8700-grade]::before,html body .ph8630-item-frame[data-ph8700-grade]::after { animation:none!important; } }
