:root{color-scheme:dark;--ink: #221c15;--deep: #252a1f;--panel: #363c2b;--panel-soft: #4b4c36;--parchment: #f2dfb7;--muted: #c8b993;--wood: #8a6240;--edge: rgba(224, 195, 137, .58);--gold: #e1bd55;--green: #6b9d5d;--green-light: #a9d294;--danger: #c96c5c;--focus: #79b8d9;--shadow: rgba(20, 17, 12, .62)}*{box-sizing:border-box}body{margin:0;min-height:100vh;color:var(--parchment);background:var(--deep);font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif}button,input,select,textarea{font:inherit}:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.editor-shell{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,430px);min-height:100vh}.preview-panel{position:relative;min-height:420px;background:linear-gradient(#1d23190f,#1d231947),url(./hero-village-close-GYqqm3wJ.webp) center 47% / cover no-repeat;overflow:hidden}.preview-panel:after{content:"";position:absolute;inset:auto 0 0;height:24%;background:linear-gradient(transparent,#252a1f6b);pointer-events:none}#character-preview{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}#character-preview canvas{display:block;width:100%;height:100%}.preview-actions{position:absolute;top:18px;right:18px;z-index:2;display:flex;gap:10px}.preview-actions button{width:42px;height:42px;border:1px solid var(--edge);border-radius:9px 6px 10px 5px;color:var(--parchment);background:linear-gradient(135deg,#4b4c36f0,#252a1ff0);box-shadow:inset 0 1px #ffefc71f,0 6px 14px #18130d47;cursor:pointer}.preview-actions button:hover,.profile-actions button:hover,.import-button:hover,.segmented label:hover{filter:brightness(1.08)}.controls-panel{display:flex;flex-direction:column;gap:16px;padding:22px;border-left:1px solid var(--edge);background:radial-gradient(circle at 18% 8%,rgba(239,211,151,.1),transparent 35%),linear-gradient(132deg,var(--panel),var(--deep));box-shadow:inset 0 1px #ffefc71f,inset 0 -18px 34px #18140e2b;overflow-y:auto}.controls-panel header{display:grid;grid-template-columns:72px 1fr;align-items:center;gap:14px}.editor-logo{width:72px;height:auto;filter:drop-shadow(0 4px 8px rgba(20,17,12,.36))}h1{margin:0;color:var(--gold);font-family:Georgia,Times New Roman,serif;font-size:27px;line-height:1.1;letter-spacing:.02em;text-shadow:0 2px 2px rgba(37,28,17,.8)}form{display:flex;flex-direction:column;gap:14px}label,legend{color:var(--muted);font-size:13px;font-weight:700}input[type=text],select,textarea{width:100%;margin-top:7px;border:1px solid rgba(211,174,111,.54);border-radius:8px 6px 9px 5px;color:var(--parchment);background:#24261de6;box-shadow:inset 0 1px 4px #14110c47}input[type=text],select{height:40px;padding:0 11px}fieldset{margin:0;padding:11px;border:1px solid rgba(224,195,137,.34);border-radius:11px 8px 12px 7px;background:#4b4c3647}fieldset:focus-within{border-color:var(--edge)}.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:8px}.segmented.two{grid-template-columns:repeat(2,1fr)}.segmented label{min-height:37px;display:flex;align-items:center;justify-content:center;padding:6px;border:1px solid rgba(224,195,137,.32);border-radius:8px 6px 9px 5px;color:var(--parchment);background:linear-gradient(145deg,#4b4c36eb,#323628f0);cursor:pointer}.segmented label:has(input:checked){border-color:var(--gold);background:radial-gradient(circle at 28% 20%,rgba(255,230,161,.2),transparent 43%),linear-gradient(145deg,#645731fa,#373421fa);box-shadow:inset 0 0 0 1px #ffe5972e}.identity-option{position:relative;overflow:hidden}.identity-option:after{content:"";width:18px;height:26px;margin-left:8px;border-radius:2px 2px 1px 1px;background:currentColor;opacity:.45;box-shadow:-8px 8px 0 -3px currentColor,8px 8px 0 -3px currentColor}.identity-option.female:after{width:15px;box-shadow:-7px 9px 0 -4px currentColor,7px 9px 0 -4px currentColor,0 22px 0 -5px currentColor}.segmented input{margin-right:6px;accent-color:var(--gold)}.color-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.color-grid legend{grid-column:1 / -1}.color-grid label{display:grid;grid-template-columns:1fr 46px;align-items:center;gap:10px}input[type=color]{width:46px;height:32px;padding:2px;border:1px solid var(--edge);border-radius:7px 5px 8px 4px;background:var(--deep);cursor:pointer}.select-row,.select-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.select-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.select-grid legend{grid-column:1 / -1}.profile-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.profile-actions button,.import-button,.play-with-character{min-height:41px;display:flex;align-items:center;justify-content:center;border:1px solid rgba(224,195,137,.42);border-radius:9px 6px 10px 5px;color:var(--ink);background:linear-gradient(135deg,#efd17e,var(--gold));box-shadow:inset 0 1px #ffffff4d,0 6px 14px #18130d33;font-weight:750;cursor:pointer}#save-button{color:#172014;background:linear-gradient(135deg,var(--green-light),var(--green))}.play-with-character{min-height:50px;border-color:#efd17e}.play-with-character:hover,.play-with-character:focus-visible{filter:brightness(1.08)}.import-button{color:var(--parchment);background:linear-gradient(135deg,var(--panel-soft),var(--panel))}.import-button input{display:none}textarea{min-height:140px;resize:vertical;padding:11px;color:#e6e0c7;font-family:Consolas,Courier New,monospace;font-size:12px;line-height:1.45}.profile-json-panel{border:1px solid rgba(224,195,137,.3);border-radius:10px 7px 11px 6px;background:#14110c24}.profile-json-panel summary{min-height:40px;display:flex;align-items:center;padding:0 12px;color:var(--muted);font-size:13px;font-weight:700;cursor:pointer}.profile-json-panel textarea{margin:0;border:0;border-top:1px solid rgba(224,195,137,.3);border-radius:0 0 10px 7px}#status-line{min-height:20px;margin:0;color:var(--green-light);font-size:13px}html.embedded,html.embedded body{min-height:0;overflow:hidden}html.embedded .editor-shell{min-height:0}html.embedded .controls-panel{overflow:visible}@media (max-width: 820px){.editor-shell{grid-template-columns:1fr}.preview-panel{min-height:430px}.controls-panel{border-top:1px solid var(--edge);border-left:0}}@media (max-width: 460px){.controls-panel{padding:18px}.controls-panel header,.select-row,.select-grid,.profile-actions,.segmented,.color-grid{grid-template-columns:1fr}}
