/* Tie'Crus look. One place for colours, corners and spacing. Delete the two lines in index.html that load
   ui.css / ui.js to get the old look back. Selectors start with "html body" so they win over the older styles. */
:root{color-scheme:dark;
  --bg:#0c0b11; --panel:#15131c; --raise:#211d2d; --raise2:#2b2640; --line:#322d44; --line2:#463d63;
  --gold:#dcbc45; --purple:#8a45dd; --text:#ece8f5; --dim:#9d95b3; --r:7px}
html body ::-webkit-scrollbar{width:9px;height:9px} html body ::-webkit-scrollbar-thumb{background:var(--line2);border-radius:9px;border:2px solid transparent;background-clip:content-box}
html body ::-webkit-scrollbar-track{background:transparent}
@supports not selector(::-webkit-scrollbar){html body *{scrollbar-width:thin;scrollbar-color:var(--line2) transparent}}
html body input,html body select,html body textarea{accent-color:var(--gold)}

/* ---- controls */
html body :is(button,select,textarea,input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=file])){
  font-family:inherit;color:var(--text);background:#1b1826;border:1px solid var(--line);border-radius:var(--r);transition:background .12s,border-color .12s}
html body input:not([type]),html body input[type=password]{padding:6px 10px}
html body button{background:linear-gradient(var(--raise2),var(--raise))}
html body button:hover:not(:disabled){border-color:var(--gold);background:var(--raise2)}
html body button:active:not(:disabled){transform:translateY(1px)}
html body button:disabled{opacity:.45;cursor:default}
html body button.gold{background:linear-gradient(#e9cb58,#cfae36);color:#1c1600;border-color:#e9cb58}
html body :is(button,select,input,textarea):focus-visible{outline:2px solid var(--gold);outline-offset:1px}
html body :is(input,textarea):focus{border-color:var(--line2)}
html body input[type=file]{font-size:12px;color:var(--dim)} html body input[type=file]::file-selector-button{font:inherit;color:var(--text);background:var(--raise);border:1px solid var(--line);border-radius:var(--r);padding:4px 10px;margin-right:8px;cursor:pointer}

/* ---- headings */
html body :is(#side,#cityWin,#dirPanel,#toolPanel,#sheetBack) h4{display:flex;align-items:center;gap:8px;margin:8px 0 3px;font-size:12px;letter-spacing:1.5px}
html body :is(#side,#cityWin,#dirPanel,#toolPanel) h4::after{content:'';flex:1;height:1px;background:linear-gradient(90deg,var(--line2),transparent)}

/* ---- side panel */
html body #side{background:linear-gradient(#191623,var(--panel) 160px);border-color:var(--line2);box-shadow:-6px 0 18px #0006}
html body #tabs{background:#100e17;border-color:var(--line)}
html body #tabs button{background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;transform:none}
html body #tabs button:hover{color:var(--text);background:#ffffff0a}
html body #tabs button.on{color:var(--gold);border-bottom-color:var(--gold);background:linear-gradient(transparent,#dcbc4518)}
html body .pane{padding:8px;gap:6px}
html body .pane:not(#p-chat)>*{flex:none}                      /* nothing gets squashed flat on small screens: the panel scrolls */

/* ---- chat and dice */
html body #log{gap:3px;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
html body #log .l-chat{padding:2px 8px}
html body #log .l-sys{font-size:11.5px;padding:0 8px;opacity:.85}
html body #log :is(.l-roll,.l-whisper){border-radius:0 var(--r) var(--r) 0;padding:4px 8px}
html body #log .uiFold{align-self:center;font-size:11px;font-style:normal;color:var(--dim);cursor:pointer;padding:0 10px;border:1px dashed var(--line);border-radius:20px;opacity:.8}
html body #log .uiFold:hover{color:var(--text);border-color:var(--line2)}
html body #log .uiHidden{display:none}
html body #dice{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
html body #dice button{min-width:0;padding:6px 0;font-size:14px}
html body #p-chat label{display:inline-flex;align-items:center;gap:4px;padding:2px 10px 2px 7px;border:1px solid var(--line);border-radius:20px;cursor:pointer;user-select:none}
html body #p-chat label:has(input:checked){border-color:var(--gold);color:var(--gold);background:#dcbc4514}
html body #p-chat label input{margin:0}
html body #dmDice{margin:0!important;padding:5px 8px!important;border-color:var(--line)!important;background:#19132a!important;border-radius:var(--r)!important}
html body #dmDice>div:first-child{cursor:pointer;user-select:none;margin:0!important;display:flex;justify-content:space-between}
html body #dmDice>div:first-child::after{content:'▾'} html body #dmDice.fold>div:first-child::after{content:'▸'}
html body #dmDice.fold>.row{display:none}
html body #dmDice>.row{margin-top:5px}
html body #msg{padding:8px 10px}
html body #online{font-size:11px!important;opacity:.85}

/* ---- lists */
html body .maplist div{padding:3px 4px 3px 8px;margin-bottom:3px;background:#1a1724}
html body .maplist div:hover{border-color:var(--line2);background:var(--raise)}
html body .maplist div.cur{border-color:var(--gold);background:#2a2415}
html body .maplist button{padding:3px 7px;height:28px;line-height:1;flex:none}      /* every row button the same size */
html body #sheetList>*{background:#1a1724}
html body .grid{grid-template-columns:repeat(auto-fill,minmax(58px,1fr))}

/* ---- over the board */
html body :is(#top,#zoom){background:#100e17e0;border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 14px #0007;backdrop-filter:blur(6px)}
html body #top{padding:4px 8px;gap:6px}
html body #top :is(button,select){padding:4px 8px}
html body #top #qSel{max-width:118px}
html body #zoom{padding:3px;gap:2px;width:fit-content;max-width:calc(100% - 20px)}
html body #zoom button{background:transparent;border-color:transparent;min-width:34px;padding:5px 9px}
html body #zoom button:hover{background:var(--raise2)}
html body :is(#dreamBtn,.dmTool,#leaveTown,#setSpawn,#bagTab){background:#14111de6;border-color:var(--line);box-shadow:0 3px 10px #0006;font-size:13px}
html body :is(.dmTool,#dreamBtn){text-align:left}
@media (min-width:761px){html body :is(.dmTool,#dreamBtn){width:158px;padding:6px 10px}}
html body #bagTab{border-bottom:0;border-radius:10px 10px 0 0}

/* ---- windows */
html body :is(#cityWin,#dirPanel,#toolPanel,#bag,#actMenu,#actCard,#actCook,#tcToast){border-color:var(--line2);box-shadow:0 14px 40px #000b}
html body #cityWinHd{background:linear-gradient(#241d38,#181424)}
html body #grip::after{background:var(--line2)} html body #grip:hover::after,html body #grip.drag::after{background:var(--gold)}

/* ---- login */
html body #join{background:radial-gradient(circle at 50% 35%,#2a1650 0,#0d0916 45%,#050409 100%)}
html body #join>div{border-color:var(--line2);border-top:2px solid var(--gold);background:#15121ff2;box-shadow:0 24px 70px #000c}
html body #join :is(input,select){padding:9px 10px;font-size:17px}
html body #join button{padding:9px 10px}

/* ---- phones */
html body [data-device=phone] #zoom,html[data-device=phone] body #zoom{padding:2px;gap:0}
html[data-device=phone] body #zoom button{min-width:36px;padding:7px 5px}
html[data-device=phone] body :is(#leaveTown,#setSpawn){font-size:11.5px;opacity:.92}
@media (max-width:760px){html body .pane{padding:6px;gap:5px} html body #dice button{padding:7px 0;font-size:13px} html body #online{display:none}}
