/* ibm-plex-sans-cyrillic-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2) format('woff2'), url(./ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-cyrillic-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2) format('woff2'), url(./ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-sans-greek-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-sans-greek-400-normal-_efipK4i.woff2) format('woff2'), url(./ibm-plex-sans-greek-400-normal-D9ESIMu3.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* ibm-plex-sans-vietnamese-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2) format('woff2'), url(./ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-sans-latin-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2) format('woff2'), url(./ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-sans-latin-400-normal-CDDApCn2.woff2) format('woff2'), url(./ibm-plex-sans-latin-400-normal-CYLoc0-x.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* ibm-plex-sans-cyrillic-ext-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2) format('woff2'), url(./ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-cyrillic-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2) format('woff2'), url(./ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-sans-greek-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./ibm-plex-sans-greek-500-normal-JMMifIXV.woff2) format('woff2'), url(./ibm-plex-sans-greek-500-normal-CuWXN6rf.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* ibm-plex-sans-vietnamese-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2) format('woff2'), url(./ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-sans-latin-ext-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2) format('woff2'), url(./ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-500-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./ibm-plex-sans-latin-500-normal-6ng42L7E.woff2) format('woff2'), url(./ibm-plex-sans-latin-500-normal-BgVn5rGT.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* ibm-plex-sans-cyrillic-ext-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2) format('woff2'), url(./ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-sans-cyrillic-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2) format('woff2'), url(./ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-sans-greek-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2) format('woff2'), url(./ibm-plex-sans-greek-600-normal-D-CqTdkO.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* ibm-plex-sans-vietnamese-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2) format('woff2'), url(./ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-sans-latin-ext-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2) format('woff2'), url(./ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-sans-latin-600-normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2) format('woff2'), url(./ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* ibm-plex-mono-cyrillic-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2) format('woff2'), url(./ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* ibm-plex-mono-cyrillic-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2) format('woff2'), url(./ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* ibm-plex-mono-vietnamese-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2) format('woff2'), url(./ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ibm-plex-mono-latin-ext-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2) format('woff2'), url(./ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ibm-plex-mono-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2) format('woff2'), url(./ibm-plex-mono-latin-400-normal-CvHOgSBP.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* im-fell-english-latin-400-normal */
@font-face {
  font-family: 'IM Fell English';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./im-fell-english-latin-400-normal-BhowGHCQ.woff2) format('woff2'), url(./im-fell-english-latin-400-normal-CxhBQSzl.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* im-fell-english-latin-400-italic */
@font-face {
  font-family: 'IM Fell English';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(./im-fell-english-latin-400-italic-DD_ylKHZ.woff2) format('woff2'), url(./im-fell-english-latin-400-italic-hN89MLGX.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* cinzel-latin-ext-600-normal */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./cinzel-latin-ext-600-normal-BEFdM_VE.woff2) format('woff2'), url(./cinzel-latin-ext-600-normal-BY9Mq9iK.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* cinzel-latin-600-normal */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(./cinzel-latin-600-normal-Dd5YO2UX.woff2) format('woff2'), url(./cinzel-latin-600-normal-CH_LB4su.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* cinzel-latin-ext-700-normal */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./cinzel-latin-ext-700-normal-C24KFjuG.woff2) format('woff2'), url(./cinzel-latin-ext-700-normal-CORa-yIv.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* cinzel-latin-700-normal */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./cinzel-latin-700-normal-Dkw14w9r.woff2) format('woff2'), url(./cinzel-latin-700-normal-C-gK7hA8.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* alegreya-sans-cyrillic-ext-400-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./alegreya-sans-cyrillic-ext-400-normal-CBouUAPx.woff2) format('woff2'), url(./alegreya-sans-cyrillic-ext-400-normal-ClLgPhqT.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* alegreya-sans-cyrillic-400-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./alegreya-sans-cyrillic-400-normal-CFUoBDld.woff2) format('woff2'), url(./alegreya-sans-cyrillic-400-normal-C2XSGevv.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* alegreya-sans-greek-ext-400-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./alegreya-sans-greek-ext-400-normal-CaUEPd_u.woff2) format('woff2'), url(./alegreya-sans-greek-ext-400-normal-D6j-TQLM.woff) format('woff');
  unicode-range: U+1F00-1FFF;
}

/* alegreya-sans-greek-400-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./alegreya-sans-greek-400-normal-B87Md6o9.woff2) format('woff2'), url(./alegreya-sans-greek-400-normal-8U5NAP_q.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* alegreya-sans-vietnamese-400-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./alegreya-sans-vietnamese-400-normal-D7fwYHgb.woff2) format('woff2'), url(./alegreya-sans-vietnamese-400-normal-BFvpiE3j.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* alegreya-sans-latin-ext-400-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./alegreya-sans-latin-ext-400-normal-D7N6b6bd.woff2) format('woff2'), url(./alegreya-sans-latin-ext-400-normal-DpBVrRWA.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* alegreya-sans-latin-400-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./alegreya-sans-latin-400-normal-DtLlO8BS.woff2) format('woff2'), url(./alegreya-sans-latin-400-normal-DmA8jeke.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* alegreya-sans-cyrillic-ext-500-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./alegreya-sans-cyrillic-ext-500-normal-BjdEjhHc.woff2) format('woff2'), url(./alegreya-sans-cyrillic-ext-500-normal-CBZLRaMr.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* alegreya-sans-cyrillic-500-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./alegreya-sans-cyrillic-500-normal-kQHBM3cE.woff2) format('woff2'), url(./alegreya-sans-cyrillic-500-normal-gEBUHwKD.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* alegreya-sans-greek-ext-500-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./alegreya-sans-greek-ext-500-normal-8OvC5Vmr.woff2) format('woff2'), url(./alegreya-sans-greek-ext-500-normal-Cp0bGOKK.woff) format('woff');
  unicode-range: U+1F00-1FFF;
}

/* alegreya-sans-greek-500-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./alegreya-sans-greek-500-normal-CjlmbScm.woff2) format('woff2'), url(./alegreya-sans-greek-500-normal-BwxJMQU_.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* alegreya-sans-vietnamese-500-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./alegreya-sans-vietnamese-500-normal-CFLbXWhL.woff2) format('woff2'), url(./alegreya-sans-vietnamese-500-normal-B1LHNMw0.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* alegreya-sans-latin-ext-500-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./alegreya-sans-latin-ext-500-normal-TH5u60nj.woff2) format('woff2'), url(./alegreya-sans-latin-ext-500-normal-CxFoZ42m.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* alegreya-sans-latin-500-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(./alegreya-sans-latin-500-normal-DS713u5J.woff2) format('woff2'), url(./alegreya-sans-latin-500-normal-vXxrTKJT.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* alegreya-sans-cyrillic-ext-700-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./alegreya-sans-cyrillic-ext-700-normal-Cpzx2u2L.woff2) format('woff2'), url(./alegreya-sans-cyrillic-ext-700-normal-YOec_wOb.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* alegreya-sans-cyrillic-700-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./alegreya-sans-cyrillic-700-normal-BMO00Gdb.woff2) format('woff2'), url(./alegreya-sans-cyrillic-700-normal-qSextXl4.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* alegreya-sans-greek-ext-700-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./alegreya-sans-greek-ext-700-normal-ChNZoGr1.woff2) format('woff2'), url(./alegreya-sans-greek-ext-700-normal-BVJ8GoGc.woff) format('woff');
  unicode-range: U+1F00-1FFF;
}

/* alegreya-sans-greek-700-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./alegreya-sans-greek-700-normal-CTof9pYC.woff2) format('woff2'), url(./alegreya-sans-greek-700-normal-BZuMtSJ5.woff) format('woff');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* alegreya-sans-vietnamese-700-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./alegreya-sans-vietnamese-700-normal-CHYTK2w7.woff2) format('woff2'), url(./alegreya-sans-vietnamese-700-normal-D0056cUE.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* alegreya-sans-latin-ext-700-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./alegreya-sans-latin-ext-700-normal-HuHd3-Mg.woff2) format('woff2'), url(./alegreya-sans-latin-ext-700-normal-CkNjzB9Y.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* alegreya-sans-latin-700-normal */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(./alegreya-sans-latin-700-normal-DEbcy2sF.woff2) format('woff2'), url(./alegreya-sans-latin-700-normal-BnzUNlma.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* this gets exported as style.css and can be used for the default theming */
/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
.react-flow {
  direction: ltr;

  --xy-edge-stroke-default: #b1b1b7;
  --xy-edge-stroke-width-default: 1;
  --xy-edge-stroke-selected-default: #555;

  --xy-connectionline-stroke-default: #b1b1b7;
  --xy-connectionline-stroke-width-default: 1;

  --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);

  --xy-minimap-background-color-default: #fff;
  --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);
  --xy-minimap-mask-stroke-color-default: transparent;
  --xy-minimap-mask-stroke-width-default: 1;
  --xy-minimap-node-background-color-default: #e2e2e2;
  --xy-minimap-node-stroke-color-default: transparent;
  --xy-minimap-node-stroke-width-default: 2;

  --xy-background-color-default: transparent;
  --xy-background-pattern-dots-color-default: #91919a;
  --xy-background-pattern-lines-color-default: #eee;
  --xy-background-pattern-cross-color-default: #e2e2e2;
  background-color: var(--xy-background-color, var(--xy-background-color-default));
  --xy-node-color-default: inherit;
  --xy-node-border-default: 1px solid #1a192b;
  --xy-node-background-color-default: #fff;
  --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
  --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;
  --xy-node-border-radius-default: 3px;

  --xy-handle-background-color-default: #1a192b;
  --xy-handle-border-color-default: #fff;

  --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);
  --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);

  --xy-controls-button-background-color-default: #fefefe;
  --xy-controls-button-background-color-hover-default: #f4f4f4;
  --xy-controls-button-color-default: inherit;
  --xy-controls-button-color-hover-default: inherit;
  --xy-controls-button-border-color-default: #eee;
  --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

  --xy-edge-label-background-color-default: #ffffff;
  --xy-edge-label-color-default: inherit;
  --xy-resize-background-color-default: #3367d9;
}
.react-flow.dark {
  --xy-edge-stroke-default: #3e3e3e;
  --xy-edge-stroke-width-default: 1;
  --xy-edge-stroke-selected-default: #727272;

  --xy-connectionline-stroke-default: #b1b1b7;
  --xy-connectionline-stroke-width-default: 1;

  --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);

  --xy-minimap-background-color-default: #141414;
  --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);
  --xy-minimap-mask-stroke-color-default: transparent;
  --xy-minimap-mask-stroke-width-default: 1;
  --xy-minimap-node-background-color-default: #2b2b2b;
  --xy-minimap-node-stroke-color-default: transparent;
  --xy-minimap-node-stroke-width-default: 2;

  --xy-background-color-default: #141414;
  --xy-background-pattern-dots-color-default: #555;
  --xy-background-pattern-lines-color-default: #333;
  --xy-background-pattern-cross-color-default: #333;
  --xy-node-color-default: #f8f8f8;
  --xy-node-border-default: 1px solid #3c3c3c;
  --xy-node-background-color-default: #1e1e1e;
  --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
  --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);
  --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;

  --xy-handle-background-color-default: #bebebe;
  --xy-handle-border-color-default: #1e1e1e;

  --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);
  --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);

  --xy-controls-button-background-color-default: #2b2b2b;
  --xy-controls-button-background-color-hover-default: #3e3e3e;
  --xy-controls-button-color-default: #f8f8f8;
  --xy-controls-button-color-hover-default: #fff;
  --xy-controls-button-border-color-default: #5b5b5b;
  --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);

  --xy-edge-label-background-color-default: #141414;
  --xy-edge-label-color-default: #f8f8f8;
}
.react-flow__background {
  background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));
  pointer-events: none;
  z-index: -1;
}
.react-flow__container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.react-flow__pane {
  z-index: 1;
  touch-action: none;
}
.react-flow__pane.draggable {
    cursor: grab;
  }
.react-flow__pane.dragging {
    cursor: grabbing;
  }
.react-flow__pane.selection {
    cursor: pointer;
  }
.react-flow__viewport {
  transform-origin: 0 0;
  z-index: 2;
  pointer-events: none;
}
.react-flow__renderer {
  z-index: 4;
}
.react-flow__selection {
  z-index: 6;
}
.react-flow__nodesselection-rect:focus,
.react-flow__nodesselection-rect:focus-visible {
  outline: none;
}
.react-flow__edge-path {
  stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
  stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));
  fill: none;
}
.react-flow__connection-path {
  stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));
  stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));
  fill: none;
}
.react-flow .react-flow__edges {
  position: absolute;
}
.react-flow .react-flow__edges svg {
    overflow: visible;
    position: absolute;
    pointer-events: none;
  }
.react-flow__edge {
  pointer-events: visibleStroke;
}
.react-flow__edge.selectable {
    cursor: pointer;
  }
.react-flow__edge.animated path {
    stroke-dasharray: 5;
    animation: dashdraw 0.5s linear infinite;
  }
.react-flow__edge.animated path.react-flow__edge-interaction {
    stroke-dasharray: none;
    animation: none;
  }
.react-flow__edge.inactive {
    pointer-events: none;
  }
.react-flow__edge.selected,
  .react-flow__edge:focus,
  .react-flow__edge:focus-visible {
    outline: none;
  }
.react-flow__edge.selected .react-flow__edge-path,
  .react-flow__edge.selectable:focus .react-flow__edge-path,
  .react-flow__edge.selectable:focus-visible .react-flow__edge-path {
    stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));
  }
.react-flow__edge-textwrapper {
    pointer-events: all;
  }
.react-flow__edge .react-flow__edge-text {
    pointer-events: none;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
/* Arrowhead marker styles - use CSS custom properties as default */
.react-flow__arrowhead polyline {
  stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
}
.react-flow__arrowhead polyline.arrowclosed {
  fill: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
}
.react-flow__connection {
  pointer-events: none;
}
.react-flow__connection .animated {
    stroke-dasharray: 5;
    animation: dashdraw 0.5s linear infinite;
  }
svg.react-flow__connectionline {
  z-index: 1001;
  overflow: visible;
  position: absolute;
}
.react-flow__nodes {
  pointer-events: none;
  transform-origin: 0 0;
}
.react-flow__node {
  position: absolute;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: all;
  transform-origin: 0 0;
  box-sizing: border-box;
  cursor: default;
}
.react-flow__node.selectable {
    cursor: pointer;
  }
.react-flow__node.draggable {
    cursor: grab;
    pointer-events: all;
  }
.react-flow__node.draggable.dragging {
      cursor: grabbing;
    }
.react-flow__nodesselection {
  z-index: 3;
  transform-origin: left top;
  pointer-events: none;
}
.react-flow__nodesselection-rect {
    position: absolute;
    pointer-events: all;
    cursor: grab;
  }
.react-flow__handle {
  position: absolute;
  pointer-events: none;
  min-width: 5px;
  min-height: 5px;
  width: 6px;
  height: 6px;
  background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));
  border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));
  border-radius: 100%;
}
.react-flow__handle.connectingfrom {
    pointer-events: all;
  }
.react-flow__handle.connectionindicator {
    pointer-events: all;
    cursor: crosshair;
  }
.react-flow__handle-bottom {
    top: auto;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
  }
.react-flow__handle-top {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
  }
.react-flow__handle-left {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
  }
.react-flow__handle-right {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
  }
.react-flow__edgeupdater {
  cursor: move;
  pointer-events: all;
}
.react-flow__pane.selection .react-flow__panel {
  pointer-events: none;
}
.react-flow__panel {
  position: absolute;
  z-index: 5;
  margin: 15px;
}
.react-flow__panel.top {
    top: 0;
  }
.react-flow__panel.bottom {
    bottom: 0;
  }
.react-flow__panel.top.center, .react-flow__panel.bottom.center {
      left: 50%;
      transform: translateX(-15px) translateX(-50%);
    }
.react-flow__panel.left {
    left: 0;
  }
.react-flow__panel.right {
    right: 0;
  }
.react-flow__panel.left.center, .react-flow__panel.right.center {
      top: 50%;
      transform: translateY(-15px) translateY(-50%);
    }
.react-flow__attribution {
  font-size: 10px;
  background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));
  padding: 2px 3px;
  margin: 0;
}
.react-flow__attribution a {
    text-decoration: none;
    color: #999;
  }
@keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
}
.react-flow__edgelabel-renderer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  left: 0;
  top: 0;
}
.react-flow__viewport-portal {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.react-flow__minimap {
  background: var(
    --xy-minimap-background-color-props,
    var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))
  );
}
.react-flow__minimap-svg {
    display: block;
  }
.react-flow__minimap-mask {
    fill: var(
      --xy-minimap-mask-background-color-props,
      var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))
    );
    stroke: var(
      --xy-minimap-mask-stroke-color-props,
      var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))
    );
    stroke-width: var(
      --xy-minimap-mask-stroke-width-props,
      var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))
    );
  }
.react-flow__minimap-node {
    fill: var(
      --xy-minimap-node-background-color-props,
      var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))
    );
    stroke: var(
      --xy-minimap-node-stroke-color-props,
      var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))
    );
    stroke-width: var(
      --xy-minimap-node-stroke-width-props,
      var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))
    );
  }
.react-flow__background-pattern.dots {
    fill: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))
    );
  }
.react-flow__background-pattern.lines {
    stroke: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))
    );
  }
.react-flow__background-pattern.cross {
    stroke: var(
      --xy-background-pattern-color-props,
      var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))
    );
  }
.react-flow__controls {
  display: flex;
  flex-direction: column;
  box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));
}
.react-flow__controls.horizontal {
    flex-direction: row;
  }
.react-flow__controls-button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 26px;
    width: 26px;
    padding: 4px;
    border: none;
    background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));
    border-bottom: 1px solid
      var(
        --xy-controls-button-border-color-props,
        var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
      );
    color: var(
      --xy-controls-button-color-props,
      var(--xy-controls-button-color, var(--xy-controls-button-color-default))
    );
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
.react-flow__controls-button svg {
      width: 100%;
      max-width: 12px;
      max-height: 12px;
      fill: currentColor;
    }
.react-flow__edge.updating .react-flow__edge-path {
      stroke: #777;
    }
.react-flow__edge-text {
    font-size: 10px;
  }
.react-flow__node.selectable:focus,
  .react-flow__node.selectable:focus-visible {
    outline: none;
  }
.react-flow__node-input,
.react-flow__node-default,
.react-flow__node-output,
.react-flow__node-group {
  padding: 10px;
  border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));
  width: 150px;
  font-size: 12px;
  color: var(--xy-node-color, var(--xy-node-color-default));
  text-align: center;
  border: var(--xy-node-border, var(--xy-node-border-default));
  background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));
}
.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
      box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));
    }
.react-flow__node-input.selectable.selected,
    .react-flow__node-input.selectable:focus,
    .react-flow__node-input.selectable:focus-visible,
    .react-flow__node-default.selectable.selected,
    .react-flow__node-default.selectable:focus,
    .react-flow__node-default.selectable:focus-visible,
    .react-flow__node-output.selectable.selected,
    .react-flow__node-output.selectable:focus,
    .react-flow__node-output.selectable:focus-visible,
    .react-flow__node-group.selectable.selected,
    .react-flow__node-group.selectable:focus,
    .react-flow__node-group.selectable:focus-visible {
      box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));
    }
.react-flow__node-group {
  background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));
}
.react-flow__nodesselection-rect,
.react-flow__selection {
  background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));
  border: var(--xy-selection-border, var(--xy-selection-border-default));
}
.react-flow__nodesselection-rect:focus,
  .react-flow__nodesselection-rect:focus-visible,
  .react-flow__selection:focus,
  .react-flow__selection:focus-visible {
    outline: none;
  }
.react-flow__controls-button:hover {
      background: var(
        --xy-controls-button-background-color-hover-props,
        var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))
      );
      color: var(
        --xy-controls-button-color-hover-props,
        var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))
      );
    }
.react-flow__controls-button:disabled {
      pointer-events: none;
    }
.react-flow__controls-button:disabled svg {
        fill-opacity: 0.4;
      }
.react-flow__controls-button:last-child {
    border-bottom: none;
  }
.react-flow__controls.horizontal .react-flow__controls-button {
    border-bottom: none;
    border-right: 1px solid
      var(
        --xy-controls-button-border-color-props,
        var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
      );
  }
.react-flow__controls.horizontal .react-flow__controls-button:last-child {
    border-right: none;
  }
.react-flow__resize-control {
  position: absolute;
}
.react-flow__resize-control.left,
.react-flow__resize-control.right {
  cursor: ew-resize;
}
.react-flow__resize-control.top,
.react-flow__resize-control.bottom {
  cursor: ns-resize;
}
.react-flow__resize-control.top.left,
.react-flow__resize-control.bottom.right {
  cursor: nwse-resize;
}
.react-flow__resize-control.bottom.left,
.react-flow__resize-control.top.right {
  cursor: nesw-resize;
}
/* handle styles */
.react-flow__resize-control.handle {
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 1px;
  background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
  translate: -50% -50%;
}
.react-flow__resize-control.handle.left {
  left: 0;
  top: 50%;
}
.react-flow__resize-control.handle.right {
  left: 100%;
  top: 50%;
}
.react-flow__resize-control.handle.top {
  left: 50%;
  top: 0;
}
.react-flow__resize-control.handle.bottom {
  left: 50%;
  top: 100%;
}
.react-flow__resize-control.handle.top.left {
  left: 0;
}
.react-flow__resize-control.handle.bottom.left {
  left: 0;
}
.react-flow__resize-control.handle.top.right {
  left: 100%;
}
.react-flow__resize-control.handle.bottom.right {
  left: 100%;
}
/* line styles */
.react-flow__resize-control.line {
  border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
  border-width: 0;
  border-style: solid;
}
.react-flow__resize-control.line.left,
.react-flow__resize-control.line.right {
  width: 1px;
  transform: translate(-50%, 0);
  top: 0;
  height: 100%;
}
.react-flow__resize-control.line.left {
  left: 0;
  border-left-width: 1px;
}
.react-flow__resize-control.line.right {
  left: 100%;
  border-right-width: 1px;
}
.react-flow__resize-control.line.top,
.react-flow__resize-control.line.bottom {
  height: 1px;
  transform: translate(0, -50%);
  left: 0;
  width: 100%;
}
.react-flow__resize-control.line.top {
  top: 0;
  border-top-width: 1px;
}
.react-flow__resize-control.line.bottom {
  border-bottom-width: 1px;
  top: 100%;
}
.react-flow__edge-textbg {
  fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));
}
.react-flow__edge-text {
  fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));
}
/* Working style tokens from docs/UI_SPEC.md */
:root {
  --ground: #171a1f;
  --panel: #1e2228;
  --bar: #1a1d22;
  --border: #2d333c;
  --border-strong: #4a525e;
  --text: #e9e7e2;
  --muted: #a3abb5;
  --selection: #6cb6d9;
  --link: #9fd0ea;
  --string-red: #d2453a;
  --amber: #c79a2e;
  --card-paper: #efe9da;
  --card-ink: #1f1c17;
  --card-muted: #5c564b;
  --note: #f2d76b;
  --sans: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --control: 44px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body { background: var(--ground); color: var(--text); font-family: var(--sans); font-size: 14px; }

button, input, select, textarea { font: inherit; color: inherit; }
button {
  min-height: var(--control); padding: 0 14px; background: var(--ground); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
}
button:not(.desk-theme *):hover:not(:disabled) { border-color: var(--border-strong); background: #20252c; }
button:disabled { color: #5d6570; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--selection); outline-offset: 2px;
}
button.primary { background: var(--text); color: var(--ground); border-color: var(--text); font-weight: 600; }
button.primary:hover:not(:disabled) { background: #fff; }
button.primary:disabled { background: #3a4049; border-color: #3a4049; color: #8a929c; }
button.outline { border-color: var(--border-strong); font-weight: 600; }
button.ghost { border-style: dashed; color: var(--muted); }
button.danger { border-color: #7d2a24; color: #f0b3ad; }
button.danger:hover:not(:disabled) { background: #2a1b1a; border-color: var(--string-red); }
button[aria-pressed='true'] { background: var(--text); color: var(--ground); border-color: var(--text); font-weight: 600; }
button[aria-pressed='true']:hover:not(:disabled) { background: #fff; border-color: #fff; }

input, select, textarea {
  min-height: var(--control); width: 100%; padding: 0 12px; background: var(--ground);
  border: 1px solid var(--border); border-radius: 6px;
}
textarea { padding: 10px 12px; resize: vertical; line-height: 1.45; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.row { display: flex; gap: 8px; align-items: center; }
.row.tight { gap: 6px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }
.panel-heading { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---- start screen ---- */
.start { max-width: 640px; margin: 0 auto; padding: 64px 16px; display: flex; flex-direction: column; gap: 20px; }
.start-title { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: 0.01em; }
.start-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.start-panel h2 { margin: 0; font-size: 16px; }
/* Web edition: sign in and Account (AccountScreen.tsx). */
.account-form { display: flex; flex-direction: column; gap: 10px; }
.account-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.account-form input { font-weight: 400; }
.account-error { margin: 0; color: var(--danger, #b3261e); font-weight: 600; }
.account-note { margin: 0; font-weight: 600; }
.plan { display: flex; flex-direction: column; gap: 8px; }
.plan p { margin: 0; }
.checkout { display: flex; flex-direction: column; gap: 12px; }
.checkout p { margin: 0; }
.deleted-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.start-panel .row input { flex: 1; }
.recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.recent li { display: flex; gap: 6px; }
.recent-more { flex: none; width: 40px; padding: 0; font-size: 18px; }
.start-gear { position: fixed; top: 14px; right: 18px; z-index: 5; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
.start-gear svg { width: 22px; height: 22px; }
.recent-open { flex: 1; min-width: 0; text-align: left; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.recent-name { font-weight: 600; }
.recent-path { font-size: 12px; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }

/* ---- board screen ---- */
.board-screen { height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel); }
.brand { font-weight: 600; font-size: 17px; letter-spacing: 0.02em; }
.topbar-middle { flex: 1 1 220px; min-width: 0; display: flex; gap: 8px; }
.search { flex: 1; min-width: 0; position: relative; }
.search-count { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.topbar button[aria-label] { min-width: var(--control); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.clock { font-size: 13px; padding: 0 12px; min-height: var(--control); display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; }

.viewbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--bar); }
.viewbar .eyebrow { padding-left: 2px; }
.viewbar > * { flex: none; }
.viewbar > .view-strip { flex: 0 1 auto; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.view-strip::-webkit-scrollbar { display: none; }
.view-strip > button { flex: none; white-space: nowrap; }
.viewbar .view-arrow { min-width: 32px; padding: 0 6px; font-size: 20px; line-height: 1; }
.viewbar form input { width: 220px; }
.spacer { flex: 1 1 20px; }

.workspace { flex: 1; min-height: 0; display: flex; }
.tools { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; background: var(--panel); border-right: 1px solid var(--border); }
.tool { width: 84px; min-height: 52px; padding: 0 4px; font-size: 12px; overflow-wrap: normal; hyphens: manual; }
.tool-wrap { position: relative; }
.menu {
  position: absolute; left: calc(100% + 8px); top: 0; z-index: 20; width: 180px; padding: 6px;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 2px;
}
.menu button { border-color: transparent; text-align: left; display: flex; align-items: center; gap: 10px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; flex: none; }

.canvas { flex: 1; min-width: 0; position: relative; }
.empty-board {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); max-width: 380px; text-align: center;
  background: var(--ground); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 16px 20px; color: var(--muted);
  pointer-events: none;
}
.empty-board p { margin: 4px 0; }
.empty-board strong { color: var(--text); }
.legend {
  position: absolute; left: 16px; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; gap: 14px; max-width: calc(100% - 96px);
  background: var(--ground); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; font-size: 12px;
}
.legend span { display: flex; align-items: center; gap: 6px; }
.legend .line { display: inline-block; width: 22px; border-top: 2px solid var(--string-red); }
.legend .line.dashed { border-top-style: dashed; }
.legend .line.grey { border-top-color: #6b727c; }

.side { flex: 0 0 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 14px; background: var(--panel); border-left: 1px solid var(--border); }
.side-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.segmented { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.segmented button { flex: 1; border: 0; border-radius: 0; }
.segmented button + button { border-left: 1px solid var(--border); }

/* ---- inspector ---- */
.inspector, .history { display: flex; flex-direction: column; gap: 12px; }
.inspector-empty p { margin: 0 0 10px; }
.inspector-top { align-items: center; gap: 10px; }
.inspector-name { flex: 1; margin: 0; }
.inspector-name label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.inspector-name input { font-family: var(--display, Georgia, serif); font-size: 18px; }
.inspector-picture {
  width: 100%; max-width: 240px; align-self: center; aspect-ratio: 1; padding: 0; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: rgba(255, 250, 235, 0.5); border: 1px solid rgba(42, 31, 18, 0.35); border-radius: 4px;
}
.inspector-picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inspector-picture .emblem { width: 55%; height: 55%; opacity: 0.55; }
.ties { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ties .link { text-align: left; min-height: 0; padding: 3px 0; font-weight: 400; }
.tie-type { font-weight: 700; }
.inspector-more { border-top: 1px dashed rgba(42, 31, 18, 0.35); padding-top: 8px; }
.inspector-more > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.inspector-more[open] { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-size: 13px; font-weight: 500; padding: 0; margin-bottom: 2px; }
.field.checkbox { flex-direction: row; align-items: center; gap: 10px; }
.field.checkbox input { width: 20px; min-height: 20px; height: 20px; flex: none; accent-color: var(--selection); }
.field.checkbox label { font-weight: 400; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.string-ends { margin: 0; font-weight: 600; }
.chips { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding-left: 10px; border: 1px solid var(--border-strong); border-radius: 999px; }
.chip button { min-height: 32px; min-width: 32px; padding: 0; border: 0; border-radius: 999px; background: transparent; }

/* ---- history ---- */
.removed, .log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.removed li, .log li {
  background: var(--ground); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.removed-text, .log-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.removed-text .muted, .log-text .muted { font-size: 12px; }
.log li button, .removed li button { flex: none; font-size: 13px; padding: 0 10px; }
.removed li { user-select: none; cursor: default; }
.removed li > input[type='checkbox'] { flex: none; margin: 0; width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: var(--selection); }
.removed li .removed-text { flex: 1; }
.removed li.is-picked, .desk-theme .removed li.is-picked { outline: 2px solid var(--selection); outline-offset: -1px; }
.log li.is-undone .log-text > span:first-child { text-decoration: line-through; color: var(--muted); }

/* ---- cards and notes on the board ---- */
.card {
  width: 220px; background: var(--card-paper); color: var(--card-ink); border-radius: 4px; padding: 14px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45); display: flex; flex-direction: column; gap: 6px; position: relative;
}
/* Coloured by type (or the card's own colour): tinted paper and a strong band on the left. */
.card:not(.card-resolved) { --paper: color-mix(in srgb, var(--type, transparent) 30%, var(--card-paper)); background: var(--paper); border-left: 7px solid var(--type, transparent); }
.card.card-resolved { background: #8d9198; box-shadow: none; }
/* Type icon: the left band widens into a small square at the top with the type's icon (owner, 2026-10-18). */
/* One full square over the band's top, icon centred and filling it (owner, 2026-10-19). */
/* 44 px: the same square as the smallest name-only card (owner, 2026-10-19). */
.card { padding-left: 46px; }
.card-icon { position: absolute; left: -7px; top: 0; width: 44px; height: 44px; display: grid; place-items: center; background: var(--type, #3d434b); color: #fff8e6; border-radius: 4px 0 0 0; }
.card-icon svg { width: 26px; height: 26px; }
.card.is-selected, .note.is-selected { outline: 3px solid var(--selection); outline-offset: 2px; }
.card.is-match { outline: 3px solid var(--amber); outline-offset: 2px; }
.card.is-dimmed, .note.is-dimmed { opacity: 0.3; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 3px; }
.card-state { font-size: 11px; font-weight: 600; }
.card-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.card-sub { font-size: 12px; color: var(--card-muted); }
.card-resolved .card-sub { color: var(--card-ink); }
.card-line, .card-tags { font-size: 12px; overflow-wrap: anywhere; }
.card-tags { color: var(--card-muted); font-family: var(--mono); }

.react-flow__handle.pin {
  width: 16px; height: 16px; top: -8px; border-radius: 50%; background: var(--string-red);
  border: 2px solid #7d1f18; cursor: crosshair;
}
.card-resolved .react-flow__handle.pin { background: #6b727c; border-color: #3d434b; }
.board-region {
  width: 100%; height: 100%; box-sizing: border-box; border-radius: 4px; cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center; padding: 6px 14px; white-space: nowrap;
  background: rgba(42, 31, 18, 0.88); color: var(--parchment-light); border-left: 7px solid var(--type, transparent); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.board-region-name { font-family: var(--display, 'IM Fell English', Georgia, serif); font-size: 19px; }
.board-region-here {
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font: 11px system-ui, sans-serif;
  background: rgba(47, 93, 138, 0.9); color: var(--parchment-light); border: 1px solid var(--parchment-light); border-radius: 999px; padding: 1px 9px;
}
.board-region:hover { outline: 2px dashed #6cb6d9; outline-offset: 2px; }
.board-region.is-selected { outline: 3px solid var(--selection); outline-offset: 2px; }
.board-region.is-dimmed { opacity: 0.4; }
.board-region .react-flow__handle.pin { width: 12px; height: 12px; top: -6px; }
.react-flow__handle.pin:hover { transform: translate(-50%, 0) scale(1.25); }

.note {
  width: 180px; min-height: 60px; background: var(--note); color: var(--card-ink); padding: 12px; font-size: 13px;
  line-height: 1.4; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); transform: rotate(-1.5deg); white-space: pre-wrap; overflow-wrap: anywhere;
}
.note-empty { color: #6d5d22; font-style: italic; }

.string-label {
  position: absolute; pointer-events: all; background: var(--ground); color: var(--text); border: 1px solid var(--string-red);
  border-radius: 3px; padding: 2px 8px; font-family: var(--mono); font-size: 11px; white-space: nowrap;
}
.string-label.is-secret { border-style: dashed; }

.react-flow__controls button { min-height: 32px; }

/* ---- messages ---- */
/* In the top bar's free gap (TopBar Toast): at the bottom it hid screen text for its few seconds (playtest 2026-10-21).
   Screens without a top bar: fixed at the top. */
.toast {
  position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 100; max-width: min(560px, calc(100% - 32px));
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
.toast-error { border-color: var(--string-red); color: #f6c2bd; }
body:has(.toast.in-bar) .toast:not(.in-bar) { display: none; }
.screen-gap { position: relative; align-self: stretch; min-width: 0; }
.toast.in-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: max(100%, 240px); padding: 6px 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }

@media (max-width: 1100px) {
  .side { flex-basis: 280px; }
}

/* ---- shared page layout (sheet, library) ---- */
.page-screen { height: 100%; display: flex; flex-direction: column; }
.page-pad { padding: 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 20px; border-bottom: 1px solid var(--border); background: var(--bar); }
.page-title { flex: 1 1 260px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-title h1 { margin: 0; font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
button.link { background: transparent; border-color: transparent; color: var(--link); font-weight: 600; padding: 0 6px; }
button.link:hover:not(:disabled) { background: transparent; border-color: transparent; text-decoration: underline; }
.source-tag { font-size: 12px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 999px; padding: 2px 10px; }
.row.spread { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.align-start { align-self: flex-start; }
.align-end { align-self: flex-end; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--panel); }
.tabs button { border: 0; border-radius: 0; background: transparent; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs button:hover:not(:disabled) { background: transparent; color: var(--text); }
.tabs button[aria-selected='true'] { color: var(--text); font-weight: 600; border-bottom-color: var(--selection); }

.sheet-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; align-items: flex-start; }
.sheet-main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sheet-main.wide { flex-basis: 100%; max-width: 900px; }
.sheet-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.side-menu-tab { display: none; }
.side-menu-body { display: contents; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel-heading.spaced { margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-2 .span-2 { grid-column: span 2; }
.scores { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.score { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--ground); border: 1px solid var(--border); border-radius: 6px; padding: 6px 4px; }
.score label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; }
.score input { text-align: center; font-family: var(--mono); font-size: 18px; padding: 0 4px; min-height: 40px; border-color: transparent; background: transparent; }
.score input:hover { border-color: var(--border); }
.score-note { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.subcard { background: var(--ground); border: 1px solid var(--border); border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
textarea.mono { font-family: var(--mono); font-size: 13px; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--control); border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { flex: 1; min-height: var(--control); display: flex; align-items: center; cursor: pointer; overflow-wrap: anywhere; }
.checklist input { width: 20px; height: 20px; min-height: 20px; flex: none; accent-color: var(--selection); }

.connections { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.connections li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--ground); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }
.conn-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.conn-type { font-size: 12px; color: var(--muted); }
.tag-secret, .tag-known { font-size: 12px; border-radius: 999px; padding: 2px 10px; }
.tag-secret { border: 1px dashed var(--string-red); color: #f0b3ad; }
.tag-known { border: 1px solid var(--selection); color: var(--link); }
.add-connection { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; gap: 12px; align-items: end; }

/* ---- library ---- */
.library { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; align-items: flex-start; }
.library-templates { flex: 0 1 240px; gap: 8px; }
.template { text-align: left; display: flex; align-items: center; gap: 10px; }
.library-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.library-search { display: flex; flex-direction: column; gap: 10px; }
input.big { min-height: 48px; font-size: 16px; background: var(--panel); border-color: var(--border-strong); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { flex: 0 1 180px; }
.filters .field.range { flex-basis: 200px; }
.range-label { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.results li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--ground); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }
.result-name { font-weight: 600; }
.result-line { font-size: 12px; flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-wrap { overflow-x: auto; }
.srd-table { width: 100%; min-width: 520px; border-collapse: collapse; }
.srd-table th, .srd-table td { padding: 4px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.srd-table thead th { color: var(--muted); font-size: 12px; font-weight: 600; }
.srd-table tbody th { font-weight: 600; }
.srd-table .cell-action { text-align: right; }
.srd-table .cell-action button { font-size: 13px; padding: 0 12px; }
.attribution { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.4; }

@media (max-width: 760px) {
  .grid-2, .add-connection { grid-template-columns: minmax(0, 1fr); }
  .grid-2 .span-2 { grid-column: auto; }
  .scores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- parchment dialogs (used on every screen) ---- */
.dz-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 2px solid #3b2a14; border-radius: 6px;
  color: #2a1f12; background-color: var(--parchment-light); background-image: var(--tex-paper); background-size: 300px 300px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), inset 0 0 0 4px var(--parchment-light), inset 0 0 0 5px var(--stitch);
}
.dz-dialog.wide { width: min(820px, calc(100vw - 32px)); }
/* The title bar stays put; only the body scrolls. */
.dz-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.dz-dialog-head { flex: none; border-bottom: 1px solid rgba(122, 100, 64, 0.35); }
.dz-dialog-body { flex: 1 1 auto; min-height: 0; }
.dz-dialog-min { min-height: 36px; padding: 2px 12px; }
.dz-dialog-chip { position: fixed; right: 18px; bottom: 18px; z-index: 1000; display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  color: #f6ecd0; background: #2a1f12; border: 2px solid var(--stitch); border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); font-size: 14px; }
.dz-dialog-chip:hover { background: #3d2c18; }
.dz-dialog-spin { display: inline-block; color: #8fc3f2; animation: dz-spin 1.6s linear infinite; }
@keyframes dz-spin { to { transform: rotate(360deg); } }
.dz-dialog::backdrop { background: rgba(8, 6, 4, 0.6); }
.dz-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 4px; }
.dz-dialog-head h2 { margin: 0; font-family: 'IM Fell English', Georgia, serif; font-weight: 400; font-size: 26px; }
.dz-dialog-close { min-width: 44px; padding: 0; font-size: 24px; color: #2a1f12; background: transparent; border-color: transparent; }
.dz-dialog-close:hover:not(:disabled) { background: rgba(0, 0, 0, 0.06); border-color: #7a6440; }
.dz-dialog-body { padding: 8px 18px 18px; overflow-y: auto; }
.dz-form { display: flex; flex-direction: column; gap: 14px; }
.dz-dialog input, .dz-dialog select { color: #2a1f12; background: rgba(255, 250, 236, 0.85); border-color: #8a7350; }
.dz-dialog button { color: #2a1f12; background: rgba(255, 248, 228, 0.6); border-color: #7a6440; }
.dz-dialog button.link-button { background: transparent; }
.dz-dialog button:hover:not(:disabled) { background: #fffaf0; border-color: #2a1f12; }
.dz-dialog button.primary { color: #fbe9d0; background: var(--wax); border-color: #4a120d; }
.dz-dialog button.primary:hover:not(:disabled) { background: #a5352a; border-color: #4a120d; }
.dz-dialog button.primary:disabled { color: var(--parchment); background: #7a6a4c; border-color: #7a6a4c; }
.dz-dialog button.danger { color: var(--wax); border-color: var(--wax); background: transparent; }
.dz-dialog .hint { color: #5a4a32; }
.dz-dialog :focus-visible { outline-color: var(--wax); }
.dz-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; padding-top: 4px; }
input.short { width: 84px; }
.field-error { color: var(--wax); font-size: 13px; }
.emblem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.emblem-choice {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; cursor: pointer; font-size: 12px;
  border: 1px solid #8a7350; border-radius: 4px; background: rgba(255, 250, 236, 0.6);
}
.emblem-choice input { position: absolute; opacity: 0; pointer-events: none; }
.emblem-choice .emblem { width: 52px; height: 52px; }
.emblem-choice.is-chosen { border: 2px solid var(--wax); background: #fffaf0; }
.emblem-choice:focus-within { outline: 2px solid var(--wax); outline-offset: 2px; }

/* ---- sheet extras ---- */
.colour-input { width: 64px; padding: 2px; }
.custom-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: end; }
@media (max-width: 760px) { .custom-field { grid-template-columns: minmax(0, 1fr); } }
/* The scrollbar stays inside the dialog frame (below the title bar line, clear of the gold border), and the
   bottom buttons stay in sight while the body scrolls. */
.dz-dialog-body { margin: 0 6px 6px 0; scrollbar-width: thin; scrollbar-color: #8a7350 transparent; }
.dz-dialog-body > .dz-form > .dz-actions:last-child { position: sticky; bottom: -18px; z-index: 2; margin: 0 -18px -18px; padding: 10px 18px 12px;
  background-color: var(--parchment-light); background-image: var(--tex-paper); background-size: 300px 300px; border-top: 1px solid rgba(122, 100, 64, 0.35); }

/* Growing text boxes (owner, 2026-10-14): grow with the words to about two paragraphs, then scroll; the corner handle
   still pulls the box bigger (a pulled box has its own height, so the cap comes off). */
textarea.grow { field-sizing: content; min-height: calc(var(--rows, 1) * 1lh + 22px); max-height: calc(10lh + 22px); }
textarea.grow.line { padding-top: 8px; padding-bottom: 8px; min-height: var(--control); }
textarea.grow[style*="height"] { max-height: none; }

.toast-action { margin-left: 12px; min-height: 0; padding: 2px 10px; font-weight: 600; }
/* Desk style (docs/UI_SPEC.md): a DM's table of dark wood, a leather mat,
   parchment, brass and wax. Textures come from desk-textures.css. */
/* Procedural textures (SVG noise), generated by hand-tuned filters. No image files. */

:root {
  --tex-wood: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.11' numOctaves='4' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.05  0 0 0 0 0.02  1.6 0 0 0 -0.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23g%29'/%3E%3C/svg%3E");
  --tex-wood-fine: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.02 0.6' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.85  0 0 0 0 0.6  0.35 0 0 0 -0.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23f%29'/%3E%3C/svg%3E");
  --tex-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0.36  0 0 0 0 0.26  0 0 0 0 0.12  0.55 0 0 0 -0.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23p%29'/%3E%3C/svg%3E");
  --tex-blotch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008' numOctaves='3' seed='21'/%3E%3CfeColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.3  0 0 0 0 0.12  1.4 0 0 0 -0.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23b%29'/%3E%3C/svg%3E");
  --tex-leather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='l'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.09' numOctaves='3' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0.04  0 0 0 0 0.03  0.9 0 0 0 -0.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23l%29'/%3E%3C/svg%3E");
  --tex-cork: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' seed='13'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0 0 0 0 0.55 0.85 1'/%3E%3C/feComponentTransfer%3E%3CfeColorMatrix values='0 0 0 0 0.32  0 0 0 0 0.19  0 0 0 0 0.08  0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23c%29'/%3E%3C/svg%3E");
  --tex-cork-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.3' numOctaves='2' seed='29'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0 0 0 0 0 0.6 0.9'/%3E%3C/feComponentTransfer%3E%3CfeColorMatrix values='0 0 0 0 0.93  0 0 0 0 0.78  0 0 0 0 0.55  0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23k%29'/%3E%3C/svg%3E");
}

:root {
  --desk: #24160c;
  --mat: #1f3a36;
  --mat-dark: #142825;
  --stitch: #a8884f;
  --wood: #6a4526;
  --wood-edge: #150c06;
  --parchment: #e8d9b0;
  --parchment-light: #f1e6c6;
  --parchment-canvas: #d9c69a;
  --ink: #2a1f12;
  --ink-muted: #5a4a32;
  --wax: #8f2a21;
  --gold: #f6c945;
  --brass-hi: #f3d08a;
  --brass: #b5852f;
  --brass-lo: #5e3f12;
  --display: 'IM Fell English', Georgia, serif;
}

/* ---- the table ---- */
.desk-screen {
  height: 100%; display: flex; overflow: hidden; color: var(--parchment-light);
  background-color: #2e1c0e;
  background-image:
    radial-gradient(ellipse at 50% 35%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    var(--tex-wood-fine),
    var(--tex-wood),
    repeating-linear-gradient(180deg, transparent 0 196px, rgba(0, 0, 0, 0.55) 196px 199px, rgba(255, 214, 160, 0.07) 199px 201px),
    linear-gradient(90deg, #3a2412, #4a2e16 30%, #3c2512 60%, #4b3018);
  background-size: auto, 400px 400px, 700px 700px, auto, auto;
}
.desk-loading { margin: auto; font-family: var(--display); font-size: 22px; }

/* ---- the rail ---- */
.rail {
  flex: 0 0 88px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 8px;
  min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4a3216 transparent;
  background: linear-gradient(90deg, #120b05, #1e130a 70%, #120b05);
  border-right: 2px solid #000; box-shadow: 4px 0 18px rgba(0, 0, 0, 0.6);
}
.rail-mark {
  font-family: var(--display); font-size: 22px; text-align: center; color: var(--gold);
  border: 1px solid var(--brass); border-radius: 50%; width: 48px; height: 48px; margin: 4px auto 12px;
  display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #3a2412, #120b05);
}
.rail-item {
  min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: transparent; border: 1px solid transparent; color: #d8c7a0; font-size: 12px; padding: 4px;
}
.rail-item:hover:not(:disabled) { background: rgba(246, 201, 69, 0.08); border-color: #4a3216; }
.rail-item[aria-current='page'] { color: var(--gold); border-color: var(--brass); background: rgba(246, 201, 69, 0.12); }
.rail-item span { text-align: center; line-height: 1.15; }
/* Rail buttons never squeeze (a short window used to shrink the Session prep icon and spill labels): the rail scrolls instead. */
.rail-item, .rail-item svg { flex: none; }
@media (max-height: 960px) { /* 3.9: Calendar on the rail too */
  .rail { gap: 2px; padding: 8px 5px; }
  .rail .rail-item { min-height: 0; gap: 2px; padding: 3px 4px; }
  .rail-item svg { width: 18px; height: 18px; }
  .rail-item span { line-height: 1.1; font-size: 11px; }
}
/* A screen open in a window of its own: small mark on its rail button, faint picture in the main window. */
.rail-item { position: relative; }
.rail-popped { position: absolute; top: 3px; right: 6px; font-style: normal; font-size: 11px; opacity: 0.7; }
.popped-out { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; margin: 14px; border: 1px dashed rgba(246, 236, 208, 0.18); border-radius: 6px; background: rgba(20, 12, 4, 0.25); color: rgba(246, 236, 208, 0.45); box-shadow: none; cursor: pointer; }
.popped-out:hover { color: rgba(246, 236, 208, 0.7); background: rgba(20, 12, 4, 0.35); }
.popped-icon svg { width: 120px; height: 120px; stroke-width: 1; opacity: 0.35; }
.popped-text { font-family: 'IM Fell English', serif; font-size: 20px; }
.rail-group { margin: 8px 4px 0; padding-top: 6px; border-top: 1px solid rgba(214, 194, 150, 0.22); font-family: var(--display); font-style: italic; font-size: 12px; color: #cdb68a; }

/* ---- page scaffold ---- */
.desk {
  flex: 1; min-width: 0; overflow-y: auto; padding: 16px 24px 32px; display: flex; flex-direction: column; gap: 18px;
  position: relative;
}
.desk-head { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.desk-candle { flex: none; margin: -20px -8px -28px -6px; }
.desk-title { flex: 1; min-width: 0; }
.desk-eyebrow { font-family: var(--display); font-style: italic; color: #cdb68a; font-size: 15px; }
.desk-title h1 {
  margin: 0; font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1.05; color: var(--parchment-light);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(246, 201, 69, 0.18); overflow-wrap: anywhere;
}
.desk-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- buttons in desk style ---- */
button.brass {
  min-height: 44px; padding: 0 16px; border-radius: 6px; color: #2a1806; font-weight: 600;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #8a621f);
  border: 1px solid #3b2608; box-shadow: inset 0 1px 0 rgba(255, 245, 210, 0.7), 0 2px 4px rgba(0, 0, 0, 0.5);
}
button.brass:hover:not(:disabled) { border-color: #3b2608; }
/* Greyed brass, words still dark enough to read (Review › Approve all unflagged was brown on brown; playtest 2026-10-21). */
button.brass:disabled { color: #3b2a14; filter: saturate(0.25); }
button.ink-button {
  min-height: 44px; padding: 0 14px; border-radius: 4px; color: var(--ink); background: rgba(255, 248, 228, 0.55);
  border: 1px solid #7a6440; font-weight: 600;
}
button.ink-button:hover:not(:disabled) { background: rgba(255, 250, 236, 0.9); border-color: var(--ink); }
button.ink-button:disabled, .desk-theme button.ink-button:disabled { color: #6d5f45; }
button.wax {
  min-height: 48px; padding: 0 22px; border-radius: 999px; color: #fbe9d0; font-family: var(--display); font-size: 18px;
  background: radial-gradient(circle at 40% 35%, #b5392d, var(--wax) 60%, #5e1812); border: 2px solid #4a120d;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 200, 180, 0.4);
}
button.wax:hover:not(:disabled) { background: radial-gradient(circle at 40% 35%, #c9473a, #9c3026 60%, #5e1812); border-color: #4a120d; }
select.ink-select { min-height: 44px; width: auto; color: var(--ink); background: rgba(255, 248, 228, 0.7); border: 1px solid #7a6440; }
select.ink-select.on-wood { background: var(--parchment); }
.desk button:focus-visible, .desk select:focus-visible, .desk textarea:focus-visible, .desk input:focus-visible,
.rail button:focus-visible, .mapview-frame:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

/* ---- the DM screen ---- */
.dm-screen {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 14px;
  background:
    var(--tex-wood),
    linear-gradient(180deg, #7a5230, var(--wood) 40%, #4a2f17);
  background-size: 700px 700px, auto;
  border: 3px solid var(--wood-edge); border-radius: 6px;
  box-shadow: inset 0 0 0 2px #8d6438, inset 0 0 22px rgba(0, 0, 0, 0.6), 0 10px 24px rgba(0, 0, 0, 0.6);
}
.dm-panel, .parchment-note {
  position: relative; color: var(--ink); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background-color: var(--parchment);
  background-image: radial-gradient(ellipse at 50% 40%, transparent 50%, rgba(120, 80, 30, 0.35) 100%), var(--tex-blotch), var(--tex-paper);
  background-size: auto, 600px 600px, 300px 300px;
  box-shadow: inset 0 0 0 1px rgba(90, 60, 20, 0.35), 0 2px 6px rgba(0, 0, 0, 0.5);
  border-radius: 2px;
}
.panel-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--ink); }
.ink-muted { color: var(--ink-muted); font-size: 13px; }
.clock-dial { width: 100%; max-height: 120px; }
.dial-time { font-family: var(--mono); font-size: 13px; fill: #fffbe8; paint-order: stroke; stroke: rgba(0, 0, 0, 0.6); stroke-width: 3px; }
.clock-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.clock-text { font-family: var(--mono); font-size: 18px; }
.moon-panel { align-items: center; text-align: center; }
.moon-panel .panel-title { align-self: stretch; text-align: left; }
.moon-disc { width: 104px; height: 104px; }
.moon-name { font-family: var(--display); font-size: 20px; }
.ledger { list-style: none; margin: 0; padding: 0; flex: 1; }
.ledger li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px; border-bottom: 1px dashed rgba(90, 74, 50, 0.45); }
.ledger li:last-child { border-bottom: 0; }
.ledger-name { min-height: 32px; padding: 0; border: 0; background: transparent; color: var(--ink); font-family: var(--display); font-size: 17px; text-decoration: underline; text-underline-offset: 3px; }
.ledger-name:hover:not(:disabled) { background: transparent; color: var(--wax); }
.dm-panel > button.ink-button { align-self: flex-start; }

/* ---- the leather mat ---- */
.mat {
  position: relative; display: grid; gap: 20px; padding: 26px;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(250px, 320px);
  grid-template-areas: 'stories map journal' 'party party party';
  background-color: var(--mat);
  background-image: radial-gradient(ellipse at 50% 40%, rgba(60, 110, 100, 0.35), transparent 70%), var(--tex-leather);
  background-size: auto, 300px 300px;
  border-radius: 14px; border: 2px solid #0c1a18;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55), 0 14px 30px rgba(0, 0, 0, 0.6);
}
.mat::before {
  content: ''; position: absolute; inset: 9px; border: 2px dashed var(--stitch); border-radius: 9px; pointer-events: none; opacity: 0.85;
}
.mat-heading {
  margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--parchment-light);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}
.mat-stories { grid-area: stories; min-width: 0; z-index: 1; }
.mat-map { grid-area: map; min-width: 0; z-index: 1; }
.mat-journal { grid-area: journal; min-width: 0; display: flex; flex-direction: column; gap: 18px; z-index: 1; }
.mat-party { grid-area: party; min-width: 0; z-index: 1; }

.prop { position: absolute; pointer-events: none; filter: drop-shadow(3px 6px 6px rgba(0, 0, 0, 0.55)); }
.leaf-a { top: -26px; right: 180px; transform: rotate(28deg); z-index: 2; }
.leaf-b { bottom: 40px; left: -30px; transform: rotate(-40deg) scale(0.8); z-index: 2; }
.mat-d20 { right: 190px; bottom: 60px; transform: rotate(14deg); z-index: 2; }
.mat-potion { right: -14px; top: 300px; transform: rotate(-8deg); z-index: 2; }
.candle { position: relative; width: 80px; height: 150px; }
.candle svg { position: relative; z-index: 1; }
.candle-glow {
  position: absolute; left: 50%; top: 30px; width: 220px; height: 220px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 90, 0.35), rgba(255, 160, 60, 0.08) 45%, transparent 70%);
  animation: glow 3.5s ease-in-out infinite;
}
.candle .flame { transform-origin: 40px 46px; animation: flicker 2.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 30% { transform: scale(0.95, 1.06) skewX(2deg); } 60% { transform: scale(1.04, 0.96) skewX(-2deg); } }
@keyframes glow { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .candle .flame, .candle-glow { animation: none; } }

/* ---- tarot cards ---- */
.tarot-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tarot {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px 8px 10px; min-height: 236px;
  color: var(--ink); text-align: center; border-radius: 8px; cursor: pointer;
  background-color: var(--parchment-light);
  background-image: var(--tex-paper);
  background-size: 300px 300px;
  border: 2px solid #3b2a14;
  box-shadow: inset 0 0 0 4px var(--parchment-light), inset 0 0 0 5px var(--stitch), 0 6px 14px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tarot-slot { position: relative; display: flex; flex-direction: column; }
.tarot-slot > .tarot { flex: 1; }
.tarot-slot:nth-child(odd) > .tarot, .party-row > .tarot:nth-child(odd) { transform: rotate(-1.2deg); }
.tarot-slot:nth-child(even) > .tarot, .party-row > .tarot:nth-child(even) { transform: rotate(1deg); }
.tarot-edit {
  position: absolute; top: -10px; right: -10px; z-index: 3; min-width: 40px; min-height: 40px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; color: #fbe9d0; background: radial-gradient(circle at 40% 35%, #b5392d, var(--wax) 60%, #5e1812);
  border: 2px solid #4a120d; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.tarot-edit:hover:not(:disabled) { background: radial-gradient(circle at 40% 35%, #c9473a, #9c3026 60%, #5e1812); border-color: #4a120d; }
.cartouche-button {
  font-family: var(--display); font-size: 24px; padding: 2px 26px; min-height: 44px; color: var(--ink); border-radius: 0;
  border: 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: rgba(255, 248, 228, 0.5);
}
.cartouche-button:hover:not(:disabled) { background: rgba(255, 252, 240, 0.85); border-color: var(--ink); }
button.tarot:hover:not(:disabled) {
  transform: translateY(-4px) rotate(0deg); background-color: #fff6dc; border-color: #3b2a14;
  box-shadow: inset 0 0 0 4px #fff6dc, inset 0 0 0 5px var(--stitch), 0 12px 22px rgba(0, 0, 0, 0.65);
}
.tarot.is-dimmed { filter: grayscale(0.7) brightness(0.8); }
.tarot-numeral { font-family: var(--display); font-size: 15px; letter-spacing: 0.1em; min-height: 18px; }
.tarot-art {
  flex: 1; min-height: 96px; display: grid; place-items: center; border: 1px solid #6b5636; border-radius: 3px;
  background: radial-gradient(circle at 50% 40%, #f6ecd0, #d8c494);
}
.tarot-art .emblem { width: 76%; max-width: 110px; height: auto; }
.tarot-title {
  font-family: var(--display); font-size: 17px; line-height: 1.15; padding: 4px 4px; border-top: 1px solid #6b5636;
  border-bottom: 1px solid #6b5636; overflow-wrap: anywhere;
}
.tarot-sub { font-size: 12px; color: var(--ink-muted); }
.tarot-footer { font-size: 12px; font-family: var(--mono); color: var(--ink); }
.tarot-new {
  justify-content: center; align-items: center; gap: 8px; font-family: var(--display); font-size: 17px; color: var(--parchment-light);
  background: rgba(10, 25, 22, 0.35); border: 2px dashed var(--stitch); box-shadow: none;
}
.tarot-new:nth-child(odd), .tarot-new:nth-child(even) { transform: none; }
button.tarot-new:hover:not(:disabled) { background: rgba(10, 25, 22, 0.55); color: var(--gold); box-shadow: none; transform: none; border-color: var(--gold); }
.tarot-plus { font-size: 40px; line-height: 1; }
.tarot-form { cursor: default; align-items: stretch; text-align: left; font-family: var(--sans); font-size: 13px; padding: 12px; }
.tarot-form input { color: var(--ink); background: var(--parchment-light); }
.tarot-form .ink-button { color: var(--ink); background: var(--parchment); }

.party-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.tarot-pc { min-height: 250px; }
.pc-stats { display: flex; justify-content: space-around; gap: 4px; }
.pc-stats b { font-family: var(--sans); font-size: 10px; color: var(--ink-muted); }

/* ---- the map on parchment ---- */
.parchment-sheet {
  position: relative; isolation: isolate; padding: 22px; color: var(--ink); display: flex; flex-direction: column; gap: 10px;
  height: 100%; min-height: 460px;
}
.parchment-sheet::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 3px;
  background-color: var(--parchment-canvas);
  background-image: radial-gradient(ellipse at 50% 45%, rgba(255, 240, 200, 0.5), transparent 60%, rgba(110, 70, 20, 0.45) 100%), var(--tex-blotch), var(--tex-paper);
  background-size: auto, 600px 600px, 300px 300px;
  filter: url(#dz-rough) drop-shadow(0 10px 16px rgba(0, 0, 0, 0.6));
  will-change: transform; /* own layer: the torn-edge filter runs once, not on every repaint inside the sheet (speed) */
}
.parchment-sheet > * { position: relative; }
.map-cartouche { align-self: center; margin-bottom: -4px; }
.map-cartouche span {
  display: inline-block; font-family: var(--display); font-size: 24px; padding: 2px 26px; color: var(--ink);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: rgba(255, 248, 228, 0.5);
}
.map-actions { justify-content: center; }
.map-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 20px; }
.map-empty h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; }
.map-empty p { margin: 0; max-width: 380px; color: var(--ink-muted); }
.map-empty-rose { position: static; width: 120px; height: 120px; filter: none; opacity: 0.85; }

.mapview { position: relative; flex: 1; min-height: 340px; display: flex; }
.mapview-frame {
  position: relative; flex: 1; overflow: hidden; cursor: grab; touch-action: none; user-select: none; border: 2px solid #4a3a22;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 200, 0.4), inset 0 0 30px rgba(60, 35, 10, 0.4);
  background: #cdb88a;
}
.mapview-frame:active { cursor: grabbing; }
.mapview-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mapview-layer img { display: block; max-width: none; user-select: none; }
.mapview-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.mapview-controls {
  position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  background: rgba(241, 230, 198, 0.92); border: 1px solid #6b5636; border-radius: 6px; padding: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.mapview-controls button {
  min-width: 44px; min-height: 40px; padding: 0 6px; color: var(--ink); background: transparent; border: 1px solid transparent; font-size: 18px; font-weight: 600;
}
.mapview-controls button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.6); border-color: #6b5636; }
.mapview-zoom { text-align: center; font-size: 11px; color: var(--ink); }
.desk-mapview { min-height: 380px; }

/* ---- journal ---- */
.journal {
  padding: 14px 14px 14px 22px; border-radius: 8px;
  background-color: #4a2a16;
  background-image: var(--tex-leather), linear-gradient(135deg, #6b3d1f, #3d2010);
  background-size: 300px 300px, auto;
  border: 2px solid #1d0f06; box-shadow: inset 0 0 0 3px #7a4a26, inset 6px 0 0 0 #2b170a, 0 10px 22px rgba(0, 0, 0, 0.6);
}
.journal-page {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; color: var(--ink);
  background-color: var(--parchment-light);
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(90, 74, 50, 0.22) 27px 28px), var(--tex-paper);
  background-size: auto, 300px 300px;
  box-shadow: inset 8px 0 12px -6px rgba(80, 50, 20, 0.5);
}
.journal-quill { right: -40px; top: -26px; transform: rotate(-24deg) scale(0.8); z-index: 2; }
.journal-title { font-family: var(--display); font-size: 22px; }
.journal-page textarea {
  min-height: 220px; background: transparent; border: 0; padding: 4px 2px; color: #24180b; resize: vertical;
  font-family: var(--display); font-style: italic; font-size: 17px; line-height: 28px;
}
.journal-page textarea::placeholder { color: #8a7a5c; }
.journal-hint { font-size: 12px; color: var(--ink-muted); }
.chest { display: flex; flex-direction: column; gap: 8px; }

/* ---- full map screen ---- */
.map-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w, 300px); grid-template-rows: minmax(0, 1fr); gap: 22px; min-height: 0; }
/* The map row fits the screen (a long side list scrolls, no minimum height), so the map frame stays on screen
   and the map opens centred where you can see it. */
.map-sheet { min-height: 0; }
.full-mapview { min-height: 0; }
.map-side { align-self: start; gap: 10px; min-height: 0; max-height: 100%; overflow-y: auto; }
.ink-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.map-sheet { position: relative; }
.map-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 8px;
  background: rgba(255, 248, 228, 0.85); border: 1px dashed #6b5636; border-radius: 3px; color: var(--ink); font-size: 14px;
}
.map-toolbar strong { font-family: var(--display); font-weight: 400; font-size: 17px; }
.map-foot { margin: 8px 0 0; font-size: 13px; }
.map-foot .map-travel { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 8px; vertical-align: middle; }
.confirm-travel {
  position: absolute; right: 26px; top: 26px; z-index: 5; width: min(340px, calc(100% - 52px));
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
  background: var(--parchment-light, #f6ecd0); color: var(--ink); border: 1px solid #6b5636; border-radius: 3px;
  box-shadow: 0 10px 24px rgba(20, 12, 4, 0.45);
}
.confirm-travel h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 21px; }
.confirm-travel .travel-warn { margin: 0; padding: 6px 8px; font-size: 13px; background: #f5e2b0; border-left: 3px solid #b5852f; color: var(--ink); }
.confirm-travel p { margin: 0; font-size: 14px; }
.confirm-travel input.short { width: 64px; }
.confirm-travel .drag-title { cursor: move; user-select: none; touch-action: none; }
.travel-scale { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px dashed #a8916a; font-size: 13px; }
.map-toolbar .row.tight > * { white-space: nowrap; }
.mapview-svg .scale-key, .mapview-svg .scale-move { cursor: move; }
.mapview-svg .scale-key:hover .scale-bar-ground { stroke: var(--gold); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.mapview-svg .scale-end { fill: var(--gold); stroke: #2a1f12; stroke-width: 1px; vector-effect: non-scaling-stroke; cursor: ew-resize; }
.map-toolbar .row.tight { display: inline-flex; align-items: center; gap: 6px; }
.map-toolbar input.short { width: 64px; }
.map-toolbar .danger-text { color: var(--wax); }
.region-panel { display: flex; flex-direction: column; gap: 8px; }
.region-name { word-break: break-word; }
.side-h {
  margin: 8px 0 0; font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--ink);
  border-bottom: 1px solid rgba(42, 31, 18, 0.25); padding-bottom: 2px;
}
.here-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.here-list li { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.here-list .ledger-name { min-height: 26px; font-size: 15px; text-align: left; }
.here-more { flex-basis: 100%; margin: 0 0 4px 12px; font-size: 13px; }
.here-more summary { cursor: pointer; color: var(--ink-muted); }
.here-more p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.here-stat { font-size: 12px; }
.enc-side-row { position: relative; }
.here-list button.enc-side-add { position: absolute; right: 0; top: 1px; min-height: 0; height: 24px; background: #f3e6c4; line-height: 1; padding: 0 8px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; }
.enc-side-row:hover button.enc-side-add, .here-list button.enc-side-add:focus-visible { opacity: 1; pointer-events: auto; }
.here-party { margin: 0; display: flex; align-items: center; gap: 8px; }
.party-badge { background: var(--wax); }
.region-notes { margin: 0; white-space: pre-wrap; font-size: 14px; }
button.ink-button.danger-ink { color: #7a1e16; border-color: #7a1e16; }
button.ink-button.danger-ink:hover:not(:disabled) { background: #7a1e16; color: #fff3e0; }
.mapview-svg .vertex { fill: var(--gold); stroke: #2a1f12; stroke-width: 2px; vector-effect: non-scaling-stroke; cursor: move; }
.mapview-svg .vertex:hover { fill: #fff3c4; }
.mapview-svg .vertex.is-picked { fill: #fff3c4; stroke: var(--wax); stroke-width: 3px; }
.mapview-svg .party-token { filter: drop-shadow(0 3px 3px rgba(20, 12, 4, 0.6)); }
.mapview-svg .party-token.is-draggable { cursor: grab; }
.mapview-svg .party-token.is-dragging { cursor: grabbing; opacity: 0.85; }
.mapview-svg .map-hint-text { font-family: var(--display); paint-order: stroke; stroke: #f6ecd0; stroke-width: 4px; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }

@media (max-width: 1280px) {
  .mat { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); grid-template-areas: 'map journal' 'stories stories' 'party party'; }
  .tarot-stack { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .mat-d20, .egg-dice { display: none; }
}
@media (max-width: 900px) {
  .mat { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'map' 'journal' 'stories' 'party'; }
  .map-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { flex-basis: 72px; }
  .rail-item span { font-size: 10px; }
}

/* ---- day and night lighting (TableLighting) ---- */
.table-lighting { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.table-lighting > div { position: absolute; inset: 0; transition: opacity 1.2s ease; }
.light-shade { background: rgb(8, 12, 30); }
.light-twilight { background: linear-gradient(180deg, rgba(255, 128, 60, 0.45), rgba(150, 70, 140, 0.25)); mix-blend-mode: soft-light; }
.light-glow { mix-blend-mode: screen; }
.candle-light { position: absolute; left: 50%; top: 30px; width: 2px; height: 2px; }
.candle.is-out .smoke { animation: smoke 4s ease-in-out infinite; transform-origin: 40px 44px; }
@keyframes smoke { 0%, 100% { opacity: 0.15; transform: translateY(0); } 50% { opacity: 0.5; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .candle.is-out .smoke { animation: none; } .table-lighting > div { transition: none; } }
.candle.mat-candle { position: absolute; right: 70px; bottom: 40px; z-index: 2; }
.light-toggle[aria-pressed='false'] { filter: saturate(0.5); }

/* ---- live session ---- */
.live-seal {
  flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 18px;
  color: #fbe9d0; background: radial-gradient(circle at 40% 35%, #c9473a, var(--wax) 60%, #5e1812); border: 3px solid #4a120d;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 3px rgba(255, 200, 180, 0.25);
}
.live-seal.off { filter: grayscale(0.8) brightness(0.7); }
.live-screen-bar { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.health-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.health-pct { font-family: var(--display); font-size: 34px; line-height: 1; }
.hp-bar { height: 10px; border-radius: 6px; background: rgba(90, 74, 50, 0.3); border: 1px solid #6b5636; overflow: hidden; }
.hp-bar.big { height: 14px; }
.hp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--wax), #c4433a); transition: width 0.4s ease; }
.tally { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tally li { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 6px; min-height: 36px; border-bottom: 1px dashed rgba(90, 74, 50, 0.45); }
.tally-n { font-size: 20px; min-width: 1.4em; text-align: center; }
.desk-theme .tally-add, .tally-add { min-width: 26px; width: 26px; min-height: 26px; height: 26px; padding: 0; font-size: 16px; line-height: 1; color: var(--parchment-light); background: #2a1f12; border-color: #000; }
.tally-add:hover:not(:disabled) { background: #3d2c18; }
.dm-panel.advisor { color: var(--parchment-light); background: #1d140c; background-image: none; box-shadow: inset 0 0 0 1px #6b4a26, 0 2px 6px rgba(0, 0, 0, 0.5); }
.dm-panel.advisor .panel-title { color: var(--parchment-light); display: flex; align-items: center; gap: 8px; }
.advisor-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.advisor-notes li { padding: 8px 10px; border-left: 4px solid #e0a800; background: rgba(0, 0, 0, 0.35); font-size: 14px; line-height: 1.35; }
.advisor-notes li.note-warn { border-left-color: #d2453a; }
.advisor-quiet { margin: 0; color: #cdb68a; font-style: italic; }

.live-mat { grid-template-columns: var(--left-w, 340px) minmax(0, 1fr) var(--side-w, 300px); grid-template-areas: 'left map party'; }
.live-left { grid-area: left; display: flex; flex-direction: column; gap: 16px; min-width: 0; z-index: 1; }
.live-map { grid-area: map; min-width: 0; z-index: 1; }
/* The map keeps its own height and stays in view while a long party (six cards) scrolls past (was stretched: blank parchment). */
.live-mat { align-items: start; }
.live-map { position: sticky; top: 84px; }
.live-map .desk-mapview { height: auto; max-height: 70vh; min-height: 0; flex: none; }
.live-map .parchment-sheet { height: auto; min-height: 0; }
.live-party { grid-area: party; display: flex; flex-direction: column; gap: 12px; min-width: 0; z-index: 1; }
.quicklog textarea { color: var(--ink); background: rgba(255, 252, 240, 0.85); border: 1px solid #8a7350; font-family: var(--display); font-size: 17px; }
.time-choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.time-choices legend { font-size: 13px; color: var(--ink-muted); margin-bottom: 4px; }
.chip-radio { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid #7a6440; border-radius: 18px; cursor: pointer; font-size: 13px; color: var(--ink); }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio.is-on { background: #2a1f12; color: var(--parchment-light); border-color: #000; }
.chip-radio:focus-within { outline: 2px solid var(--wax); outline-offset: 2px; }
button.ink-button.primary-ink { color: var(--parchment-light); background: #2a1f12; border-color: #000; }
button.ink-button.primary-ink:hover:not(:disabled) { background: #3d2c18; color: #fff; }
button.ink-button.primary-ink:disabled { background: #6f6048; color: var(--parchment); }
.met-row select { flex: 1; min-width: 0; }
.session-log { background: #1d140c; color: var(--parchment-light); border: 1px solid #6b4a26; border-radius: 4px; padding: 12px 14px; }
.session-log .panel-title { color: var(--parchment-light); font-size: 20px; margin-bottom: 6px; }
.session-log ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.session-log li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: start; column-gap: 8px;
  padding: 6px 0; border-bottom: 1px solid #3d2c18; font-size: 14px;
}
.session-log .log-time { grid-column: 1; grid-row: 1; padding-top: 2px; }
.session-log .log-kind { grid-column: 1; grid-row: 2; justify-self: start; margin-top: 2px; }
.session-log .log-text, .session-log .log-edit { grid-column: 2; grid-row: 1 / span 2; }
.session-log .log-actions { grid-column: 3; grid-row: 1 / span 2; }
.log-time { font-size: 11px; color: #cdb68a; }
.log-kind { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; background: #4a3a22; }
.log-kind.k-fight { background: var(--wax); }
.log-kind.k-meeting { background: #2f5d8a; }
.log-kind.k-quest { background: #7a5a12; }
.log-kind.k-rest { background: #24553a; }
.log-text { min-width: 0; overflow-wrap: anywhere; }
.log-text em { color: #cdb68a; font-style: normal; font-size: 12px; }
.log-actions { display: flex; gap: 4px; margin-left: auto; }
.log-actions button, .log-edit button { min-height: 32px; min-width: 32px; padding: 0 8px; font-size: 12px; color: var(--parchment-light); background: transparent; border-color: #4a3a22; }
.log-edit { display: flex; gap: 6px; min-width: 0; }
.log-edit input { min-height: 36px; color: var(--ink); background: var(--parchment-light); }
.log-empty { margin: 0; color: #cdb68a; font-style: italic; }
.ink-hint { color: var(--ink-muted); text-align: center; }
.mat-hint { color: #d6c296; margin: 0; }

.pc-live {
  --tint: #23395b; padding: 10px 12px; border-radius: 6px; color: #fbf3df; display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 85%, #fff 15%), var(--tint)); border: 2px solid var(--parchment-light);
  box-shadow: inset 0 0 0 2px var(--tint), 0 6px 12px rgba(0, 0, 0, 0.5);
}
.pc-live-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-live-name { min-height: 36px; padding: 0 4px; border: 0; background: transparent; color: #fbf3df; font-family: var(--display); font-size: 19px; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.pc-live-hp { min-height: 36px; padding: 0 6px; border: 1px solid transparent; background: transparent; color: #fbf3df; font-size: 14px; }
.desk-theme .pc-live-name:hover:not(:disabled), .desk-theme .pc-live-hp:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.pc-live .hp-bar { background: rgba(0, 0, 0, 0.35); border-color: rgba(0, 0, 0, 0.5); }
.pc-live .hp-bar span { background: linear-gradient(90deg, var(--parchment), #fff6dc); }
.hp-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hp-buttons button { min-height: 44px; padding: 0; font-weight: 700; color: var(--ink); background: var(--parchment); border: 1px solid #3b2a14; }
.desk-theme .hp-buttons button:hover:not(:disabled) { background: #fffaf0; border-color: #000; }
.pc-live-hint { margin: 0; font-size: 12px; opacity: 0.85; }
.pc-live-stats { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.pc-live-checks summary { cursor: pointer; font-size: 13px; padding: 4px 0; }
.pc-live-checks ul { list-style: none; margin: 4px 0 0; padding: 6px 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 2px 12px;
  background: var(--parchment-light); color: var(--ink); border-radius: 4px; font-size: 12.5px; }
.pc-live-checks li { display: flex; justify-content: space-between; gap: 6px; min-width: 0; }
.pc-live-checks li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-live-checks li.is-prof { font-weight: 700; }
.pc-live input.short { color: var(--ink); background: var(--parchment-light); width: 80px; }

.mat-heading.on-wood { margin: 6px 0 10px; }
.scene-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; }
.scene textarea { color: var(--ink); background: rgba(255, 252, 240, 0.85); border: 1px solid #8a7350; font-family: var(--display); font-size: 17px; line-height: 1.5; }
.eyebrow-ink { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.read-aloud-text { margin: 0; font-family: var(--display); font-size: 21px; line-height: 1.55; white-space: pre-wrap; color: var(--ink); }
.otf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.otf-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px; text-align: left; min-height: 96px; color: var(--ink); border-radius: 4px;
  background-color: var(--parchment); background-image: var(--tex-paper); background-size: 300px 300px; border: 2px solid #3b2a14;
  box-shadow: inset 0 0 0 3px var(--parchment), inset 0 0 0 4px var(--stitch), 0 4px 10px rgba(0, 0, 0, 0.45);
}
/* Hover: a deeper shadow, the parchment stays solid (the general button hover would show the wood through). */
.desk-theme button.otf-card:hover:not(:disabled), button.otf-card:hover:not(:disabled) {
  background-color: var(--parchment); background-image: var(--tex-paper); background-size: 300px 300px; border-color: #3b2a14; transform: translateY(-2px);
  box-shadow: inset 0 0 0 3px var(--parchment), inset 0 0 0 4px var(--stitch), 0 10px 22px rgba(0, 0, 0, 0.65);
}
.otf-card > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.otf-card strong { font-family: var(--display); font-weight: 400; font-size: 21px; }
.otf-card > span > span { font-size: 13px; color: var(--ink-muted); }
.otf-card.is-off { opacity: 0.65; filter: grayscale(0.6); }
.otf-card input.tiny { width: 56px; min-height: 32px; padding: 0 6px; color: var(--ink); background: var(--parchment-light); border: 1px solid #8a7350; }
.otf-card .ink-select { min-height: 40px; }
.otf-result {
  margin-top: 14px; padding: 14px 16px; color: var(--ink); border-radius: 4px; display: flex; flex-direction: column; gap: 8px;
  background: rgba(241, 230, 198, 0.97); border: 2px dashed #2f6fa3; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
.otf-result h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; }
.otf-result ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 1280px) {
  /* Quick-log first, the map under it, the party down the right (1280 × 720 = a 1920 laptop at 150 %). */
  .live-mat { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); grid-template-areas: 'left party' 'map party'; }
  .live-map { position: static; }
}
@media (max-width: 900px) {
  .live-mat { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'left' 'map' 'party'; }
  .live-map { position: static; }
  .scene-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- AI services and AI suggestions (rule 10: AI text looks different from the DM's) ---- */
.ai-settings { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.ai-section { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid rgba(42, 31, 18, 0.3); border-radius: 3px; background: rgba(255, 250, 236, 0.45); }
.ai-section-h { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; }
.ai-section-h .hint { font-family: var(--body, inherit); font-size: 13px; }
.ai-section select { max-width: 360px; }
.ai-grid { display: flex; flex-direction: column; gap: 10px; }
.ai-grid .row.tight input { flex: 1; min-width: 0; }
.ai-key-saved { align-self: center; color: #2e5b2a; font-weight: 600; }
.ai-ok { color: #2e5b2a; }
.link-button { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--wax, var(--wax)); text-decoration: underline; text-underline-offset: 3px; font: inherit; cursor: pointer; }
.link-button:hover:not(:disabled), .desk-theme .parchment-note .link-button:hover:not(:disabled) { background: transparent; color: var(--ink); }
.ai-helper { display: flex; flex-direction: column; gap: 6px; }
.ai-helper .row.tight input { flex: 1; min-width: 0; }
.ai-uses { margin: 0; font-size: 12px; }
.ai-off { margin: 0; }
.ai-suggestion {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 12px;
  background: linear-gradient(180deg, rgba(219, 228, 245, 0.92), rgba(204, 214, 238, 0.92));
  border: 2px dashed #3b4f8a; border-radius: 4px; color: #1d2747;
}
.ai-badge { align-self: flex-start; padding: 2px 8px; border-radius: 3px; background: #3b4f8a; color: #eef2ff; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.ai-suggestion-text { margin: 0; white-space: pre-wrap; font-family: var(--display); font-size: 16px; line-height: 1.45; }

/* ---- battle maps ---- */
.battle-form { max-width: 980px; }
.battle-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.battle-cols textarea { width: 100%; }
.field-label { font-size: 13px; font-weight: 500; }
.style-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.style-list li { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid rgba(42, 31, 18, 0.25); border-radius: 3px; background: rgba(255, 250, 236, 0.5); }
.style-list li.is-picked { border: 2px solid #3b4f8a; padding: 5px; }
.style-thumb { position: relative; display: block; cursor: pointer; }
.style-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.style-thumb input { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; accent-color: #3b4f8a; }
.style-name > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.style-name input { font-size: 13px; min-height: 30px; padding: 2px 6px; }
.battle-prompt summary { cursor: pointer; font-size: 14px; }
.battle-prompt textarea { width: 100%; margin-top: 6px; font-size: 13px; }
.battle-preview { display: flex; flex-direction: column; gap: 10px; max-width: 980px; }
.battle-preview-frame { position: relative; align-self: center; line-height: 0; border: 3px solid #2a1f12; box-shadow: 0 6px 16px rgba(20, 12, 4, 0.4); }
.battle-preview-frame img { display: block; max-width: 100%; max-height: 58vh; }
.battle-preview-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-foot .ai-badge { margin-left: 6px; }
.map-prompt { margin-top: 6px; }
.map-prompt summary { cursor: pointer; }
.map-prompt p { margin: 4px 0 0; white-space: pre-wrap; font-size: 12px; }
@media (max-width: 900px) { .battle-cols { grid-template-columns: minmax(0, 1fr); } }
.battle-grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; }
.battle-grid-fields .short { width: 70px; }
.auto-hint { font-size: 12px; text-align: left; }
.battle-features { border: 0; padding: 0; margin: 0; }
.battle-features legend { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.toggle-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-dialog button.toggle-chip, .toggle-chip {
  min-height: 30px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 400;
  background: rgba(255, 252, 240, 0.7); color: var(--ink, #2a1f12); border: 1px solid #8a7350;
}
.dz-dialog button.toggle-chip[aria-pressed='true'], .toggle-chip[aria-pressed='true'] { background: #2a1f12; color: #f6ecd0; border-color: #000; font-weight: 600; }
.dz-dialog button.toggle-chip[aria-pressed='true']:hover:not(:disabled) { background: #3d2c18; color: #fff; }
.dz-dialog.wide:has(.battle-form) { width: min(1100px, calc(100vw - 32px)); }

/* ---- session prep ---- */
.prep-screen { gap: 18px; }
.prep-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w, 300px); gap: 22px; align-items: start; }
.prep-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.prep-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.prep-empty { max-width: 720px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.prep-empty p { margin: 0; }
.prep-head, .prep-section { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.prep-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) 90px 160px 110px; gap: 12px; align-items: start; }
/* The four boxes: all plain inputs, labels on one line, one height, so they line up (owner, 2026-10-22). */
.prep-head-grid label, .prep-head .hint { white-space: nowrap; }
.prep-head-grid input { box-sizing: border-box; height: 44px; margin: 0; }
.prep-head.parchment-sheet { padding: 12px 18px; gap: 4px; }
.prep-head .hint { font-size: 11px; }
.prep-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.prep-n::before { content: attr(data-n); }
.prep-n { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 4px; border-radius: 50%; background: #2a1f12; color: #f6ecd0; font-size: 15px; }
.prep-hint { margin: -4px 0 0; font-size: 13px; }
.prep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: prep; }
.prep-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; border: 1px solid rgba(42, 31, 18, 0.28); border-radius: 3px; background: rgba(255, 252, 240, 0.45); }
.prep-item.is-done { background: rgba(200, 220, 190, 0.45); border-color: rgba(46, 91, 42, 0.45); }
.prep-item-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prep-item-tools { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.prep-item-tools .ink-button { min-height: 28px; padding: 0 8px; }
.prep-done { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.prep-done input { width: 18px; height: 18px; min-height: 18px; accent-color: #2e5b2a; }
.prep-row-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.prep-row-fields.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.prep-row-fields .wide { grid-column: span 2; }
.enc-name-pick { display: flex; align-items: end; gap: 4px; }
.enc-name-pick > .field { flex: 1; min-width: 0; }
.enc-name-pick > select { width: 34px; padding: 0; flex: none; appearance: none; text-align: center; text-align-last: center; }
.prep-row-fields .short, .prep-head .short { width: 72px; }
.label-hidden > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cheat-sheet .ink-list { font-size: 13px; }
@media (max-width: 1100px) { .prep-layout { grid-template-columns: minmax(0, 1fr); } .prep-side { position: static; } }

/* ---- live: where they are ---- */
.where { display: flex; flex-direction: column; gap: 12px; }
.where-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.where-head .mat-heading { margin: 0; }
.where-route { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--parchment); font-size: 14px; }
.where-route strong { color: #fbe7c6; }
.where-here { font-family: var(--display); font-size: 20px; }
.where-heading { display: flex; align-items: center; gap: 8px; }
.where-heading select { width: auto; min-width: 160px; }
.ink-muted-light { color: #cdb98f; font-size: 13px; }
.where-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.where-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.where-panel { gap: 8px; min-width: 0; }
.where-tips li { font-size: 14px; }
.key-badge { background: var(--wax); }
.met-badge { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 3px; border: 1px solid #8a7350; color: #5a4a32; }
.met-badge.is-met { background: #2e5b2a; border-color: #2e5b2a; color: #eef6e8; }
.dm-only { margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: #2a1f12; color: #f6ecd0; font-family: var(--body, inherit); font-size: 10px; letter-spacing: 0.06em; vertical-align: middle; }
.secret-list, .tick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.secret-list li { display: flex; flex-direction: column; gap: 1px; padding-left: 8px; border-left: 3px solid var(--wax); }
.secret-list li.is-done, .tick-list li.is-done { opacity: 0.6; text-decoration: line-through; }
.secret-src { font-size: 11px; color: var(--ink-muted); }
.secret-list label, .tick-list label { display: flex; gap: 6px; align-items: flex-start; cursor: pointer; }
.secret-list input, .tick-list input { width: 16px; height: 16px; min-height: 16px; margin-top: 2px; flex: none; accent-color: #2e5b2a; }
.tick-list li.is-here { background: rgba(246, 201, 69, 0.25); border-radius: 3px; }
.ticks-h { margin: 6px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.prep-premise { margin: 0; font-style: italic; }
.pacing { margin: 0; font-size: 14px; padding: 6px 8px; border-radius: 3px; background: rgba(46, 91, 42, 0.12); }
.pacing.is-late { background: rgba(143, 42, 33, 0.15); }
.ask-ai { gap: 8px; }
.ask-ai .row.tight input { flex: 1; min-width: 0; }
@media (max-width: 800px) { .where-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- player preview ---- */
.players-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w, 360px); gap: 22px; min-height: 0; align-items: start; }
.players-map { min-height: calc(100vh - 140px); display: flex; flex-direction: column; }
.players-side { display: flex; flex-direction: column; gap: 14px; }
.players-safe { padding: 6px 12px; border-radius: 4px; background: #2e5b2a; color: #eef6e8; font-weight: 600; font-size: 13px; border: 1px solid #173016; }
.players-place { margin: 0; font-family: var(--display); font-size: 22px; }
.players-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.players-people li { display: flex; flex-direction: column; gap: 2px; padding-left: 8px; border-left: 3px solid #c89539; }
.players-people .fact { font-size: 14px; }
.map-tip { position: fixed; z-index: 80; max-width: 300px; padding: 8px 12px; pointer-events: none;
  background: #f6ecd0; color: #2a1f12; border: 1px solid #6b5636; border-radius: 3px; box-shadow: 0 8px 18px rgba(20, 12, 4, 0.45); }
.map-tip strong { font-family: var(--display); font-size: 17px; font-weight: 400; }
.map-tip p { margin: 4px 0 0; font-size: 14px; white-space: pre-wrap; }
@media (max-width: 1100px) { .players-layout { grid-template-columns: minmax(0, 1fr); } }
.prep-head, .prep-section, .prep-empty { height: auto; min-height: 0; }

/* ---- encounter planner ---- */
.enc-layout { display: grid; grid-template-columns: var(--left-w, 240px) minmax(0, 1fr) var(--side-w, 300px); gap: 20px; align-items: start; }
.enc-list { gap: 6px; position: sticky; top: 12px; }
.enc-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.enc-item { width: 100%; min-height: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px 8px; text-align: left;
  background: rgba(255, 252, 240, 0.4); border: 1px solid rgba(42, 31, 18, 0.25); color: var(--ink); font-size: 14px; }
.desk-theme .parchment-note .enc-item:hover:not(:disabled) { background: #fffaf0; }
.enc-item[aria-current='true'] { border: 2px solid var(--wax); background: rgba(255, 250, 236, 0.9); }
.rating-chip, .meter-text strong { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 3px; background: #6b5d3f; color: #fff; }
.meter-text strong { font-size: 15px; padding: 2px 8px; }
.r-trivial { background: #6b7a8a !important; } .r-low { background: #2e5b2a !important; } .r-moderate { background: #a07a14 !important; }
.r-high { background: #b0521c !important; } .r-over_high { background: var(--wax) !important; }
p.meter-text { background: transparent !important; margin: 0; font-size: 14px; }
.enc-editor { height: auto; min-height: 0; gap: 12px; }
.enc-fields { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.enc-map-field { grid-column: 1 / -1; }
.enc-pcs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 10px; font-size: 13px; }
.enc-pcs-label { font-weight: 700; margin-right: 2px; }
.enc-pc { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid #a8916a; border-radius: 4px; background: rgba(255, 250, 236, 0.55); cursor: pointer; }
.enc-pc input { width: 14px; height: 14px; min-height: 14px; margin: 0; }
.enc-pc-name { font-weight: 600; }
.enc-pc.is-out { opacity: 0.55; }
.enc-pc.is-out .enc-pc-name { text-decoration: line-through; }
.enc-meter { display: flex; flex-direction: column; gap: 8px; padding: 26px 8px 8px; }
.meter-bar { position: relative; height: 16px; border-radius: 8px; background: rgba(42, 31, 18, 0.15); border: 1px solid rgba(42, 31, 18, 0.35); }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: linear-gradient(90deg, #2e5b2a, #a07a14 55%, var(--wax)); }
.meter-mark { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #2a1f12; }
.meter-mark span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; color: var(--ink-muted); }
.meter-mark.is-target { width: 3px; background: var(--wax); }
.meter-mark.is-target span { color: var(--wax); font-weight: 600; }
.enc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.enc-table th { text-align: left; font-size: 12px; color: var(--ink-muted); border-bottom: 1px solid rgba(42, 31, 18, 0.35); padding: 4px; }
.enc-table td { padding: 6px 4px; border-bottom: 1px solid rgba(42, 31, 18, 0.15); vertical-align: top; }
.enc-table .count .ink-button { min-height: 28px; min-width: 28px; padding: 0 6px; }
.enc-table .count .mono { min-width: 24px; text-align: center; align-self: center; }
.enc-stat { font-size: 12px; }
.enc-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.enc-add .row.tight select, .enc-add .row.tight input:not(.short) { flex: 1; min-width: 0; }
.enc-add .short { width: 64px; }
.srd-hits { list-style: none; margin: 4px 0 0; padding: 0; max-height: 220px; overflow: auto; border: 1px solid rgba(42, 31, 18, 0.25); background: rgba(255, 252, 240, 0.7); }
.srd-hits li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 8px; font-size: 14px; }
.srd-hits .ink-button { min-height: 26px; padding: 0 8px; }
.enc-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; }
.enc-actions { padding-top: 6px; border-top: 1px solid rgba(42, 31, 18, 0.25); }
.enc-side { display: flex; flex-direction: column; gap: 14px; }
.enc-side .short { width: 64px; }
@media (max-width: 1300px) { .enc-layout { grid-template-columns: 220px minmax(0, 1fr); } .enc-side { grid-column: 1 / -1; } }

/* ---- Roll20 and print dialogs ---- */
.tabs-row { display: flex; gap: 6px; flex-wrap: wrap; }
.dz-dialog .tabs-row button[aria-pressed='true'] { background: #2a1f12; color: #f6ecd0; border-color: #000; }
.roll20 { display: flex; flex-direction: column; gap: 12px; }
.roll20-list { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 6px; }
.macro-row { display: flex; flex-direction: column; gap: 3px; padding: 6px 0; border-bottom: 1px solid rgba(42, 31, 18, 0.15); }
.macro-head { display: flex; align-items: center; gap: 8px; }
.token-badge { background: #2f5d8a; }
.macro-text { display: block; white-space: pre-wrap; word-break: break-word; font-size: 12px; padding: 6px 8px; background: rgba(42, 31, 18, 0.07); border-radius: 3px; user-select: all; }
.roll20-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.roll20-steps .row { margin-top: 6px; }
.roll20-map { border-top: 1px solid rgba(42, 31, 18, 0.25); padding-top: 8px; }
.export-pick ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; columns: 2; }
.export-pick li label { display: flex; align-items: center; gap: 6px; font-size: 14px; padding: 2px 0; }
.export-pick input { width: 16px; height: 16px; min-height: 16px; }
.export-pick .swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.enc-fields .row.tight select { flex: 1; min-width: 0; }

/* ---- notes import ---- */
.import-start { display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w, 340px); gap: 22px; align-items: start; }
.import-drop { height: auto; min-height: 320px; gap: 12px; border: 3px dashed transparent; }
.import-drop.is-over { border-color: var(--wax); }
.import-drop p { margin: 0; max-width: 760px; }
.import-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.import-files li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 6px 10px; background: rgba(255, 252, 240, 0.55); border: 1px solid rgba(42, 31, 18, 0.25); }
.import-files li.has-error { border-color: var(--wax); }
.import-go { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid rgba(42, 31, 18, 0.25); padding-top: 10px; }
.import-go p { margin: 0; }
.import-progress { display: flex; flex-direction: column; gap: 4px; }
.progress-bar { display: block; height: 8px; max-width: 420px; border-radius: 4px; background: rgba(42, 31, 18, 0.15); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: #3b4f8a; }
.import-drafts { gap: 8px; }
.draft-row { flex-direction: column; align-items: flex-start !important; gap: 0 !important; }
.basis-badge { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; background: #2a1f12; color: #f6ecd0; vertical-align: middle; }
.basis-badge.is-guess { background: #dbe4f5; color: #1d2747; border: 1px dashed #3b4f8a; }
.import-review { display: flex; flex-direction: column; gap: 16px; padding-bottom: 80px; }
.review-bar { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 12px; }
.import-section { height: auto; min-height: 0; gap: 10px; }
.proposal { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid rgba(42, 31, 18, 0.28); border-radius: 3px; background: rgba(255, 252, 240, 0.55); }
.proposal.is-guess { border: 2px dashed #3b4f8a; background: rgba(219, 228, 245, 0.45); }
.proposal.decision-skip { opacity: 0.5; }
.proposal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.proposal-head select { width: auto; }
.proposal-name { flex: 1; min-width: 200px; font-family: var(--display); font-size: 18px; }
.proposal-summary { font-size: 14px; }
.proposal-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }
.proposal-details label { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 13px; }
.proposal-details label span { color: var(--ink-muted); text-transform: capitalize; }
.proposal-details input { min-height: 32px; font-size: 13px; }
.dup-note { margin: 0; padding: 4px 8px; font-size: 13px; background: rgba(246, 201, 69, 0.3); border-left: 3px solid #a07a14; }
.sources { display: flex; flex-direction: column; gap: 4px; }
.sources blockquote { margin: 0; padding: 4px 10px; font-size: 13px; font-style: italic; border-left: 3px solid #6b5a3a; background: rgba(42, 31, 18, 0.05); }
.sources blockquote.is-guess { border-left-color: #3b4f8a; }
.sources cite { display: block; font-style: normal; font-size: 11px; color: var(--ink-muted); }
.acts-list { margin: 0; padding-left: 22px; font-size: 14px; }
.question .row.tight input { flex: 1; min-width: 0; }
.question.q-answered { border-color: #2e5b2a; }
.question.q-deferred { opacity: 0.65; }
.question p { margin: 0; }
.link-row .proposal-head strong { font-family: var(--display); font-weight: 400; font-size: 16px; }
.commit-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; background: #2a1a0c; color: var(--parchment-light); border-top: 2px solid #000; box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.45); }
.commit-bar span { margin-right: auto; }
.provenance ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
@media (max-width: 1100px) { .import-start { grid-template-columns: minmax(0, 1fr); } }
.proposal-head > input[type='checkbox'], .proposal-head .field.checkbox input { width: 20px; height: 20px; min-height: 20px; flex: none; accent-color: #2e5b2a; }
.proposal-head .field.checkbox { flex-direction: row; gap: 6px; font-size: 14px; }

/* ---- fill blanks with AI ---- */
.fill-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.fill-pick legend { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.fill-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 2px dashed #3b4f8a; border-radius: 4px; background: rgba(219, 228, 245, 0.55); }
.fill-row.is-off { opacity: 0.55; }
.fill-row textarea { width: 100%; font-family: var(--display); font-size: 15px; }

/* ---- getting started guide ---- */
.guide-steps { list-style: none; display: flex; gap: 18px; margin: 0 0 14px; padding: 0; }
.guide-steps li .link-button { color: #e9dcc0; font-size: 16px; }
.guide-steps li.is-current .link-button { opacity: 1; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.guide-body { display: flex; flex-direction: column; gap: 16px; padding-bottom: 60px; }
.guide-lead { margin: 0; max-width: 900px; font-size: 17px; color: #f1e6cc; }
.guide-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.guide-choice { min-height: 0; height: auto; }
.guide-choice p { margin: 0; }
.guide-choice .ink-button { align-self: flex-start; margin-top: auto; }
.guide-foot button:not(.link-button) { align-self: flex-start; }
.guide-foot .link-button { color: #e9dcc0; }
.guide-done { min-height: 0; height: auto; max-width: 900px; }
.guide-make { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; padding-bottom: 60px; }
.guide-preview { min-height: 0; height: auto; }
.guide-options { gap: 8px; }
.guide-options textarea { width: 100%; }
.guide-wait { display: grid; place-items: center; min-height: 380px; color: var(--ink); font-style: italic; }
.guide-picture { width: 100%; height: auto; display: block; }
.place-preview { position: relative; line-height: 0; }
.place-preview img { width: 100%; height: auto; display: block; }
.place-preview svg { position: absolute; inset: 0; width: 100%; height: 100%; font-family: var(--display); }
.place-preview svg.is-editable polygon { cursor: pointer; }
.place-preview .vertex { fill: var(--gold); stroke: #2a1f12; stroke-width: 2px; vector-effect: non-scaling-stroke; cursor: move; touch-action: none; }
.place-preview .vertex:hover { fill: #fff3c4; }
.place-preview .vertex-add { fill: #fff8e2; fill-opacity: 0.8; stroke: var(--wax); stroke-width: 1.5px; vector-effect: non-scaling-stroke; cursor: copy; touch-action: none; }
.guide-proposals li.is-selected { border: 2px solid var(--wax); }
.guide-proposals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow: auto; }
.guide-proposals li { display: grid; grid-template-columns: 18px 12px minmax(0, 1fr) minmax(0, 1fr); gap: 4px 6px; align-items: center; padding: 4px 6px; background: rgba(255, 252, 240, 0.55); border: 1px dashed #2f5f9a; }
.guide-proposals li.is-off { opacity: 0.5; }
.guide-proposals li input[type='checkbox'] { width: 16px; height: 16px; min-height: 16px; }
.guide-proposals li input:not([type='checkbox']) { grid-column: 3 / span 2; }
.guide-proposals li select:first-of-type { grid-column: 3; }
.guide-proposals li input:not([type='checkbox']), .guide-proposals li select { min-height: 32px; padding: 2px 6px; font-size: 14px; }
.guide-proposals .swatch { width: 12px; height: 12px; }
.ink-rule { border: none; border-top: 1px solid rgba(42, 31, 18, 0.3); margin: 6px 0; width: 100%; }
.ai-tag { margin: 0; color: #2f5f9a; font-style: italic; font-size: 14px; }
@media (max-width: 1100px) { .guide-choices, .guide-make { grid-template-columns: minmax(0, 1fr); } }
.battle-error { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--wax); background: rgba(143, 42, 33, 0.07); }

/* ---- board: menus, sizes, hidden, pictures, act marks, panels ---- */
.ctx-menu { position: fixed; z-index: 1000; min-width: 200px; padding: 5px; background: #f6ecd3; color: #2a1f12; border: 1px solid #6b5636; border-radius: 4px; box-shadow: 0 8px 20px rgba(20, 10, 0, 0.45); font-size: 14px; }
.ctx-menu hr { border: none; border-top: 1px solid rgba(42, 31, 18, 0.25); margin: 4px 2px; }
.ctx-row { position: relative; }
.desk-theme .ctx-menu button, .ctx-menu button { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 30px; padding: 3px 10px 3px 4px; border: 0; border-radius: 3px; background: transparent; color: #2a1f12; text-align: left; font-size: 14px; box-shadow: none; }
.desk-theme .ctx-menu button:hover:not(:disabled), .ctx-menu button:focus-visible { background: rgba(143, 106, 42, 0.2); }
.ctx-menu button:disabled { color: #9a8a6c; }
.ctx-menu button.is-danger { color: var(--wax); }
.ctx-check { width: 16px; flex: none; text-align: center; font-weight: 700; }
.ctx-more { margin-left: auto; padding-left: 12px; }
.ctx-sub { position: absolute; left: calc(100% - 4px); top: -6px; width: max-content; max-width: 320px; }
.ctx-empty { display: block; padding: 6px 10px; color: #7a6a4c; font-style: italic; }
.splitter { flex: 0 0 8px; cursor: col-resize; background: linear-gradient(90deg, transparent 3px, rgba(232, 217, 176, 0.25) 3px 5px, transparent 5px); touch-action: none; }
.splitter:hover, .splitter:focus-visible { background: linear-gradient(90deg, transparent 2px, rgba(232, 217, 176, 0.65) 2px 6px, transparent 6px); outline: none; }
.card.card-sized, .note.note-sized { width: 100%; height: 100%; overflow: hidden; box-sizing: border-box; }
.card.card-name { justify-content: center; padding: 4px 10px 4px calc(var(--sq, 44px) + 10px); }
/* Name-only cards: no band; the icon square is the left edge, the card's full height (owner, 2026-10-19). */
.card.card-name:not(.card-resolved) { border-left: 0; }
.card.card-name .card-icon { left: 0; width: var(--sq, 44px); height: 100%; border-radius: 4px 0 0 4px; }
/* Name-only cards: at most two lines that fit the card, then … (owner, 2026-10-19). */
.card.card-name .card-name { font-size: 16px; line-height: 1.1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: normal; }
.card.card-short .card-name { font-size: 15px; }
.card.is-hidden, .note.is-hidden, .board-image.is-hidden { opacity: 0.38; filter: grayscale(0.8); }
.card .act-marks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.act-mark { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; border: 2px solid; border-radius: 50%; font-family: var(--display, Georgia, serif); font-size: 11px; font-weight: 700; line-height: 1; background: rgba(255, 252, 240, 0.7); }
.board-image { width: 100%; height: 100%; position: relative; }
.board-image img { width: 100%; height: 100%; object-fit: fill; display: block; pointer-events: none; user-select: none; }
.board-image.is-selected { outline: 2px dashed #6cb6d9; outline-offset: 2px; }
.board-image-lock { position: absolute; top: 4px; right: 4px; font-size: 16px; }
.board-image-regions { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.react-flow__node-image { background: transparent; border: 0; padding: 0; }
.string-label.is-highlight { font-weight: 700; font-size: 11px; }
.panel-subheading { font-family: var(--display, Georgia, serif); font-size: 17px; font-weight: 400; margin: 14px 0 6px; }
.links-list, .links-kinds, .story-list, .story-acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.links-list li, .links-kinds li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 4px 6px; border: 1px solid rgba(42, 31, 18, 0.18); border-radius: 3px; background: rgba(255, 252, 240, 0.35); }
.links-list li.is-selected { border-color: #6cb6d9; background: rgba(108, 182, 217, 0.15); }
.links-list li.is-hidden { opacity: 0.55; }
.links-name { text-align: left; }
.links-kind { font-style: italic; color: var(--wax); }
.links-kinds input[type='color'], .story-head input[type='color'], .links-panel form input[type='color'] { width: 30px; height: 26px; min-height: 0; padding: 0; border: 1px solid #6b5636; flex: none; }
.story-links { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.links-kind-name { flex: 1; min-width: 80px; }
.links-list li.link-row { flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 8px; }
.link-ends { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.link-ends .link-button { padding: 0; }
.link-state { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #3e6b3a; }
.link-state.is-secret { color: var(--wax); }
.link-row .field { margin: 0; }
.links-all > summary { cursor: pointer; font-weight: 600; margin: 10px 0 6px; }
.links-all[open] { display: flex; flex-direction: column; gap: 12px; }
.danger-link { color: var(--wax); }
.links-advanced { margin-top: 12px; }
.story-list > li { padding: 8px; border: 1px solid rgba(42, 31, 18, 0.2); border-radius: 3px; background: rgba(255, 252, 240, 0.35); display: flex; flex-direction: column; gap: 4px; }
.story-title { font-family: var(--display, Georgia, serif); font-size: 17px; text-align: left; flex: 1; }
.story-acts li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.story-card { padding: 8px; border: 2px solid #6cb6d9; border-radius: 4px; margin: 8px 0; }
.story-card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 3px 0; }
.story-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #6b5636; }
.act-tick { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.act-tick input { width: 16px; height: 16px; min-height: 0; }
.side-grip { position: absolute; top: 0; height: 100%; min-height: 60vh; width: 12px; z-index: 5; }
.side-grip.grip-right { left: -16px; }
.side-grip.grip-left { right: -16px; }
.map-side, .prep-side, .players-side, .enc-side, .enc-list, .import-drafts, .live-left, .live-party, .timeline-side, .review-side, .library-templates, .sheet-side { position: relative; }
.prep-side, .review-side { position: sticky; }
@media (max-width: 1100px) { .side-grip { display: none; } }
.pc-tokens { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed rgba(90, 74, 50, 0.45); }
.pc-token-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-token-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pc-tokens > .ink-button { align-self: flex-start; }
.srd-browser { display: flex; flex-direction: column; gap: 10px; }
.dz-dialog.wide:has(.srd-browser) { width: min(1100px, calc(100vw - 32px)); }
.srd-filters { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(5, minmax(100px, 1fr)); gap: 8px 10px; align-items: end; }
.srd-moves { align-items: center; gap: 6px 14px; }
.srd-browser-table { max-height: 56vh; overflow: auto; }
.srd-browser-table thead th { position: sticky; top: 0; z-index: 1; background: #efe3c4; }
.sort-head { font-weight: 700; text-decoration: none; color: inherit; }
.srd-detail td { font-size: 13px; color: #4a3b24; background: rgba(255, 252, 240, 0.6); }
.srd-browser .cell-action .short { width: 56px; }
@media (max-width: 1000px) { .srd-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fight-summary { width: 100%; }
.sheet-main.pic-beside { max-width: 1200px; display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 20px; align-items: start; }
.fight-picture { position: sticky; top: 0; }
.fight-picture img { width: 100%; border-radius: 4px; border: 1px solid rgba(42, 31, 18, 0.35); }
.fight-nopic { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed rgba(42, 31, 18, 0.4); border-radius: 4px; color: #7a6a4c; font-style: italic; }
.fight-tools { align-items: center; }
.statblock { display: flex; flex-direction: column; gap: 4px; max-width: 760px; }
.sb-name { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 400; color: #7a1e16; }
.sb-kind { margin: 0 0 6px; font-style: italic; }
.sb-core { display: flex; gap: 10px; margin: 4px 0; flex-wrap: wrap; }
.sb-core > div { display: flex; flex-direction: column; min-width: 110px; padding: 6px 12px; border: 1px solid rgba(122, 30, 22, 0.35); border-radius: 4px; background: rgba(255, 252, 240, 0.55); }
.sb-core span, .sb-abilities span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #7a1e16; }
.sb-core strong { font-size: 26px; line-height: 1.1; }
.sb-core em, .sb-abilities em { font-style: normal; font-size: 12px; color: #5a4a32; }
.sb-abilities { border-collapse: collapse; margin: 6px 0; }
.sb-abilities td { text-align: center; padding: 4px 12px; border: 1px solid rgba(122, 30, 22, 0.25); }
.sb-abilities td > * { display: block; }
.sb-abilities strong { font-size: 18px; }
.sb-line { margin: 0; }
.sb-head { margin: 10px 0 2px; padding-bottom: 2px; border-bottom: 1px solid #7a1e16; color: #7a1e16; font-family: var(--display); font-weight: 400; font-size: 20px; }
.sb-entry { margin: 2px 0 6px; line-height: 1.45; }
.cr-changes { margin: 0; padding-left: 20px; }
.ai-sb-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pic-preview { max-width: 100%; max-height: 50vh; border-radius: 4px; }
@media (max-width: 1000px) { .ai-sb-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.enc-build { margin-top: 6px; }
.enc-build .row input { flex: 1; }
.enc-plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.enc-plan .statblock { margin: 6px 0 4px 24px; }
.enc-ai { margin-left: 6px; vertical-align: middle; }
.enc-stash { font-size: 13px; }
.enc-plan .link-button { margin-left: 8px; }
.combat-screen { display: flex; flex-direction: column; gap: 14px; }
.combat-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.combat-title h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 34px; color: #f6ecd0; }
.combat-round { margin: 0; color: var(--parchment); font-size: 16px; }
.combat-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w, 360px); gap: 22px; align-items: start; }
.combat-side { position: relative; display: flex; flex-direction: column; gap: 10px; }
.combatants { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.combatant { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 8px 10px; border: 1px solid rgba(42, 31, 18, 0.3); border-left: 5px solid #8a7350; border-radius: 4px; background: rgba(255, 252, 240, 0.55); }
.combatant.side-party { border-left-color: #2f6db5; }
.combatant.side-foe { border-left-color: var(--wax); }
.combatant.side-ally { border-left-color: #3c8a3c; }
.combatant.is-current { box-shadow: 0 0 0 3px #c79a2e; background: rgba(255, 245, 210, 0.85); }
.combatant.is-out { opacity: 0.55; }
.cb-order { display: flex; flex-direction: column; gap: 4px; }
.cb-order .ink-button { min-height: 26px; padding: 0 8px; }
.cb-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cb-name-row, .cb-hp-row, .cb-cond-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cb-name { font-family: var(--display); font-size: 20px; font-weight: 400; cursor: default; user-select: none; }
.cb-now { padding: 1px 7px; border-radius: 3px; background: #c79a2e; color: #2a1f12; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.cb-side { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5a4a32; }
.cb-ac { margin-left: auto; font-weight: 600; }
.cb-out { padding: 1px 7px; border-radius: 3px; background: #2a1f12; color: #f6ecd0; font-size: 12px; }
.cb-hpbar { width: 140px; height: 10px; border-radius: 5px; background: rgba(42, 31, 18, 0.2); overflow: hidden; }
.cb-hpbar span { display: block; height: 100%; background: #3c8a3c; }
.cb-hpbar span.mid { background: #c79a2e; }
.cb-hpbar span.low { background: var(--wax); }
.cb-hp { min-width: 92px; }
.cb-hp-row .short, .cb-cond-row .short { width: 64px; }
.cb-cond { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 12px; background: #3b4f8a; color: #eef2ff; font-size: 13px; }
.cb-cond .link-button { color: #eef2ff; text-decoration: none; font-weight: 700; }
.cb-cond-input { width: 150px; }
.cb-notes { flex: 1 1 200px; min-width: 160px; }
.combatant input, .combatant select, .combatant .ink-button { min-height: 32px; height: 32px; padding-top: 0; padding-bottom: 0; font-size: 14px; }
.combatant .cb-order .ink-button { height: 26px; min-height: 26px; }
.cb-main { gap: 4px; }
.cb-add { margin-top: 12px; }
.combat-hints { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.combat-hints .hint-warn { color: var(--wax); font-weight: 600; }
.combat-log { margin: 0; padding-left: 22px; max-height: 40vh; overflow: auto; font-size: 13px; color: #4a3b24; }
@media (max-width: 1100px) { .combat-layout { grid-template-columns: minmax(0, 1fr); } }

/* About Dungeon Zen */
.about-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; }
.about-list dt { font-weight: 600; }
.about-list dd { margin: 0; word-break: break-all; user-select: text; }
.about-welcome { font-family: var(--display); font-size: 18px; line-height: 1.4; margin: 0 0 4px; }
.about-fold { border-top: 1px solid rgba(42, 31, 18, 0.25); padding: 6px 0; font-size: 13px; }
.about-fold summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.about-fold p, .about-fold ul { margin: 6px 0; user-select: text; }
.about-fold ul { padding-left: 18px; }

/* Board layers: what a drag moves (cards or background pictures) */
.react-flow__node.is-passive, .react-flow__edge.is-passive { pointer-events: none !important; }
.react-flow__node.is-faded { opacity: 0.5; }
.tool-layer { display: flex; flex-direction: column; gap: 3px; padding: 4px 0; border-top: 1px solid rgba(0, 0, 0, 0.3); border-bottom: 1px solid rgba(0, 0, 0, 0.3); }
.tool-layer .eyebrow { text-align: center; font-size: 10px; }
.layer-banner {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 5; padding: 6px 12px; border-radius: 6px;
  background: rgba(30, 18, 8, 0.85); color: var(--parchment-light); font-size: 13px; display: flex; gap: 10px; align-items: center;
}
.layer-banner .link-button { color: var(--gold); }
.link-rubber { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.link-rubber line { stroke: #d2453a; stroke-width: 2.5; stroke-dasharray: 6 4; }
.link-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.4); flex: none; }
.link-confirm { font-size: 16px; margin: 0 0 10px; }
.is-ctrl-panning, .is-ctrl-panning * { cursor: grabbing !important; }
.tool-layer .tool { min-height: 40px; font-size: 11px; letter-spacing: -0.01em; }

/* Sheet › Features, traits, background / Descriptions & history / Secrets */
.panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel-head-row .panel-heading { margin: 0; }
.traits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.traits-grid .span-2 { grid-column: span 2; }
.factions-field .chips { align-items: center; }
.factions-field .chip { padding-right: 2px; }
.factions-field .chip .link-button { min-height: 0; min-width: 0; padding: 0; }
.factions-field select { width: auto; min-width: 180px; }
@media (max-width: 1100px) { .traits-grid { grid-template-columns: 1fr; } .traits-grid .span-2 { grid-column: auto; } }

/* Full sheet: character-sheet layout (owner, 1.3.0) */
.char-sheet { --cs-line: #6b3f22; --cs-fill: rgba(255, 250, 235, 0.72); }
.cs-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.cs-ability, .cs-box {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 86px; padding: 8px 8px 18px; background: var(--cs-fill); border: 2px solid var(--cs-line); border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.18);
}
.cs-ability { min-height: 94px; padding-bottom: 24px; justify-content: flex-start; }
.cs-box { padding-bottom: 8px; }
.cs-label { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #4a2e16; }
.cs-big { font-size: 26px; font-weight: 600; line-height: 1.1; color: #1c120a; }
.cs-big.cs-mid { font-size: 18px; }
.cs-ability .score { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); margin: 0; }
.cs-ability .score label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cs-ability .score input {
  width: 44px; height: 26px; min-height: 0; padding: 0; text-align: center; font-weight: 700; border: 2px solid var(--cs-line);
  border-radius: 13px; background: #fffaf0;
}
.cs-big-input { margin: 0; }
.cs-big-input label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; }
.cs-big-input input { width: 56px; min-height: 0; height: 34px; padding: 0 4px; text-align: center; font-size: 20px; font-weight: 600; }
.cs-shield { border-radius: 10px 10px 40px 40px; }
.cs-shield .cs-big-input label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cs-hp { flex: 1 1 220px; }
.cs-hp-row { display: flex; align-items: flex-end; gap: 6px; }
.cs-slash { font-size: 24px; padding-bottom: 2px; }
.cs-body { display: grid; grid-template-columns: minmax(200px, 0.9fr) minmax(220px, 1fr) minmax(300px, 1.6fr); gap: 12px; align-items: start; }
.cs-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cs-card, .cs-skills { background: var(--cs-fill); border: 2px solid var(--cs-line); border-radius: 10px; padding: 8px 10px; }
.cs-title { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; color: #4a2e16; }
.cs-saves, .cs-skills ul { list-style: none; margin: 0; padding: 0; }
.cs-saves li, .cs-skills li { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid rgba(107, 63, 34, 0.18); font-size: 13px; }
.cs-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #4a2e16; flex: none; }
.cs-dot.is-on { background: #2a1a0c; }
.cs-dot { padding: 0; min-height: 0; min-width: 0; cursor: pointer; background: transparent; box-shadow: none; }
.cs-dot.is-expert { box-shadow: 0 0 0 2px #fffaf0, 0 0 0 3.5px #2a1a0c; }
input.cs-bonus { width: 40px; min-height: 0; height: 22px; padding: 0 2px; font-size: 13px; }
.cs-inline { margin: 2px 0; }
.cs-inline label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.cs-inline input { min-height: 0; height: 26px; padding: 0 6px; font-size: 13px; }
.cs-wide-input input { width: 76px; font-size: 16px; }
.attack-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.attack-filters > input, .attack-filters select { width: auto; flex: 0 1 auto; }
.attack-filters > input { flex: 1 1 200px; }
.attack-pick { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow: auto; }
.attack-pick li { padding: 2px 0; border-bottom: 1px solid rgba(107, 63, 34, 0.15); }
.attack-pick .field.checkbox { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 0; }
.cs-ab { width: 30px; font-size: 10px; font-weight: 700; color: #6b5a3a; }
.cs-bonus { margin-left: auto; min-width: 34px; text-align: center; border: 1px solid var(--cs-line); border-radius: 4px; background: #fffaf0; font-weight: 600; }
.cs-passive { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.cs-passive-n { min-width: 30px; height: 26px; display: inline-grid; place-items: center; border: 2px solid var(--cs-line); border-radius: 6px; background: #fffaf0; font-size: 14px; }
.cs-small { font-size: 12.5px; margin: 4px 0; }
.cs-conditions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-conditions .cs-title { text-align: left; }
.cs-tabs { margin: 0; flex-wrap: wrap; }
.cs-tabs button { flex: 1 1 auto; padding-left: 8px; padding-right: 8px; }
@media (max-width: 1250px) { .cs-body { grid-template-columns: 1fr 1fr; } .cs-right { grid-column: span 2; } }

/* Party cards on the mat: portrait and table stats (1.3.0) */
.tarot-pc { cursor: default; }
.tarot-portrait { width: 100%; height: 100%; max-height: 150px; object-fit: cover; border-radius: 2px; display: block; }
.tarot-pc .tarot-art { overflow: hidden; }
.pc-table { display: flex; flex-direction: column; gap: 3px; }
.pc-stats { flex-wrap: wrap; }
.pc-stats label { display: inline-flex; align-items: baseline; gap: 2px; }
.mat .tarot-pc input.pc-hp { color: var(--ink); width: 3.2em; min-height: 0; height: 22px; padding: 0 2px; text-align: right; font: inherit; border: 1px solid #a8916a; background: rgba(255, 252, 240, 0.8); }
.pc-max { color: var(--ink-muted); }
.pc-line { font-family: var(--sans); font-size: 11px; color: #5c2a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat .tarot-pc input.pc-conditions { color: var(--ink); min-height: 0; height: 24px; padding: 0 6px; font-family: var(--sans); font-size: 11.5px; border: 1px dashed #a8916a; background: rgba(255, 252, 240, 0.6); text-align: center; }
.pc-open { min-height: 26px; padding: 0 8px; font-family: var(--sans); font-size: 12px; }

/* Pictures: on cards, sheets, Draw windows, the Library (1.3.0) */
.card-pic { float: right; width: 46px; height: 46px; object-fit: cover; margin: 0 0 4px 6px; border: 1px solid rgba(42, 31, 18, 0.4); border-radius: 3px; }
.card-picture img { width: 100%; border-radius: 4px; border: 1px solid rgba(42, 31, 18, 0.35); display: block; }
.card-picture { display: flex; flex-direction: column; gap: 8px; }
.pic-tools .ink-button { min-height: 34px; padding: 0 12px; }
.pic-tools .ink-button.icon { min-width: 36px; padding: 0 8px; font-size: 16px; }
.pic-beside > .side-menu { position: sticky; top: 0; }
.draw-prompt { border: 1px solid rgba(42, 31, 18, 0.3); border-radius: 6px; padding: 6px 10px; background: rgba(255, 252, 240, 0.5); }
.draw-prompt summary { cursor: pointer; font-weight: 600; }
.draw-prompt textarea { width: 100%; margin: 8px 0; font-family: var(--mono); font-size: 12.5px; }
.draw-styles { border: 1px solid rgba(42, 31, 18, 0.3); border-radius: 6px; padding: 6px 10px; margin: 0; }
.draw-styles legend { font-weight: 600; padding: 0 4px; }
.draw-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.draw-thumb { position: relative; width: 72px; height: 72px; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; opacity: 0.45; }
.draw-thumb.is-on { border-color: var(--wax, var(--wax)); opacity: 1; }
.draw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.draw-thumb input { position: absolute; top: 4px; left: 4px; margin: 0; }
.dz-dialog button.draw-add { opacity: 1; padding: 0; min-height: 0; font-size: 34px; line-height: 1; color: #5a4a32; background: rgba(255, 252, 240, 0.5); border: 2px dashed #8a7350; }
.draw-all { align-self: center; }
.draw-new-pics { display: grid; gap: 10px; margin: 8px 0; padding: 8px; border: 1px solid rgba(42, 31, 18, 0.3); border-radius: 6px; background: rgba(255, 252, 240, 0.5); }
.draw-new-pic { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; }
.draw-new-pic img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; }
.send-examples, .dz-dialog .send-examples { font-size: 12.5px; color: #6b5a42; }
.field.checkbox.send-examples { gap: 6px; }
.field.checkbox.send-examples input { width: 14px; height: 14px; min-height: 14px; opacity: 0.85; }
/* Card picture Draw window, option A: settings left, picture and prompt right (stays in view while the left scrolls). */
.dz-dialog.wide:has(.draw-two) { width: min(1320px, calc(100vw - 32px)); }
.draw-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 20px; align-items: start; }
.draw-left, .draw-right { display: grid; gap: 12px; min-width: 0; }
.draw-right { position: sticky; top: 0; }
.draw-placeholder { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #8a7350; border-radius: 6px; color: #7a6440; font-style: italic;
  background: repeating-linear-gradient(45deg, #e6d8b0 0 10px, #ecdfba 10px 20px); }
.draw-right .pic-preview { width: 100%; height: auto; }
.draw-box { display: grid; gap: 8px; border: 1px solid rgba(42, 31, 18, 0.3); border-radius: 6px; padding: 8px 12px; background: rgba(255, 252, 240, 0.5); }
.draw-box > .row { justify-content: space-between; }
.template-bar select { width: auto; }
.template-manage { flex-basis: 100%; display: grid; gap: 4px; padding: 6px 0; }
.template-manage .pic-name { max-width: 320px; }
.draw-rows { display: grid; gap: 6px; }
.draw-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: center; }
.draw-row textarea { width: 100%; resize: vertical; }
.draw-row.stacked { grid-template-columns: minmax(0, 1fr); gap: 4px; }
@media (max-width: 1000px) { .draw-two { grid-template-columns: 1fr; } .draw-right { position: static; } }
.draw-new-pics > .link-button { justify-self: start; }
.pic-picker { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; min-height: 360px; }
.pic-folders { display: flex; flex-direction: column; gap: 4px; }
.pic-folders button { justify-content: space-between; display: flex; text-align: left; }
.pic-folders button[aria-pressed='true'] { background: #2a1f12; color: var(--parchment-light); }
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; align-content: start; }
.pic-tile { display: flex; flex-direction: column; gap: 4px; padding: 6px; min-height: 0; text-align: center; font-size: 12px; }
.pic-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.pictures-tab { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.pic-folders button.is-drop { outline: 2px dashed var(--wax, var(--wax)); }
.pic-main { display: flex; flex-direction: column; gap: 10px; }
.pic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pic-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid rgba(42, 31, 18, 0.3); border-radius: 6px; background: rgba(255, 252, 240, 0.65); cursor: grab; }
.pic-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.pic-card .field.checkbox { margin: 0; font-size: 12.5px; }
.pic-name { font-weight: 600; }
.pic-tags summary { cursor: pointer; font-size: 13px; }
.pic-tags .field { margin: 4px 0; }
.pic-tags .field input { width: 100%; font-size: 12.5px; }
.pic-tags-found { margin: 4px 0; font-size: 12.5px; }
.pic-tags-found dt { font-weight: 600; }
.pic-tags-found dd { margin: 0 0 4px; }
.pic-uses { display: flex; flex-direction: column; gap: 0; }
.library-tabs { margin-bottom: 10px; }
.pic-card { background: #f6ecd4; color: var(--ink); }
.pic-card .field.checkbox label, .pic-card .field-label { color: var(--ink); }
.draw-thumb input { width: 16px; height: 16px; min-height: 0; }
.pictures-tab .pic-folders button { min-height: 36px; padding: 4px 10px; }

/* Notes screen and the DM notes window (1.3.0) */
.desk-theme .journal-page textarea, .desk-theme .journal-window textarea { background: transparent; color: #24180b; border: 0; box-shadow: none; }
.journal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.journal-window {
  min-height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 16px; color: var(--ink); box-sizing: border-box;
  background-color: var(--parchment-light);
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(90, 74, 50, 0.22) 27px 28px), var(--tex-paper);
  background-size: auto, 300px 300px;
}
.journal-window textarea { flex: 1; resize: none; padding: 4px 2px; font-family: var(--display); font-style: italic; font-size: 17px; line-height: 28px; }
.notes-lib { display: grid; grid-template-columns: var(--left-w, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.notes-list { position: relative; display: flex; flex-direction: column; gap: 8px; }
.notes-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.notes-items button {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 0; padding: 6px 10px; text-align: left;
  background: rgba(255, 252, 240, 0.4); border: 1px solid transparent; color: var(--ink); font-weight: 600;
}
.notes-items button span { font-weight: 400; font-size: 12px; }
.notes-items button[aria-current='true'] { background: #2a1f12; color: var(--parchment-light); }
.notes-items button[aria-current='true']:hover:not(:disabled) { background: #3d2c18; color: var(--parchment-light); }
.notes-items button[aria-current='true'] .ink-muted { color: #d8c7a0; }
.notes-edited { padding: 8px 10px; border-radius: 6px; background: #f4dcae; border: 1px solid var(--wax); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.notes-hint { font-size: 12px; }
.notes-view { min-width: 0; }
.notes-text, .notes-doc { height: auto; display: flex; flex-direction: column; gap: 10px; }
.notes-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.notes-title { flex: 1; min-width: 200px; font-family: var(--display); font-size: 24px; background: transparent; border-color: transparent; }
.notes-title:hover, .notes-title:focus { border-color: #a8916a; }
.notes-textarea { min-height: 420px; }
.notes-picture { max-width: 100%; border-radius: 4px; }
.notes-versions ul { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.notes-versions li { display: flex; gap: 12px; align-items: center; }
.notes-changed { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.note-editor { display: flex; flex-direction: column; gap: 0; border: 1px solid #a8916a; border-radius: 6px; background: #fffdf6; }
.note-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid #d9c9a6; background: #f3e8cf; border-radius: 6px 6px 0 0; }
.note-tools button { min-height: 30px; padding: 0 10px; font-size: 13px; }
.note-tools .is-b { font-weight: 800; } .note-tools .is-i { font-style: italic; } .note-tools .is-u { text-decoration: underline; }
.note-tools-gap { width: 10px; }
.note-page { min-height: 480px; max-height: 70vh; overflow: auto; padding: 24px 32px; color: #1c1209; font-family: var(--sans); font-size: 15px; line-height: 1.55; outline: none; user-select: text; }
.note-page h1 { font-size: 24px; margin: 14px 0 6px; } .note-page h2 { font-size: 20px; margin: 12px 0 6px; } .note-page h3 { font-size: 17px; margin: 10px 0 4px; }
.note-page p { margin: 0 0 8px; }
.note-page table { border-collapse: collapse; margin: 8px 0; }
.note-page td, .note-page th { border: 1px solid #8a7a5c; padding: 4px 8px; vertical-align: top; }
.compare { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.compare th, .compare td { border: 1px solid rgba(42, 31, 18, 0.25); padding: 4px 6px; text-align: left; vertical-align: top; }
.compare-note { font-size: 13px; margin: 4px 0; }
@media (max-width: 1100px) { .notes-lib { grid-template-columns: minmax(0, 1fr); } }
.compare input[type='checkbox'] { width: 18px; height: 18px; min-height: 0; }
.desk-head-actions.segmented button { white-space: nowrap; }
main.journal-window textarea { background: transparent; color: #24180b; border: 0; box-shadow: none; outline: none; }
.journal-window .journal-title { color: var(--ink); }

/* Fight screen 1.4.0: balance, effects, selection, bloodied, expanded rows */
.combatant { cursor: pointer; }
.combatant.is-selected { outline: 2px solid #2f6db5; outline-offset: 1px; }
.combatant.is-grouped { background: rgba(214, 228, 245, 0.8); }
.combatant.is-bloodied .cb-name { color: #a3191c; }
.combatant.is-bloodied .cb-hpbar span { background: #b3261e; }
.cb-blood { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: #a3191c; padding: 1px 6px; border-radius: 3px; }
.cb-tag { font-size: 11px; padding: 1px 6px; border-radius: 3px; background: rgba(42, 31, 18, 0.12); }
.cb-cr { margin-left: auto; font-size: 12px; font-weight: 700; padding: 1px 6px; border: 1px solid rgba(42, 31, 18, 0.35); border-radius: 3px; background: #fffaf0; }
.cb-cr + .cb-ac { margin-left: 8px; }
.cb-expand { min-height: 24px; min-width: 24px; padding: 0; border: 0; background: transparent; font-size: 14px; }
.cb-type { width: auto; min-width: 104px; }
.cb-balance { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; margin-bottom: 10px; border: 1px solid rgba(42, 31, 18, 0.3); border-radius: 6px; background: rgba(255, 252, 240, 0.7); }
.cb-balance-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.cb-rating { margin-left: auto; padding: 1px 8px; border-radius: 3px; background: #3c8a3c; color: #fff; }
.rating-moderate .cb-rating { background: #c79a2e; } .rating-high .cb-rating { background: #c4621f; } .rating-over_high .cb-rating { background: #a3191c; } .rating-trivial .cb-rating { background: #6b727c; }
.cb-balance-bar { position: relative; height: 10px; border-radius: 5px; background: rgba(42, 31, 18, 0.15); }
.cb-balance-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, #3c8a3c, #c79a2e 55%, #a3191c); }
.cb-balance-bar .mark { position: absolute; top: -3px; width: 2px; height: 16px; background: #2a1f12; }
.cb-balance-hint { font-size: 11.5px; }
.cb-effects { margin-bottom: 4px; }
.cb-effects-none { margin: 4px 0 0; }
.cb-effects .panel-title { margin: 0; }
.cb-effect-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cb-effect-list li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 8px; border-left: 4px solid #6b4fa0; background: rgba(240, 232, 252, 0.6); font-size: 13px; }
.cb-effect-form { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px dashed rgba(42, 31, 18, 0.4); border-radius: 6px; }
.cb-effect-form select, .cb-effect-form input { width: auto; }
.cb-effect-form input[aria-label='Note'] { width: 100%; }
.cb-effect-who { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cb-fx { background: rgba(232, 222, 250, 0.9); border-color: #6b4fa0; }
.cb-fx-now { margin: 4px 0; padding: 4px 8px 4px 22px; background: rgba(240, 232, 252, 0.8); border-radius: 4px; font-size: 13px; }
.cb-group { display: flex; flex-direction: column; gap: 6px; padding: 8px; margin-bottom: 8px; border: 2px solid #2f6db5; border-radius: 6px; background: rgba(214, 228, 245, 0.6); }
.cb-notes-wrap { display: flex; gap: 4px; flex: 1; min-width: 220px; }
.cb-notes-wrap .cb-notes { flex: 1; }
.cb-notes-open { min-height: 32px; padding: 0 8px; }
.cb-notes-big { width: 100%; min-height: 360px; }
.cb-death { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0; font-size: 13px; }
.cb-pips { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
.cb-pip { width: 16px; height: 16px; min-height: 0; min-width: 0; padding: 0; border-radius: 50%; border: 2px solid #4a2e16; background: #fffaf0; }
.cb-pip.is-used, .cb-pip.is-on { background: #4a2e16; }
.cb-pip.ok.is-on { background: #3c8a3c; border-color: #2a5f2a; } .cb-pip.bad.is-on { background: #a3191c; border-color: #6b1010; }
.cb-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(42, 31, 18, 0.35); cursor: default; }
.cb-circle { display: grid; grid-template-columns: 1fr 1fr; width: 140px; height: 140px; border-radius: 50%; border: 2px solid #4a2e16; overflow: hidden; background: #fffaf0; font-size: 12px; }
.cb-circle span { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(42, 31, 18, 0.25); }
.cb-track { border-collapse: collapse; font-size: 12px; align-self: start; }
.cb-track th, .cb-track td { border: 1px solid rgba(42, 31, 18, 0.25); padding: 2px 8px; text-align: center; min-width: 46px; }
.cb-track th:first-child { text-align: left; }
.cb-track .is-now { background: #f4dcae; }
.cb-track input[type='checkbox'] { width: 16px; height: 16px; min-height: 0; }
.cb-uses, .cb-special { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.cb-use { display: inline-flex; align-items: center; gap: 6px; }
.cb-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cb-small { font-size: 12px; }
.cb-turn { margin-bottom: 12px; }
.cb-actions ul { margin: 4px 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.cb-cond.cb-fx { color: #2a1f12; border: 1px solid #6b4fa0; }
.cs-slots { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.cs-slots label { display: flex; flex-direction: column; align-items: center; font-size: 10px; font-weight: 700; }
.cs-slots input { width: 100%; min-height: 0; height: 28px; padding: 0; text-align: center; }

.enc-pictures { margin: 10px 0; }
.enc-pictures .side-h { margin: 0; }
.enc-folder { font-size: 12px; word-break: break-all; }
.enc-thumbs { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.enc-thumbs li { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 128px; }
.enc-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; width: 128px; min-height: 0; background: rgba(255, 250, 240, 0.6); }
.enc-thumb img { width: 116px; height: 86px; object-fit: cover; border-radius: 3px; }
.enc-pdf { width: 116px; height: 86px; display: grid; place-items: center; font-weight: 700; border: 1px dashed #6b5a3a; }
.enc-thumb-name { font-size: 11px; max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Full sheet: D&D Beyond-style parts (SheetExtras.tsx) */
.cs-classes { margin-bottom: 10px; }
.cs-class-line { margin: 0 0 6px; font-size: 14px; }
.cs-class-rows { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: end; }
.cs-class-row { display: flex; gap: 6px; align-items: end; }
.cs-narrow input { width: 48px; }
.cs-inspiration { cursor: pointer; font: inherit; color: inherit; }
.cs-inspiration .cs-big { color: #8a6a1c; }
.cs-inspiration.is-on { background: #f5e2a8; border-color: #8a6a1c; }
.cs-hp-adjust { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 4px; }
.cs-hp-adjust input { width: 54px; min-height: 0; height: 26px; text-align: center; padding: 0 4px; }
.cs-hp-adjust button { min-height: 0; height: 26px; padding: 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.cs-heal { color: #24553a; }
.cs-damage { color: #7a2230; }
.cs-hd { display: flex; gap: 6px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.cs-hd button { min-height: 0; height: 24px; width: 24px; padding: 0; }
.cs-ds-row { display: flex; gap: 6px; align-items: center; font-size: 12px; margin: 2px 0; }
.cs-ds-row > span { width: 72px; }
.cs-tick { width: 16px; height: 16px; min-height: 0; min-width: 0; padding: 0; border: 1.5px solid #4a2e16; border-radius: 3px; background: #fffaf0; cursor: pointer; }
.cs-tick.is-on { background: #2a1a0c; }
.cs-tick.is-fail.is-on { background: #7a2230; border-color: #7a2230; }
.cs-use { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: end; padding: 6px 0; border-bottom: 1px solid rgba(107, 63, 34, 0.18); }
.cs-use-ticks { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.cs-filters { flex-wrap: wrap; margin: 4px 0; }
.cs-filters button { min-height: 0; padding: 3px 8px; font-size: 12px; }
.cs-per-action { display: inline-flex; gap: 6px; align-items: center; }
.cs-per-action input { width: 40px; min-height: 0; height: 24px; text-align: center; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cs-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #6b5a3a; padding: 3px 4px; }
.cs-table td { padding: 3px 4px; border-top: 1px solid rgba(107, 63, 34, 0.18); vertical-align: middle; }
.cs-table tr.is-open td { background: rgba(255, 250, 240, 0.6); }
.cs-notes { color: #6b5a3a; font-size: 11.5px; }
.cs-row-name { text-align: left; font-weight: 600; }
.cs-spell-nums { display: flex; gap: 14px; }
.cs-spell-nums span { display: flex; flex-direction: column; align-items: center; font-size: 10px; text-transform: uppercase; color: #6b5a3a; }
.cs-spell-nums b { font-size: 18px; color: #2a1a0c; }
.cs-search { flex: 1 1 160px; width: auto; min-height: 0; height: 30px; }
.cs-spell-level { margin: 8px 0; }
.cs-left { text-align: left; margin: 0; }
.cs-cast { white-space: nowrap; }
.cs-cast input[type='checkbox'] { width: 15px; height: 15px; min-height: 0; margin: 0 4px 0 0; vertical-align: middle; }
.cs-cast-btn { min-height: 0; height: 22px; padding: 0 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; background: #7a2230; color: #fffaf0; border-color: #7a2230; }
.cs-cast-btn:disabled { background: #b9a88a; border-color: #b9a88a; }
.cs-adv { width: 18px; height: 18px; min-height: 0; min-width: 0; padding: 0; font-size: 10px; font-weight: 700; border: 1px dashed rgba(74, 46, 22, 0.4); border-radius: 50%; background: transparent; margin-left: auto; }
.cs-adv + .cs-bonus { margin-left: 4px; }
.cs-adv.is-A { background: #24553a; color: #fff; border: none; }
.cs-adv.is-D { background: #7a2230; color: #fff; border: none; }
.cs-companion { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid rgba(107, 63, 34, 0.18); }

/* Run encounter: a character's sheet tracking on its row */
.cb-pc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0; font-size: 12.5px; }
.cb-insp { min-height: 0; height: 24px; padding: 0 8px; font-size: 12px; border: 1px dashed #8a6a1c; background: transparent; color: #6b5a3a; }
.cb-insp.is-on { background: #f5e2a8; border-style: solid; color: #4a2e16; font-weight: 700; }
.cb-exh { display: inline-flex; align-items: center; gap: 4px; }
.cb-exh select { width: auto; min-height: 0; height: 24px; padding: 0 4px; }
.cb-hd { display: inline-flex; align-items: center; gap: 4px; }
.cb-slots { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.cb-slots > .cb-pips { gap: 2px; margin: 0 0 0 8px; white-space: nowrap; }
.cb-slots > .cb-pips > b { margin-right: 2px; }
.cb-slots .cb-pip { width: 12px; height: 12px; border-width: 1.5px; }
.cb-hd button, .cb-pips .mono button { min-height: 0; height: 22px; padding: 0 6px; }

/* Battle planner (BattlePlanner.tsx) */
.battle-plan { margin: 12px 0; padding: 10px 12px; border: 1px solid rgba(107, 63, 34, 0.35); border-radius: 6px; background: rgba(255, 250, 240, 0.45); }
.battle-plan .panel-title { margin-top: 0; }
.bp-list { margin: 4px 0 8px; padding-left: 20px; font-size: 13px; }
.bp-list li { margin: 3px 0; }
.bp-tips { list-style: none; padding-left: 0; }
.bp-kind { display: inline-block; min-width: 46px; padding: 0 5px; margin-right: 4px; border-radius: 3px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; text-align: center; color: #fffaf0; }
.bp-do .bp-kind { background: #24553a; }
.bp-avoid .bp-kind { background: #7a2230; }
.bp-watch .bp-kind { background: #6b5a3a; }
.bp-foot { font-size: 11.5px; margin: 0; }

/* Spell names that open their description (SpellLink.tsx) */
.spell-link { display: inline; min-height: 0; padding: 0; border: none; background: none; box-shadow: none; font: inherit; color: #7a2230; text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; }
.spell-link:hover { color: #a3191c; }
.spell-own { margin-bottom: 10px; }

.cs-xp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.cs-xp.is-close .ink-muted, .pc-xp-close { color: var(--wax); font-weight: 700; }

.lib-folder { border-top: 1px solid rgba(90, 64, 30, 0.35); }
.lib-folder > summary { display: flex; align-items: center; gap: 8px; padding: 8px 4px; cursor: pointer; font-weight: 700; list-style: revert; }
.lib-folder > summary .swatch { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.lib-folder > .results { margin: 0 0 10px 18px; }

.gen-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.gen-list details { margin-bottom: 4px; }
.gen-list summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.gen-list ul { list-style: none; margin: 0 0 6px 12px; padding: 0; }
.gen-list li { padding: 2px 0; }
.gen-list .link-button { color: var(--ink); text-decoration: none; }
.gen-list .link-button.is-current { font-weight: 700; text-decoration: underline; color: var(--wax, var(--wax)); }
.gen-result { margin: 10px 0; padding: 10px 12px; border: 1px dashed #8f6a2a; border-radius: 4px; background: rgba(255, 250, 236, 0.6); }
.gen-result-text { font-size: 16px; margin: 6px 0 10px; }
.gen-entries { columns: 2 280px; column-gap: 28px; margin: 0; padding-left: 28px; }
.gen-entries li { break-inside: avoid; padding: 1px 0; }

.travel-checks { margin: 8px 0; padding: 8px 10px; border: 1px dashed #8f6a2a; border-radius: 4px; background: rgba(255, 250, 236, 0.5); }
.travel-checks h4 { margin: 0 0 4px; }
.travel-checks ol { margin: 6px 0; padding-left: 22px; }
.travel-checks li { margin: 3px 0; }
.suggestion-inline { font-style: italic; }

.board-mapview { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 8px; gap: 8px; overflow: auto; }
.board-mapview-bar { color: #2a1f12; padding: 6px 10px; background: rgba(255, 250, 236, 0.85); border: 1px solid #a8916a; border-radius: 4px; }
.board-mapview .map-layout { flex: 1; min-height: 0; }

.master-notes { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 14px; align-items: start; }
.master-toc { position: sticky; top: 0; max-height: calc(100vh - 140px); overflow: auto; }
.master-toc ol { list-style: none; margin: 6px 0; padding-left: 0; }
.master-toc ol ol { padding-left: 14px; }
.master-toc li { margin: 2px 0; }
.master-toc .link-button { color: var(--ink); text-decoration: none; text-align: left; }
.master-toc .toc-h2 { padding-left: 8px; } .master-toc .toc-h3 { padding-left: 16px; font-size: 13px; }
.master-doc { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.master-section .note-page[contenteditable='false'] { border: 0; background: transparent; min-height: 0; }
.master-recap { margin: 6px 0 10px; }
.master-recap p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Easter eggs on the Desk: the header candle and the d20 on the mat. */
.egg-candle-wrap { position: relative; flex: none; display: inline-block; }
.egg-candle-wrap .candle { pointer-events: none; }
.egg-hit { all: unset; cursor: pointer; }
.egg-candle-hit { position: absolute; z-index: 3; left: 0; top: -6px; width: 40px; height: 64px; }
.egg-dice { position: absolute; right: 190px; bottom: 60px; transform: rotate(14deg); z-index: 3; transition: left 0.6s ease-out, top 0.6s ease-out, transform 0.6s ease-out; }
.egg-dice .prop { position: static; }
.egg-dice.is-rolling .egg-d20 { animation: egg-spin 0.7s ease-out; }
.egg-dice:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 50%; }
@keyframes egg-spin { from { transform: rotate(0) scale(1.15); } to { transform: rotate(720deg) scale(1); } }
.egg-hobbit { position: absolute; left: 60px; bottom: -30px; z-index: 4; pointer-events: none; animation: egg-hobbit 4.6s ease-in-out forwards; filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.5)); }
@keyframes egg-hobbit { 0% { transform: translateX(120px); opacity: 0; } 15% { opacity: 1; } 40%, 62% { transform: translateX(0); } 50% { transform: translateX(0) rotate(-6deg); } 85% { transform: translateX(120px); opacity: 1; } 100% { transform: translateX(160px); opacity: 0; } }
.egg-taper-flame { animation: egg-flicker 0.3s infinite alternate; transform-origin: 52px 20px; }
@keyframes egg-flicker { to { transform: scale(0.85, 1.1); } }
.egg-dwarf { position: absolute; z-index: 4; pointer-events: none; animation: egg-dance 0.5s ease-in-out infinite alternate, egg-fade 6.5s linear forwards; filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.5)); }
@keyframes egg-dance { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-8px) rotate(6deg); } }
@keyframes egg-fade { 0% { opacity: 0; } 8%, 88% { opacity: 1; } 100% { opacity: 0; } }
.egg-lute { animation: egg-strum 0.25s infinite alternate; transform-origin: 50px 56px; }
@keyframes egg-strum { to { transform: rotate(-5deg); } }
.egg-note { position: absolute; top: -10px; left: 60px; color: #fbe7c6; font-size: 24px; text-shadow: 0 1px 2px #000; animation: egg-note 1.6s linear infinite; }
.egg-note.n2 { animation-delay: 0.5s; left: 80px; } .egg-note.n3 { animation-delay: 1s; left: 40px; }
@keyframes egg-note { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-40px) translateX(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .egg-dwarf, .egg-lute, .egg-note, .egg-taper-flame, .egg-dice.is-rolling .egg-d20 { animation: none; } .egg-hobbit { animation: none; } }

/* Notes (1.7.0): Campfire-style list (folders, headings under each note, multi-select) and a contents panel beside the note. */
.notes-lib.is-collapsed { grid-template-columns: 44px minmax(0, 1fr); }
.notes-list-collapsed { padding: 8px 4px; align-items: center; }
.tree-h { margin: 6px 0 0; font-family: var(--display); font-size: 16px; color: var(--ink); }
.tree-item.is-selected > .tree-row > button:last-child:not([aria-current='true']) { background: #e9d6a8; border-color: #8a6a3a; }
.tree-row { display: flex; align-items: stretch; gap: 2px; }
.tree-row > button:last-child { flex: 1; min-width: 0; }
.notes-items .tree-toggle { flex: none; width: 22px; min-height: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; font-weight: 400; }
.tree-rename { flex: 1; min-width: 0; }
.tree-heads { list-style: none; margin: 2px 0 4px 24px; padding: 0; font-size: 13px; }
.tree-heads .link-button { color: var(--ink); text-decoration: none; text-align: left; padding: 1px 0; }
.tree-heads .toc-h2 { padding-left: 8px; } .tree-heads .toc-h3 { padding-left: 16px; font-size: 12px; }
.notes-items .tree-folder-h { flex-direction: row; align-items: center; gap: 6px; background: transparent; font-weight: 700; }
.tree-in { margin-left: 14px; }
.notes-with-toc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 240px); gap: 14px; align-items: start; }
.notes-toc { position: sticky; top: 0; max-height: calc(100vh - 140px); overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.notes-toc ol { list-style: none; margin: 0; padding: 0; }
.notes-toc li { margin: 2px 0; }
.notes-toc .link-button { color: var(--ink); text-decoration: none; text-align: left; }
.notes-toc .toc-h2 { padding-left: 8px; } .notes-toc .toc-h3 { padding-left: 16px; font-size: 13px; }
.combine-list, .find-heads { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; }
.combine-list li, .find-heads li { display: flex; align-items: center; gap: 8px; }
.combine-list li span, .find-heads li label { flex: 1; min-width: 0; }
@media (max-width: 1300px) { .notes-with-toc { grid-template-columns: minmax(0, 1fr); } .notes-toc { position: static; } }
.notes-items .tree-heads button { width: auto; display: inline; min-height: 0; padding: 1px 4px; background: transparent; border: 0; font-weight: 400; }
.notes-items .tree-heads button:hover { text-decoration: underline; }
.find-heads li label { display: flex; align-items: baseline; gap: 6px; }
.find-heads select, .find-heads input[type='checkbox'] { width: auto; flex: none; }
.prep-section-head label.row { white-space: nowrap; }
.desk-theme .notes-list .notes-items button[aria-current='true'], .desk-theme .notes-list .notes-items button[aria-current='true']:hover:not(:disabled) { background: #2a1f12; color: var(--parchment-light); }
/* Composition picker (card pictures) */
.cmp-sketch { width: 100%; aspect-ratio: 4 / 3; display: block; background: #fbf6e6; border-radius: 3px; }
.cmp-frame { fill: none; stroke: #2a1f12; stroke-width: 1; }
.cmp-mass { fill: #3a2c1c; stroke: #2a1f12; stroke-width: 0.8; }
.cmp-line { fill: none; stroke: #2a1f12; stroke-width: 1.2; stroke-linecap: round; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 6px; }
.cmp-tile { display: flex; flex-direction: column; gap: 3px; padding: 4px; border: 1px solid rgba(42, 31, 18, 0.3); border-radius: 4px; background: rgba(255, 252, 240, 0.6); font-size: 12px; text-align: center; cursor: pointer; }
.cmp-tile.is-on { border-color: var(--wax); box-shadow: 0 0 0 2px var(--wax); }
.cmp-chosen { display: flex; gap: 10px; align-items: center; }
.cmp-chosen .cmp-sketch { width: 110px; flex: none; }
.cmp-guide { fill: none; stroke: var(--wax); stroke-width: 0.6; stroke-dasharray: 2 2; }

/* ---- building sheets (taverns, shops, buildings) ---- */
.building-top { flex: 1 1 100%; display: flex; flex-direction: column; min-width: 0; }
.building-backdrop { position: relative; height: 170px; overflow: hidden; border: 1px solid #150c06; border-radius: 8px 8px 0 0; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5); }
.building-backdrop svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.building-backdrop-cap { position: absolute; left: 22px; bottom: 14px; color: var(--parchment-light); font: italic 400 30px var(--display); text-shadow: 0 2px 4px #000; }
.building-backdrop-cap small { display: block; font: 13px system-ui, sans-serif; font-style: normal; color: #e8d29a; }
.floor-tabs { display: flex; gap: 4px; align-items: flex-end; margin-top: 10px; flex-wrap: wrap; }
.desk-theme .floor-tab { padding: 7px 16px; border: 1px solid #6b5636; border-bottom: 0; border-radius: 8px 8px 0 0; background: #b9a57a; color: #3d3020; min-height: 36px; }
.desk-theme .floor-tab:hover:not(:disabled) { background: #cdb98c; border-color: #6b5636; }
.desk-theme .floor-tab[aria-selected='true'], .desk-theme .floor-tab[aria-selected='true']:hover:not(:disabled) { background: var(--parchment); color: var(--ink); font-weight: 700; box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3); }
.desk-theme select.floor-tab.is-add { background: transparent; color: #e8d29a; border: 1px dashed var(--stitch); border-bottom: 0; width: auto; }
.desk-theme select.floor-tab.is-add option { color: #2a1f12; }
.desk-theme .floor-tab-input { width: 160px; background: var(--parchment-light); color: var(--ink); }
.floor-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 6px 14px; background: var(--parchment); color: var(--ink); border: 1px solid #6b5636; border-radius: 0 8px 8px 8px; }
.desk-theme .floor-bar .hint { color: #5a4a32; }
.floor-bar .field.floor-kind { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--ink); font-weight: 700; }
.floor-bar .field.floor-kind select { width: auto; }
.shop-type { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.shop-type select { width: auto; }
.inspector .shop-type { margin-top: 6px; }
.inspector .shop-type select { width: 100%; }
.floor-bar .field.checkbox { margin: 0; color: var(--ink); font-weight: 700; }
.desk-theme button.ai-button { border: 1.5px dashed #5aa0e6; color: #bfe0ff; }
.desk-theme .panel button.ai-button, .floor-bar button.ai-button { border-color: #2f6fb5; color: #1f4f88; background: rgba(220, 235, 255, 0.55); }
.roll-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #2f6b4f; color: #fff; border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.roll-bar label { color: #fff; font-weight: 600; }
.desk-theme .roll-bar input { width: 56px; text-align: center; font: 700 16px var(--mono, monospace); color: #2a1f12; background: #e8f2ea; min-height: 30px; padding: 2px; }
.roll-bar .hint-light { opacity: 0.85; }
.patron { border: 1px solid #a8916a; border-radius: 6px; background: rgba(255, 250, 236, 0.55); padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.patron.is-keeper { border: 2px solid #7a5a1c; background: rgba(255, 240, 200, 0.75); }
.patron-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.patron-who strong { font-size: 15px; }
.p-tag { font-size: 11px; border-radius: 999px; padding: 1px 8px; border: 1px solid #7a6440; color: #5a4a32; }
.desk-theme button.p-tag.is-card { border-color: #6b2f8a; color: #6b2f8a; font-weight: 700; min-height: 0; padding: 1px 8px; background: transparent; }
.patron-knows { font-size: 12px; color: #3d3020; }
.patron-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.patron-edit .span-2 { grid-column: span 2; }
.secret-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; opacity: 0.6; }
.secret-line.is-open { opacity: 1; }
.secret-line.has-card { background: #e4d6ee; border: 1px solid #8a5aa8; border-left: 4px solid #6b2f8a; border-radius: 4px; padding: 3px 6px; }
.secret-line.is-edit { opacity: 1; align-items: center; flex-wrap: wrap; }
.secret-line.is-edit .field { flex: 1 1 220px; margin: 0; }
.secret-line.is-edit .field label { position: absolute; left: -9999px; }
.secret-score { flex: none; width: 34px; text-align: center; border-radius: 5px; font: 700 12px monospace; padding: 2px 0; border: 1px solid #7a6440; }
.secret-line.is-open span.secret-score { background: #2f6b4f; color: #fff; border-color: #1d4532; }
.desk-theme input.secret-score { width: 54px; min-height: 30px; }
.secret-text { flex: 1; }
.kind-tag { flex: none; width: 60px; text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 4px; padding: 2px 0; margin-top: 1px; }
.kind-tag.is-rumour { background: #d9c89c; color: #5a4a32; }
.kind-tag.is-secret { background: var(--wax); color: #fff; }
.kind-tag.is-clue { background: #1f5f7a; color: #fff; }
.card-mark { font-size: 10px; font-weight: 700; color: #6b2f8a; border: 1px solid #6b2f8a; border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.b-legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 11px; color: #5a4a32; }
.has-card-key { background: #e4d6ee; border: 1px solid #8a5aa8; border-left: 4px solid #6b2f8a; border-radius: 4px; padding: 1px 8px; }
.desk-theme select.removed-select { align-self: flex-start; width: auto; font-size: 12px; min-height: 30px; }
.b-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.b-table th { text-align: left; font-size: 12px; color: #5a4a32; border-bottom: 1px solid #7a6440; padding: 4px 6px; }
.b-table td { border-bottom: 1px solid #c9b58a; padding: 3px 6px; vertical-align: middle; }
.b-table .num { text-align: right; font-family: monospace; white-space: nowrap; }
.desk-theme .b-table input.cell-input { width: 100%; min-height: 30px; padding: 2px 6px; background: transparent; border-color: transparent; }
.desk-theme .b-table input.cell-input:hover, .desk-theme .b-table input.cell-input:focus { border-color: #a8916a; background: rgba(255, 250, 236, 0.7); }
.desk-theme .b-table .num input.cell-input { text-align: right; font-family: monospace; }
.desk-theme .b-table input.room-no { width: 48px; text-align: center; font: 700 15px monospace; background: #3a2110; color: #e8d29a; min-height: 30px; }
.desk-theme .b-table select { min-height: 30px; }
.b-table .qty { white-space: nowrap; }
.desk-theme .b-table .qty button { min-width: 28px; min-height: 28px; padding: 0; font-weight: 700; }
.desk-theme .b-table .qty button.qty-n { min-width: 34px; font-family: monospace; border-color: transparent; }
.b-table tr.is-sold-out td { opacity: 0.55; }
.b-table tr.is-closed td { opacity: 0.7; }
.folder { border: 1px solid #a8916a; border-radius: 6px; background: rgba(255, 250, 236, 0.35); padding: 0 6px 6px; }
.folder > summary { padding: 7px 4px; font-weight: 700; cursor: pointer; }
.folder-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.folder-list li { display: flex; gap: 8px; align-items: flex-start; background: rgba(255, 250, 236, 0.7); border: 1px solid #c9b58a; border-radius: 5px; padding: 5px 7px; font-size: 13px; }
.folder-list li.has-card { background: #e4d6ee; border-color: #8a5aa8; border-left: 4px solid #6b2f8a; }
.folder-edit { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price-settings > summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.sketch { display: flex; flex-direction: column; gap: 6px; }
.sketch-tools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.desk-theme button.sketch-tool { font-size: 12px; min-height: 30px; padding: 3px 9px; }
.desk-theme button.sketch-tool[aria-pressed='true'] { background: #3a2110; color: var(--parchment-light); border-color: #150c06; box-shadow: none; }
.sketch-size { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12px; }
.desk-theme .sketch-size input { width: 56px; min-height: 30px; padding: 2px 4px; }
.desk-theme input.sketch-label-input { width: 220px; min-height: 30px; }
.sketch-paper { width: 100%; height: auto; border: 1px solid #7a6440; border-radius: 4px; cursor: crosshair; touch-action: none; user-select: none; background: #f4ecd6; }
.blueprint-box { border: 2px solid #2f6fb5; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: rgba(220, 235, 255, 0.35); }
.blueprint-preview { width: 100%; max-height: 220px; border: 1px solid #333; background: #fff; }
.blueprint-text { white-space: pre-wrap; font-size: 11px; max-height: 180px; overflow: auto; background: rgba(255, 250, 236, 0.7); border: 1px solid #a8916a; border-radius: 4px; padding: 6px; }
.ai-proposal .fill-body p, .ai-proposal .fill-body ul { margin: 0; font-size: 13px; }
.enc-sketch { display: flex; flex-direction: column; gap: 6px; }
.follow-frame { position: relative; overflow: hidden; border: 1px solid #333; border-radius: 4px; cursor: crosshair; touch-action: none; user-select: none; line-height: 0; }
.follow-frame img { width: 100%; height: auto; display: block; pointer-events: none; }
.field-warning { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; border: 1px solid #b07a1f; border-radius: 6px; background: rgba(255, 220, 140, 0.35); font-size: 13px; }
.battle-advanced { display: flex; flex-direction: column; gap: 8px; }
.battle-advanced summary { cursor: pointer; }
.battle-tags { display: flex; flex-direction: column; gap: 6px; }
.follow-crop { position: absolute; border: 2px solid #ffd76a; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45); pointer-events: none; }

/* Outline sketch and Update picture (Draw windows) */
.draw-outline, .change-picture { border: 1px solid #b8a27a; border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.draw-outline > summary { cursor: pointer; font-weight: 600; }
.draw-outline[open] { gap: 8px; }
.change-picture legend { font-weight: 600; padding: 0 4px; }
.desk-theme button.outline-swatch, .outline-swatch { width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; border-radius: 50%; border: 2px solid #5a4630; box-shadow: none; display: inline-block; }
.desk-theme button.outline-swatch[aria-pressed='true'] { outline: 3px solid #1f5f9a; outline-offset: 1px; }
.outline-paper { display: block; margin: 0 auto; }
.change-colour input { flex: 1; }

/* Speed: long lists draw only the rows on screen (the browser skips the rest until scrolled to). */
.removed > li, .pic-tile, .notes-items > .tree-item { content-visibility: auto; contain-intrinsic-size: auto 48px; }
.pic-tile { contain-intrinsic-size: auto 180px; }

/* Prep sheet text boxes with words linked to cards (LinkField). */
.lf-wrap { position: relative; }
.lf-wrap textarea { position: relative; width: 100%; display: block; }
textarea, .lf-back { tab-size: 4; }
.lf-back { position: absolute; inset: 0; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; color: transparent; pointer-events: none; }
.lf-back mark { --lc: #2f5d8a; color: transparent; background: color-mix(in srgb, var(--lc) 24%, transparent); border-bottom: 2px solid var(--lc); border-radius: 2px; }
.desk-theme .linked-word, .linked-word { display: inline; min-height: 0; height: auto; padding: 0 1px; margin: 0; border: 0; border-bottom: 2px solid var(--lc, #2f5d8a); border-radius: 2px; background: color-mix(in srgb, var(--lc, #2f5d8a) 18%, transparent); color: inherit; font: inherit; line-height: inherit; text-align: inherit; white-space: normal; cursor: pointer; box-shadow: none; }
.desk-theme .linked-word:hover:not(:disabled) { background: color-mix(in srgb, var(--lc, #2f5d8a) 34%, transparent); color: inherit; border-color: var(--lc, #2f5d8a); }
.card-picker { display: flex; flex-direction: column; gap: 10px; min-width: 420px; }
.card-picker-list { max-height: 55vh; overflow: auto; }
.card-picker-list ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.prep-card { display: flex; flex-direction: column; gap: 8px; }
.prep-card .inspector-picture { cursor: default; }
.prep-card-notes { white-space: pre-wrap; }

/* Fold and move any titled box (fold.ts): − / + ↑ ↓ after its title. */
.box-tools { display: inline-flex; gap: 3px; margin-left: 10px; vertical-align: middle; }
.box-tools button {
  min-height: 0; width: 20px; height: 20px; padding: 0; display: inline-grid; place-items: center;
  font: 700 13px/1 system-ui, sans-serif; color: #5a4a32; border: 1px solid rgba(42, 31, 18, 0.45); border-radius: 3px; background: rgba(255, 252, 240, 0.6);
}
.box-tools button:hover { background: #fff8e6; color: #2a1f12; }
[data-folded] > :not(:has(.box-tools)):not(:is(.panel-title, .panel-heading, .mat-heading)) { display: none !important; }
[data-folded] :has(> :is(.panel-title, .panel-heading, .mat-heading) > .box-tools) > :not(:is(.panel-title, .panel-heading, .mat-heading)) { display: none !important; }
[data-box-column] { display: flex !important; flex-direction: column; }
.npc-more { margin-top: 6px; }
.npc-more > summary { cursor: pointer; font-weight: 600; }
.npc-more-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 8px; }
.card-picker-new { border-top: 1px dashed rgba(42, 31, 18, 0.35); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.card-picker-new .row { flex-wrap: nowrap; }
.card-picker-new select { flex: 0 0 auto; width: auto; }
.card-picker-new input { flex: 1 1 auto; min-width: 0; }
.card-picker-new button { flex: 0 0 auto; white-space: nowrap; }
.npc-card-pick { grid-column: span 2; }
.npc-card-pick select { flex: 1; min-width: 0; }
.npc-card-pick button { white-space: nowrap; }

/* Names typed into in place (TitleField): plain title text, no box; click to type (owner, 2026-10-14). */
input.title-field.title-field, input.title-field.title-field:hover, input.title-field.title-field:focus, input.title-field.title-field:focus-visible {
  font: inherit; color: inherit; letter-spacing: inherit; text-shadow: inherit; background: transparent; border: 0; border-radius: 0;
  padding: 0; margin: 0; min-height: 0; max-width: 100%; box-shadow: none; outline: none; cursor: text;
}

/* Secrets, clues and connections (SecretEditor). */
.secret-editor { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.secret-conns { display: flex; flex-direction: column; gap: 6px; }
.secret-conn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.secret-conn select { width: auto; }
.card-chip { min-height: 30px; padding: 2px 10px; border: 1px solid #8a7350; border-radius: 999px; background: rgba(255, 252, 240, 0.85); color: var(--ink, #2a1f12); font-weight: 600; }
.card-chip.is-empty { border-style: dashed; color: var(--wax); font-weight: 400; }
.secret-problem { color: #b3261e; font-weight: 600; margin: 0; }
.secret-editor.is-held { outline: 2px solid #b3261e; outline-offset: 4px; border-radius: 3px; }
.secret-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.secret-list > li { border: 1px solid rgba(42, 31, 18, 0.2); border-radius: 4px; padding: 8px 10px; background: rgba(255, 252, 240, 0.35); }
.secret-conns .row select, .secret-conns .row button { width: auto; flex: 0 0 auto; white-space: nowrap; }
.panel-head-row .row button, .panel-head-row .row select { white-space: nowrap; width: auto; }

/* Prep NPC row, option 2 (owner, 2026-10-14): name and icon tools on top, fields use the full width. */
.npc-row { display: flex; flex-direction: column; gap: 8px; }
.npc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.npc-title { font-family: var(--display); font-size: 18px; font-weight: 400; }
.npc-tools .ink-button.icon { min-height: 30px; min-width: 34px; padding: 0 8px; font-size: 15px; }
.npc-top { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.npc-more { margin-top: 2px; padding: 8px 12px; border: 1px solid rgba(42, 31, 18, 0.2); border-radius: 6px; background: rgba(236, 222, 187, 0.6); }
.npc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 8px; align-items: start; }
.npc-links { padding: 8px 12px; border: 1px solid #8a7350; border-radius: 6px; background: rgba(255, 250, 236, 0.85); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.npc-links .ties { margin: 0; }
.npc-show { margin-top: 10px; }
.npc-show > summary { cursor: pointer; font-weight: 600; }
.npc-show .field.checkbox { gap: 6px; }
.npc-show-part { margin-top: 6px; padding: 6px 10px; border: 1px solid rgba(42, 31, 18, 0.2); border-radius: 6px; background: rgba(255, 250, 236, 0.6); }
.new-link-row { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 12px; align-items: start; }
/* Pop-out prep windows: just the section, on the wood. */
.prep-window-frame { display: block; height: 100vh; overflow-y: auto; }
.prep-window { padding: 12px; }
.prep-window .prep-main { max-width: none; }
@media (max-width: 760px) { .npc-top, .npc-grid, .new-link-row { grid-template-columns: 1fr; } }

/* Board side panel: fold away with › and back with ‹ (owner, 2026-10-15). */
.desk-theme .side { position: relative; }
.side-fold, .side-unfold { width: 16px; min-height: 0; height: 44px; padding: 0; border: 1px solid #4a3216; background: #2a1a0c; color: #e9d6a8; font-size: 15px; line-height: 1; box-shadow: none; cursor: pointer; }
.side-fold { position: absolute; left: -1px; top: 50%; transform: translateY(-50%); border-radius: 0 5px 5px 0; z-index: 5; }
.side-unfold { align-self: center; border-radius: 5px 0 0 5px; }
.side-fold:hover, .side-unfold:hover { opacity: 1; background: #3a2412; color: var(--gold); }

/* DM screen, compact (owner, 2026-10-15): same pictures, side by side with their text; the Session box takes the room. */
.dm-screen { grid-template-columns: minmax(280px, 1.15fr) minmax(190px, 0.75fr) minmax(220px, 1fr) minmax(320px, 1.6fr); gap: 10px; padding: 10px; }
.dm-screen .dm-panel { padding: 8px 12px; gap: 4px; }
.dm-screen .panel-title { font-size: 19px; line-height: 1.2; }
.dm-panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
/* The time keeps its width: in a narrow panel it goes under the picture instead of running past the edge. */
.dm-panel-row > .clock-side { flex: 1 0 auto; }
.dm-panel-row .clock-dial { width: 136px; flex: 0 0 136px; max-height: 84px; }
.dm-panel-row .moon-disc { width: 84px; height: 84px; flex: 0 0 84px; }
.dm-screen .moon-panel { align-items: stretch; text-align: left; }
.dm-screen .moon-name { font-size: 18px; }
.clock-side { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.clock-side .clock-text { font-size: 16px; }
.dm-screen .ink-button { min-height: 28px; padding: 0 8px; font-size: 13px; white-space: nowrap; }
.dm-screen .ledger li { min-height: 24px; }
.dm-screen .ledger-name { min-height: 24px; font-size: 16px; }
/* Name and numbers on one line when the panel is wide; long names shorten (full name on hover). */
.dm-screen .ledger li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
.dm-screen .ledger-name { text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-screen .ledger .mono { margin-left: auto; white-space: nowrap; }
/* A narrow party panel: every character's numbers under the name (all rows alike, nothing cut; owner, 2026-10-22). */
.dm-screen .party-panel { container-type: inline-size; }
@container (max-width: 380px) {
  .dm-screen .ledger li { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: 2px 0 4px; }
  .dm-screen .ledger .ledger-name { min-height: 0; line-height: 1.25; }
  .dm-screen .ledger .mono { margin-left: 0; font-size: 12.5px; line-height: 1.3; }
}
.dm-screen .row.tight { gap: 4px; }
@media (max-width: 1200px) { .dm-screen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.session-panel { min-height: 0; }
/* Title and lines up to two lines each (owner, 2026-10-22: cut off at one). */
.session-title-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.session-nav { display: flex; align-items: center; gap: 4px; }
.session-nav .ink-button.icon { width: 28px; padding: 0; font-size: 16px; flex: 0 0 28px; }
.session-part { flex: 1; min-width: 0; min-height: 28px; display: flex; align-items: center; gap: 4px; padding: 0 6px; border: 0; background: transparent; box-shadow: none; color: var(--ink); font-family: var(--display); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.session-part:hover:not(:disabled) { background: rgba(120, 80, 30, 0.12); }
.session-part .prep-n { width: 20px; height: 20px; font-size: 12px; flex: 0 0 20px; font-family: var(--sans, inherit); }
.session-lines { list-style: none; margin: 0; padding: 0; max-height: 132px; overflow-y: auto; font-size: 13px; }
.session-lines li { display: flex; align-items: flex-start; gap: 6px; min-height: 24px; padding: 3px 0; border-bottom: 1px dashed rgba(90, 74, 50, 0.35); cursor: default; }
.session-lines li:last-child { border-bottom: 0; }
.session-lines li span { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.session-lines li.is-done span { text-decoration: line-through; color: var(--ink-muted); }
.session-lines input { margin: 1px 0 0; width: 15px; height: 15px; min-height: 0; flex: 0 0 15px; }
.session-empty { margin: 4px 0; }

/* DM notes title on one line beside ⧉. */
.journal-top .journal-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 20px; }
.session-lines.is-text li span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.rail-item.pop-close { color: var(--gold); border-color: var(--brass); }
.enc-mini-map { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(42, 31, 18, 0.25); }
.enc-mini-map .side-h { margin: 0; }
.desk-theme button.enc-mini-thumb { padding: 0; min-height: 0; aspect-ratio: 1; width: 100%; max-width: 180px; align-self: center; border: 1px solid #7a6440; border-radius: 4px; overflow: hidden; line-height: 0; cursor: pointer; background: #b9a46e; }
.enc-mini-thumb svg { width: 100%; height: 100%; display: block; }
/* One pop-out button everywhere: ⧉ (owner, 2026-10-15). */
/* Same size and look as the − ↑ ↓ box tools beside it (owner, 2026-10-15). */
.desk-theme button.pop-out {
  /* 24 px: Windows draws ⧉ wider than Linux; the glyph keeps clear of the edge on both. */
  width: 24px; min-width: 24px; min-height: 0; height: 24px; padding: 0; flex: 0 0 24px; display: inline-grid; place-items: center;
  font: 700 12px/1 system-ui, sans-serif; color: #5a4a32; border: 1px solid rgba(42, 31, 18, 0.45); border-radius: 3px; background: rgba(255, 252, 240, 0.6);
  box-shadow: none; vertical-align: middle; position: relative; z-index: 3;
}
.desk-theme button.pop-out:hover { background: #fff8e6; color: #2a1f12; }
.session-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.session-head .panel-title { flex: 1; min-width: 0; }
/* The hour: buttons wrap under the clock text instead of running past the panel. */
.clock-side { flex: 1; }
.clock-side .row.tight { flex-wrap: wrap; }
/* −1 h, +1 h and Set… on one row, small (owner, 2026-10-16). */
.dm-screen .clock-side .row.tight { flex-wrap: nowrap; gap: 3px; }
.dm-screen .clock-side .ink-button { min-height: 22px; padding: 0 6px; font-size: 12px; }
/* The moon: picture and words centred in the box. */
.dm-screen .moon-panel .dm-panel-row { flex: 1; justify-content: center; gap: 14px; }
.dm-screen .moon-panel .moon-name { line-height: 1.15; }
/* The DM screen's own − ↑ ↓ (on The hour's title, they fold and move the whole screen) sit at its top right corner. */
.dm-screen { position: relative; }
.dm-screen .clock-panel { position: static; }
.dm-screen .clock-panel.tall .dm-panel-row { flex: 1; flex-direction: column; align-items: stretch; gap: 6px; }
/* The dial takes no height of its own: it fills what the party box leaves, never taller (owner, 2026-10-19). */
.dm-screen .clock-panel.tall .dm-panel-row .clock-dial { width: 100%; flex: 1 1 0; contain: size; min-height: 60px; max-height: 150px; }
.dm-screen .clock-panel.tall .clock-side { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: 10px; }
.dm-screen .clock-panel > .panel-title > .box-tools { position: absolute; top: 18px; right: 22px; margin: 0; z-index: 4; }
/* Folded, only The hour's title shows: its + ↑ ↓ stay beside the title, not out on the frame. */
.dm-screen[data-folded] .clock-panel > .panel-title > .box-tools { position: static; margin-left: 10px; }
.dm-screen > .session-panel > :first-child { padding-right: 72px; }
.chest-choice { display: flex; flex-direction: column; gap: 6px; padding-left: 14px; }
/* The card behind linked words outside sheets with their own side panel. */
.linked-card-note { position: fixed; right: 16px; bottom: 16px; z-index: 900; width: 300px; max-height: 40vh; overflow: auto; padding: 10px 12px; box-shadow: 0 6px 18px rgba(30, 18, 6, 0.4); }
.linked-card-note p { margin: 6px 0 0; font-size: 13px; }

/* Build an encounter (Live and Encounters) and the encounter story (owner, 2026-10-15). */
.enc-list { position: relative; top: auto; }
.enc-builder { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; }
.enc-builder-card { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(42, 31, 18, 0.25); }
.enc-builder-title { font-family: var(--display); font-weight: 400; font-size: 21px; }
.enc-builder .field-label, .enc-story .field-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); margin-top: 4px; }
.enc-builder select, .enc-builder textarea, .enc-builder input:not(.tiny) { width: 100%; min-width: 0; }
.enc-builder .row select { flex: 1; width: auto; }
.enc-builder input.tiny { width: 56px; min-height: 30px; padding: 0 6px; }
.eb-chip { --c: #6b4a8f; display: inline-flex; align-items: center; gap: 4px; padding: 1px 4px 1px 9px; border: 1px solid var(--c); border-radius: 12px; color: var(--c); font-size: 12px; background: rgba(255, 250, 236, 0.7); max-width: 100%; }
.eb-chip.t-clue { --c: #6b5a3a; }
.eb-chip input { width: 40px; min-height: 20px; padding: 0 3px; font-size: 12px; }
.desk-theme .eb-chip button, .eb-chip button { min-height: 0; height: 18px; padding: 0 4px; border: 0; background: transparent; color: inherit; line-height: 1; }
.eb-draft { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 10px; border: 2px dashed #8a7350; border-radius: 6px; }
.eb-draft h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; }
.eb-draft ul { margin: 0; padding-left: 18px; }
.eb-draft p, .eb-story p { margin: 0; }
.enc-bulk { margin: 0 0 6px; padding: 5px 8px; background: rgba(255, 250, 236, 0.55); border-radius: 4px; }
.enc-cr { white-space: nowrap; }
.desk-theme .enc-cr .ink-button.icon, .desk-theme .story-row .ink-button.icon, .desk-theme .story-tier .ink-button.icon, .desk-theme .enc-story .side-h .ink-button.icon, .desk-theme .story-check .ink-button.icon {
  min-width: 24px; width: 24px; min-height: 24px; height: 24px; padding: 0; font-size: 12px; line-height: 1;
}
.enc-cr .mono { display: inline-block; min-width: 2.4em; text-align: center; }
.enc-story { margin-top: 12px; padding-top: 8px; border-top: 1px dashed rgba(90, 74, 50, 0.45); }
.enc-story .side-h { display: flex; align-items: center; gap: 8px; }
.story-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.story-row .field { margin: 0; }
.story-row .grow { flex: 1; min-width: 0; }
.story-row .short { width: 64px; }
.story-row .story-item, .story-row .story-name { width: 240px; flex: none; }
.story-row select { max-width: 240px; }
.story-check { padding: 8px; margin-bottom: 8px; border: 1px solid #c9b48a; border-radius: 4px; background: rgba(255, 250, 236, 0.5); }
.story-tier { display: grid; grid-template-columns: 70px 1fr 24px; gap: 6px; align-items: start; margin-top: 5px; }
.story-tier .field { margin: 0; }
.enc-write { margin-top: 12px; padding: 10px 12px; border: 2px dashed #2f5d8a; border-radius: 6px; background: rgba(47, 93, 138, 0.06); }
.enc-write .row input { flex: 1; min-width: 0; }
.enc-write h4 { margin: 6px 0 2px; }
.enc-builder .enc-builder-title { margin: 0; }
.enc-builder .eb-draft strong, .enc-builder .eb-draft h3 + span { font-family: inherit; font-size: inherit; }
.enc-builder .eb-draft strong { font-weight: 600; }
.enc-builder .eb-draft h3 { font-size: 20px; }
.enc-bulk label { display: inline-flex; align-items: center; gap: 4px; }
.desk-theme .enc-bulk input[type='checkbox'], .desk-theme .enc-table input[type='checkbox'] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; }
.story-check select { width: auto; min-width: 180px; }
.story-check > .row { flex-wrap: wrap; }
.story-check-ai { flex: 1 1 100%; order: 9; }
.enc-story .row.wrap > select { width: auto; flex: 1; min-width: 200px; }

/* Encounters, compact look (owner chose mockup v5, 2026-10-15): one-line boxes, small labels and buttons, two columns. */
.encounters-screen { --control: 30px; font-size: 13.5px; }
.encounters-screen .enc-layout { grid-template-columns: var(--left-w, 270px) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1300px) { .encounters-screen .enc-layout { grid-template-columns: 240px minmax(0, 1fr); } }
.encounters-screen .enc-left { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.encounters-screen .enc-left > .parchment-note { margin: 0; padding: 12px; }
.encounters-screen .enc-left .panel-title { font-size: 19px; margin: 0 0 4px; }
.encounters-screen .enc-mini-map { margin-top: 0; border-top: 0; }
.encounters-screen .eb-adapt { font-size: 12px; }
.encounters-screen .field { margin: 0; gap: 2px; }
.encounters-screen .field > label, .encounters-screen .field-label, .encounters-screen .enc-pcs-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted);
}
.encounters-screen input:not([type='checkbox']):not([type='radio']), .encounters-screen select, .encounters-screen textarea.grow.line {
  min-height: 30px; height: 30px; padding: 3px 7px; font-size: 13.5px;
}
.encounters-screen textarea.grow.line { field-sizing: fixed; resize: none; overflow: hidden; white-space: nowrap; }
.encounters-screen textarea:not(.line) { padding: 5px 7px; font-size: 13.5px; }
.desk-theme .encounters-screen button.ink-button, .desk-theme .encounters-screen button.brass { min-height: 28px; padding: 0 10px; font-size: 13px; }
.desk-theme .encounters-screen button.ink-button.icon { min-width: 20px; width: 20px; min-height: 20px; height: 20px; padding: 0; font-size: 11px; line-height: 1; }
.encounters-screen .enc-editor { padding: 16px 20px; gap: 8px; }
.encounters-screen .enc-editor .side-h { font-size: 19px; margin: 4px 0; }
.encounters-screen .enc-bulk { border: 1px solid #c9b48a; border-radius: 5px; padding: 6px 10px; background: rgba(255, 250, 236, 0.45); }
.encounters-screen .enc-bulk-note { flex-basis: 100%; white-space: nowrap; font-size: 12px; }
.encounters-screen .enc-box { border: 1px solid #c9b48a; border-radius: 5px; padding: 10px 12px; background: rgba(255, 250, 236, 0.45); }
.encounters-screen .enc-box .side-h { font-size: 17px; margin: 0 0 4px; }
.encounters-screen .enc-table td, .encounters-screen .enc-table th { padding: 3px 6px; font-size: 13px; vertical-align: middle; }
.encounters-screen .enc-table th { font-size: 12px; }
.encounters-screen .enc-table .count { gap: 4px; align-items: center; flex-wrap: nowrap; }
.desk-theme .encounters-screen .enc-table .count .ink-button { min-width: 20px; width: 20px; min-height: 20px; height: 20px; padding: 0; font-size: 11px; }
.encounters-screen .enc-table td .field textarea.line { min-width: 140px; }
.desk-theme .encounters-screen .enc-table button.danger-ink { min-height: 20px; height: 20px; padding: 0 6px; font-size: 11px; }
.encounters-screen .enc-story { margin-top: 6px; }
.encounters-screen .story-grid { display: grid; grid-template-columns: 240px 56px minmax(0, 1fr) 70px 20px; gap: 6px; align-items: center; margin: 3px 0; }
.encounters-screen .story-grid .story-wide { grid-column: 2 / 4; }
.encounters-screen .story-grid .ink-button:not(.icon) { width: 70px; padding: 0 4px; }
.encounters-screen .story-grid .short { width: 56px; }
.encounters-screen .story-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.encounters-screen .story-name > .field { flex: 1; min-width: 0; }
.encounters-screen .story-name > select { flex: 1; min-width: 0; max-width: none; }
.encounters-screen .story-name > select:last-child:not(:first-child) { flex: none; width: 70px; }
.encounters-screen .story-tier { grid-template-columns: 64px 1fr 20px; align-items: center; }
.encounters-screen .story-check { padding: 8px; }
.encounters-screen .enc-write { padding: 8px 12px; }
.encounters-screen textarea.grow.line { line-height: 22px; }
.encounters-screen .enc-add .hint { font-size: 11.5px; }

/* Board side panel › Find a card. */
.card-finder { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.card-finder input { flex: 1; min-width: 0; }
.card-finder select { flex: 0 0 auto; max-width: 120px; }
.card-finder-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.card-finder-list button { width: 100%; text-align: left; min-height: 28px; padding: 2px 8px; font-size: 13px; }
.card-finder-list .type-pill { display: inline-block; min-width: 64px; font-size: 11px; opacity: 0.75; }
@keyframes card-found { 0%, 100% { filter: none; } 30%, 70% { filter: drop-shadow(0 0 10px var(--gold)) drop-shadow(0 0 4px var(--gold)); } }
.react-flow__node.is-found { animation: card-found 0.8s ease-in-out 2; }

/* Session summary draft (Fill from the session): dashed like a proposal, not blue (no AI). */
.summary-tools { display: flex; flex-direction: column; gap: 6px; }
.summary-draft { border: 1px dashed #8a7350; border-radius: 6px; padding: 8px 10px; background: rgba(255, 252, 240, 0.6); }
.session-summary { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

.tidy-list { max-height: 50vh; overflow: auto; }

/* 3.0 Link window and the sheet's Links & secrets list */
.link-window { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.link-window textarea { width: 100%; resize: vertical; }
.toggle-chip.secret-chip[aria-pressed='true'] { background: var(--wax); }
.dz-actions .spacer { flex: 1; }
.pre-line { white-space: pre-line; }
.link-group-head { margin: 10px 0 2px; font: italic 17px var(--display); color: var(--wax); border-bottom: 1px solid rgba(143, 42, 33, 0.3); }
.link-rows { list-style: none; margin: 0; padding: 0; }
.link-rows li { display: flex; align-items: flex-start; gap: 8px; padding: 6px 2px; border-bottom: 1px dashed rgba(122, 100, 64, 0.35); }
.link-badge { flex: none; width: 58px; margin-top: 2px; padding: 2px 0; border-radius: 3px; text-align: center; font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: #f6ecd0; background: #3b6e8f; }
.link-badge.k-secret { background: var(--wax); } .link-badge.k-clue { background: #5a3f8a; }
.link-row-main { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; padding: 0; border: 0; background: none; text-align: left; color: inherit; }
.link-row-main i { color: var(--ink-muted); font-style: normal; }
.link-row-text { color: var(--ink-muted); font-size: 12.5px; white-space: pre-line; }

/* 3.0 Draw windows: Advanced fold, and what the chosen service cannot take */
.draw-advanced { margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(122, 100, 64, 0.35); }
.draw-advanced > summary { cursor: pointer; font-family: var(--display); font-size: 17px; }
.draw-advanced[open] > summary { margin-bottom: 8px; }
.draw-advanced > :not(summary) + :not(summary) { margin-top: 10px; }
.draw-hidden { margin: 0 0 8px; padding: 7px 10px; border: 1px dashed rgba(143, 42, 33, 0.5); border-radius: 4px; background: rgba(143, 42, 33, 0.06); color: var(--wax); font-size: 12.5px; }

/* 3.0 Ctrl+F: find anything */
.find-anything { display: flex; flex-direction: column; gap: 8px; }
.find-anything input[type='search'] { font-size: 16px; padding: 8px 10px; }
.find-list { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow: auto; }
.find-list li { display: flex; align-items: center; gap: 8px; padding: 2px 4px; border-radius: 4px; }
.find-list li.is-at { background: rgba(143, 42, 33, 0.1); }
.find-main { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 0; padding: 5px 4px; border: 0; background: none; text-align: left; color: inherit; }
.find-icon { width: 18px; display: inline-grid; place-items: center; color: var(--ink-muted); }
.find-name { font-weight: 600; }
.find-kind { color: var(--ink-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Box controls show when the pointer or keyboard is on the box, on a folded box, or always with Setup › Arrange boxes (3.1). */
.box-tools { visibility: hidden; }
[data-box]:hover .box-tools, [data-box]:focus-within .box-tools, [data-folded] .box-tools, html[data-arrange] .box-tools { visibility: visible; }
.cs-slot-left { font-size: 10px; font-weight: 700; margin-top: 2px; }
.cs-slot-left.is-empty { color: #7a2230; }
.cs-slot-ticks { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 2px; }
.cs-slot-ticks .cs-tick { width: 11px; height: 11px; border-width: 1px; border-radius: 2px; }
.cs-pact { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 6px 0; }
.cs-pact input.cs-pact-n { width: 40px; min-height: 0; height: 24px; text-align: center; padding: 0; }
.cs-pact select { min-height: 0; height: 24px; padding: 0 4px; }

/* Cast a spell (CastPanel.tsx) */
.cb-cast { margin: 0 0 8px; }
.cast-lines { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.cast-lines li { padding: 2px 8px; border-left: 4px solid; border-radius: 2px; }
.cast-red { color: #7a2230; font-weight: 600; }
.cast-lines .cast-red { border-color: #b3261e; background: rgba(179, 38, 30, 0.1); }
.cast-lines .cast-yellow { border-color: #b8860b; background: rgba(184, 134, 11, 0.12); color: #5a4100; }
.cast-lines .cast-green { border-color: #2e7d4f; background: rgba(46, 125, 79, 0.1); color: #1f4d33; }
.cast-lines .cast-note { border-color: #8a7a5a; color: #5a4c33; font-style: italic; }
.cast-targets { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.cast-target { padding: 4px 6px; border: 1px solid rgba(107, 63, 34, 0.2); border-radius: 4px; }
.cast-target.is-on { border-color: #6b3f22; background: rgba(255, 250, 240, 0.5); }
.cast-target input.short { width: 64px; }
.cast-reaction { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; padding: 4px 0; border-top: 1px dashed rgba(107, 63, 34, 0.3); }
.cast-list { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.cast-list legend { width: 100%; }
.cs-pact label { display: inline-flex; gap: 4px; align-items: center; }
fieldset.cast-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0 12px; }
fieldset.cast-list legend { grid-column: 1 / -1; }
fieldset.cast-list .field.checkbox { margin: 0; }

/* Board without its world map (BoardScreen): a hint with one button. */
.board-map-hint { position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%); z-index: 5; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 18px; text-align: center; font-size: 14px; color: #2a1f12; background: rgba(250, 240, 215, 0.95); border: 1.5px dashed #6b4f2a; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.board-map-hint strong { font-size: 16px; }
.cb-likely { margin: 4px 0 8px; padding: 6px 10px; border: 1px solid rgba(107, 63, 34, 0.35); border-radius: 4px; background: rgba(255, 250, 240, 0.55); }
.cb-likely h3 { margin: 0 0 2px; }
.cb-likely ol { margin: 0; padding-left: 20px; font-size: 13px; }
.cb-actions li.is-spent { opacity: 0.6; }
.cb-actions li button.cb-group { display: inline; width: auto; height: auto; min-height: 0; min-width: 0; margin: 0 0 0 3px; padding: 0 3px; border: 0; box-shadow: none; background: none; font-size: 12px; line-height: 1; color: #7a2230; text-decoration: none; vertical-align: baseline; }
.cb-group-pick { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 3px; font-size: 12px; }
.cb-group-pick .ink-button { min-height: 0; height: 24px; padding: 0 8px; font-size: 12px; }
.board-map-hint-off { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; white-space: nowrap; }
.board-map-hint-off input { width: 16px; height: 16px; min-height: 0; margin: 0; flex: none; }

/* 3.8.0: things a character carries (sheet), the exact time on Live. */
.carried-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.set-time { margin-top: 6px; align-items: center; }
.set-time input[type='time'] { width: 120px; }

/* 3.9.0 Calendar: Desk box, moons, Live Today, Calendar screen, calendar windows, card Dates box, date words. */
.dm-screen .calendar-panel { min-width: 0; }
.cal-box-date { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.cal-box-next { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.cal-box-next li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cal-box-next li.done .cal-what { text-decoration: line-through; opacity: 0.7; }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cal-when { flex: none; width: 76px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.cal-box-actions { justify-content: flex-end; margin-top: auto; padding-top: 4px; }
.moon-list { display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }
.moon-list.many .adv-art-moon, .moon-list.many .moon-disc { width: 44px; height: 44px; flex: 0 0 44px; }
.moon-list.many .moon-name { font-size: 15px; }
.moon-of { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.moon-set { justify-content: flex-end; }
.live-screen-bar { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.passed-note { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; border: 2px solid var(--wax); border-radius: 4px; background: rgba(255, 248, 228, 0.6); }

.calendar-screen { flex: 1; min-height: 0; display: flex; gap: 14px; padding: 14px; overflow: hidden; }
.cal-side { width: 280px; flex: none; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 12px; }
.cal-side-steps { display: flex; flex-direction: column; gap: 4px; }
.cal-side-steps .ink-button { min-width: 30px; padding: 2px 6px; }
.cal-side-val { flex: 1; text-align: center; background: rgba(255, 250, 240, 0.8); border: 1px solid var(--border); border-radius: 3px; padding: 3px 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-show { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; font-size: 13px; }
.cal-key { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.cal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-title { margin: 0; min-width: 240px; text-align: center; font-size: 20px; }
.seg { display: inline-flex; flex-wrap: wrap; }
.seg > button { border-radius: 0; margin-left: -1px; }
.seg > button:first-child { border-radius: 4px 0 0 4px; margin-left: 0; }
.seg > button:last-child { border-radius: 0 4px 4px 0; }
.cal-tip { margin: 0; font-size: 12px; color: var(--muted); }
.cal-month { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: auto; }
.cal-weekdays { display: grid; background: #3b2414; color: #f0e3c6; font-size: 12px; text-align: center; }
.cal-weekdays > div { padding: 5px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-grid { flex: 1; display: grid; grid-auto-rows: minmax(92px, 1fr); }
.cal-cell { border-right: 1px solid rgba(110, 82, 53, 0.45); border-bottom: 1px solid rgba(110, 82, 53, 0.45); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; cursor: pointer; background: rgba(255, 248, 228, 0.35); }
.cal-cell.blank { background: repeating-linear-gradient(135deg, rgba(110, 82, 53, 0.08) 0 8px, transparent 8px 16px); cursor: default; }
.cal-cell.past { background: rgba(110, 82, 53, 0.12); }
.cal-cell.today { background: rgba(255, 244, 214, 0.9); box-shadow: inset 0 0 0 2px var(--wax); }
.cal-cell.selected:not(.today) { box-shadow: inset 0 0 0 2px var(--muted); }
.cal-cell:focus-visible { outline: 2px solid var(--wax); outline-offset: -2px; }
.cal-cell-head { display: flex; align-items: center; gap: 3px; min-width: 0; }
.cal-num { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-cell.today .cal-num { color: var(--wax); }
.cal-fest { font-size: 11px; font-weight: 700; color: #3f6b3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip { display: block; width: 100%; min-height: 0; text-align: left; font-size: 11px; line-height: 1.25; border: 0; border-radius: 3px; padding: 2px 4px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-key .cal-chip { display: inline-block; width: auto; }
.cal-chip.beat { background: #f6ecd2; color: #3a2414; border: 1px solid #5c6b73; }
.cal-chip.past { opacity: 0.6; }
.cal-extra { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; padding: 6px 8px; border-top: 2px solid var(--muted); }
.cal-extra .cal-cell { width: 180px; min-height: 70px; border: 1px solid rgba(110, 82, 53, 0.45); }
.cal-extra .hint { align-self: center; }
.cal-week { flex: 1; min-height: 0; display: grid; gap: 0; padding: 0; overflow: auto; }
.cal-week-day { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-right: 1px solid rgba(110, 82, 53, 0.45); min-width: 0; }
.cal-week-day.today { background: rgba(255, 244, 214, 0.9); box-shadow: inset 0 0 0 2px var(--wax); }
.cal-week-day.past { background: rgba(110, 82, 53, 0.12); }
.cal-week-head { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; padding: 2px; border: 0; background: transparent; font-size: 12px; text-align: left; }
.cal-week-day .cal-chip { white-space: normal; overflow-wrap: anywhere; }
.cal-week-weather { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.cal-day { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cal-day-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.cal-box { border: 1px solid var(--border); border-radius: 4px; padding: 8px; background: rgba(255, 250, 240, 0.5); display: flex; flex-direction: column; gap: 4px; }
.cal-day-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cal-day-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: start; }
.cal-day-item { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; border: 1px solid var(--border); border-left: 6px solid #5c6b73; border-radius: 4px; padding: 6px 8px; background: rgba(255, 250, 240, 0.7); min-height: 0; overflow-wrap: anywhere; }
.cal-year { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-content: start; }
.cal-year-month { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.cal-year-month.now { box-shadow: inset 0 0 0 2px var(--wax); }
.cal-year-name { align-self: flex-start; min-height: 0; padding: 0; border: 0; background: transparent; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-year-days { display: grid; gap: 2px; }
.cal-year-day { min-height: 0; padding: 1px 0; border: 0; border-radius: 2px; background: transparent; font-size: 11px; }
.cal-year-day.past { color: #8a7050; }
.cal-year-day.busy { font-weight: 700; border-bottom: 2px solid #2f6f8f; }
.cal-year-day.full { background: rgba(255, 250, 230, 0.9); }
.cal-year-day.today { background: var(--wax); color: #f6e6c8; font-weight: 700; }
.cal-year-season { height: 5px; border-radius: 2px; }
.weather-set { align-items: center; }
.moon-icon, .weather-icon { flex: none; }

/* calendar windows */
.date-pick select, .date-pick input { min-width: 0; }
input.tiny { width: 64px; }
.ev-when { gap: 18px; align-items: flex-start; }
.swatches { flex-wrap: wrap; }
.swatch { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.35); cursor: pointer; }
.swatch.on, .swatch:has(:focus-visible) { outline: 3px solid #2a1f12; outline-offset: 2px; }
.dz-dialog label > input[type='checkbox'], .cal-show input[type='checkbox'] { width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 0; flex: none; accent-color: #8e2a1d; }
.cal-settings input:not([type='checkbox']):not([type='color']), .cal-settings select, .moons-edit input:not([type='checkbox']):not([type='color']), .moons-edit select, .date-pick select, .date-pick input { min-height: 32px; height: 32px; padding: 2px 6px; font-size: 14px; }
.date-pick input.short { width: 80px; }
.cal-settings-grid { height: calc(100vh - 230px); }
.cal-settings-grid > .cal-col { height: 100%; overflow-y: auto; padding-right: 6px; }
@media (max-width: 1150px) { .cal-settings-grid { height: auto; } .cal-settings-grid > .cal-col { height: auto; overflow: visible; } }
.cal-side-val.mono { flex: 0 0 auto; }
.clock-text .clock-line { display: block; }
.link-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border: 1px solid var(--stitch, #a8884f); border-radius: 999px; background: #fffaf0; font-size: 13px; max-width: 100%; overflow-wrap: anywhere; }
.link-chip button { min-height: 0; padding: 0 6px; border: 0; background: transparent; }
.known-box { border: 1px solid var(--stitch, #a8884f); border-radius: 4px; padding: 8px 10px; background: rgba(255, 250, 240, 0.6); }
.dz-actions .spacer { flex: 1; }
.clock-now { margin: 0; font-size: 17px; font-weight: 600; }
.moons-edit { display: flex; flex-direction: column; gap: 10px; }
.moon-row { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--stitch, #a8884f); border-radius: 4px; padding: 8px 10px; margin: 0; min-width: 0; }
.moon-row input[type='color'] { width: 40px; padding: 0 2px; }
.moon-row .row { align-items: center; }
.dz-dialog.wide:has(.cal-settings) { width: min(1320px, calc(100vw - 32px)); }
.cal-settings-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1150px) { .cal-settings-grid { grid-template-columns: minmax(0, 1fr); } }
.cal-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cal-h { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid rgba(110, 82, 53, 0.3); padding-bottom: 2px; }
.preset-list { display: flex; flex-direction: column; gap: 4px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 0; padding: 5px 9px; min-height: 0; }
.preset span { font-size: 11px; opacity: 0.85; font-weight: 400; }
.cal-months, .cal-seasons, .cal-weather { border-collapse: collapse; width: 100%; font-size: 13px; }
.cal-months th, .cal-seasons th, .cal-weather th { text-align: left; font-size: 12px; color: var(--muted); padding: 2px 4px; }
.cal-months td, .cal-seasons td, .cal-weather td { padding: 2px 4px; border-top: 1px solid rgba(110, 82, 53, 0.2); vertical-align: middle; }
.cal-months button, .cal-seasons button { min-height: 28px; padding: 0 8px; }
.cal-months input.month-name { width: 100%; min-width: 90px; }
.festival-row { background: rgba(63, 122, 58, 0.1); }
.festival-row input.month-name { font-size: 13px; }
.cal-weather input.tiny { width: 50px; padding: 2px 4px; }
.cal-seasons input[type='color'] { width: 32px; padding: 0 2px; }
input.weekday { width: 96px; }
.cal-week-leap { gap: 18px; align-items: flex-start; }
.cal-week-leap > .field { flex: 1 1 260px; }

/* card sheet › Dates, and date words in text boxes */
.dates-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dates-list li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(110, 82, 53, 0.25); }
.dates-list li:first-child { border-top: 0; }
.dates-when { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.dates-what { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; flex-wrap: wrap; }
.dates-list button { min-height: 28px; padding: 0 8px; }
.lf-back mark.date-word { background: transparent; border-bottom: 2px dotted #2f6f8f; border-radius: 0; }
.lf-back mark.date-word.added { border-bottom-style: solid; }
.ev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ev-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 760px) { .ev-grid { grid-template-columns: minmax(0, 1fr); } }
.ev-col .date-pick select { max-width: 120px; }
.date-pick input.short { flex: none; width: 82px; }
.dz-dialog label > input[type='checkbox'], .cal-show input[type='checkbox'] {
  appearance: none; background: #fffaf0; border: 1.5px solid #6e5235; border-radius: 3px; display: inline-grid; place-content: center; cursor: pointer;
}
.dz-dialog label > input[type='checkbox']:checked, .cal-show input[type='checkbox']:checked { background: #8e2a1d; border-color: #4a0f09; }
.dz-dialog label > input[type='checkbox']:checked::after, .cal-show input[type='checkbox']:checked::after { content: ''; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.dz-dialog label > input[type='checkbox']:disabled { opacity: 0.45; cursor: default; }
.moon-row .row { flex-wrap: wrap; }
.moon-row .row > input:not([type='color']) { flex: 1 1 140px; min-width: 0; }
.moon-row input[type='color'], .cal-seasons input[type='color'] { width: 34px; height: 32px; min-height: 32px; padding: 1px; flex: none; }
.cal-weather input.tiny { width: 40px; padding: 1px 3px; }
.cal-weather td, .cal-weather th { padding: 2px 2px; }

/* Tokens for Roll20 (Library › Tokens, card sheets, Roll20 export, token window) */
.token-image { padding: 0; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.token-image img, .card-picture .token-image img { width: 100%; height: 100%; border: 0; border-radius: 50%; display: block; }
.token-image:focus-visible { outline: 2px solid var(--wax); outline-offset: 2px; border-radius: 50%; }
.token-drawing { font-size: 12px; opacity: 0.7; }
.token-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 10px; }
.token-tile { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.token-tile figcaption { display: flex; flex-direction: column; font-size: 13px; }
.sheet-token { display: flex; align-items: center; gap: 10px; }
.roll20-char-head { display: flex; align-items: center; gap: 10px; }
.token-editor { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; }
.token-editor .dz-actions { grid-column: 1 / -1; }
.token-preview canvas { display: block; cursor: grab; touch-action: none; background: repeating-conic-gradient(#d9d2c4 0% 25%, #f3eee4 0% 50%) 0 0 / 20px 20px; border-radius: 6px; }
.token-controls { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.token-borders { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.token-border { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; font-size: 11px; line-height: 1.2; border: 2px solid transparent; border-radius: 6px; background: transparent; }
.token-border.is-on { border-color: var(--wax); background: rgba(143, 42, 33, 0.08); }
.token-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(42, 31, 18, 0.5); vertical-align: middle; margin-left: 4px; }
.token-type-table th { text-align: left; padding-right: 10px; font-weight: 600; }
.token-type-table td { padding: 3px 6px 3px 0; }
@media (max-width: 760px) { .token-editor { grid-template-columns: 1fr; } }
.side-menu { position: relative; }
.map-layout > .side-menu { display: flex; flex-direction: column; min-height: 0; }
.cal-side-close { display: none; }
/* Half a screen: side columns fold into a tab at the right edge; open, they slide out over the main view (owner, 2026-10-24).
   Side panels with their own Show/Hide (Calendar, Board) lie over the main view instead of squeezing it. */
@media (max-width: 1050px) {
  .sheet-body { flex-wrap: nowrap; }
  .sheet-main.pic-beside { grid-template-columns: minmax(0, 1fr) auto; }
  .pic-beside > .side-menu { order: 2; }
  div.side-menu { flex: none !important; position: sticky; top: 0; align-self: start; z-index: 30; }
  .side-menu > .side-grip { display: none; }
  .side-menu-tab { display: block; writing-mode: vertical-rl; min-height: 0; padding: 14px 8px; white-space: nowrap; }
  .side-menu-body { display: flex; flex-direction: column; gap: 12px; position: absolute; top: 0; right: calc(100% + 8px);
    width: min(340px, 70vw); max-height: calc(100vh - 240px); overflow-y: auto; }
  .side-menu-body > * { flex: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
  .side-menu:not(.open) > .side-menu-body { width: 0; height: 0; overflow: hidden; }
  .map-layout { grid-template-columns: minmax(0, 1fr) auto; }
  .map-layout > .side-menu { display: block; }
  .side-menu-body > .map-side { max-height: none; overflow: visible; }
  .calendar-screen { position: relative; }
  .cal-side { position: absolute; left: 14px; top: 14px; bottom: 14px; z-index: 30; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
  .cal-side-close { display: block; align-self: flex-start; }
  .workspace { position: relative; }
  .workspace > .side { position: absolute; right: 0; top: 0; bottom: 0; z-index: 20; width: min(360px, 80%); box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45); }
  .workspace > .splitter { display: none; }
  .cal-cell-head { flex-wrap: wrap; }
  .cal-num { flex: none; }
  .cal-cell .cal-chip { white-space: normal; overflow-wrap: anywhere; }
  .cal-week-weather { flex-wrap: wrap; }
  .cal-weekdays > div { white-space: normal; overflow-wrap: anywhere; }
}
/* Desk style for the board, sheet, library and start screens. These screens
   reuse the shared component styles in styles.css and swap its colour tokens:
   wooden bars carry light text, parchment surfaces carry ink. */

html, body { background: #2e1c0e; }
.frame-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; }

.desk-theme {
  --text: var(--parchment-light); --muted: #d6c296; --ground: rgba(24, 14, 6, 0.55); --panel: rgba(24, 14, 6, 0.4); --bar: transparent;
  --border: #6b4a26; --border-strong: var(--stitch); --selection: var(--gold); --link: var(--gold); --amber: var(--gold);
  color: var(--text);
}

/* ---- wooden bars ---- */
.desk-theme .topbar, .desk-theme .viewbar, .desk-theme .page-head, .desk-theme .tabs, .desk-theme .tools {
  background-color: #4a2e16;
  background-image: var(--tex-wood), linear-gradient(180deg, #5f3d1f, #3d2611);
  background-size: 700px 700px, auto;
  border-color: #150c06;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.15), 0 2px 6px rgba(0, 0, 0, 0.45);
}
.desk-theme .topbar { gap: 14px; }
.topbar-title {
  font-family: var(--display); font-size: 26px; font-weight: 400; padding: 0 6px; color: var(--parchment-light);
  background: transparent; border-color: transparent; text-shadow: 0 2px 0 #000;
}
.desk-theme .topbar-title:hover:not(:disabled) { background: rgba(255, 240, 200, 0.08); border-color: var(--border); }
.desk-theme .clock { background: var(--parchment); color: var(--ink); border: 1px solid #3b2608; min-height: 44px; }
.desk-theme .clock:hover:not(:disabled) { background: var(--parchment-light); border-color: #3b2608; }
button.brass.icon { min-width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ---- buttons and inputs everywhere in the theme ---- */
/* Hover keeps the button's own face, slightly shadowed (owner, 2026-10-16: no see-through wood). */
.desk-theme button:hover:not(:disabled) { filter: brightness(0.92); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35); border-color: var(--border-strong); }
.desk-theme button:disabled { color: #8a7a5c; }
.desk-theme button[aria-pressed='true'], .desk-theme .viewbar button[aria-pressed='true'] {
  color: #2a1806; font-weight: 600; border-color: #3b2608;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #8a621f);
  box-shadow: inset 0 1px 0 rgba(255, 245, 210, 0.7);
}
.desk-theme button[aria-pressed='true']:hover:not(:disabled) { background: linear-gradient(180deg, #fbe0a4, #c89539 55%, #93692a); border-color: #3b2608; }
.desk-theme button.primary { color: #fbe9d0; border-color: #4a120d; background: radial-gradient(circle at 40% 35%, #b5392d, var(--wax) 60%, #5e1812); }
.desk-theme button.primary:hover:not(:disabled) { background: radial-gradient(circle at 40% 35%, #c9473a, #9c3026 60%, #5e1812); border-color: #4a120d; }
.desk-theme button.primary:disabled { color: var(--parchment); background: #8a7a5c; border-color: #6b5636; }
.desk-theme button.danger { color: #f3b9b0; border-color: #a5352a; }
.desk-theme button.link { color: var(--link); }
.desk-theme input, .desk-theme select, .desk-theme textarea { color: var(--text); background: var(--ground); border-color: var(--border); }
.desk-theme input::placeholder, .desk-theme textarea::placeholder { color: var(--muted); opacity: 0.8; }
.desk-theme :focus-visible { outline-color: var(--selection); }
.desk-theme .eyebrow, .desk-theme .panel-heading { color: var(--muted); }
.desk-theme .panel-heading { font-family: var(--display); font-size: 19px; font-weight: 400; letter-spacing: 0.02em; text-transform: none; color: var(--text); }

/* ---- parchment surfaces ---- */
.desk-theme .side, .desk-theme .panel, .desk-theme .library-templates, .start-panel, .desk-theme .menu {
  --text: #2a1f12; --muted: #5a4a32; --ground: rgba(255, 250, 236, 0.6); --panel: transparent;
  --border: #a8916a; --border-strong: #7a6440; --selection: var(--wax); --link: var(--wax); --amber: var(--wax);
  color: var(--text);
  background-color: var(--parchment);
  background-image: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(120, 80, 30, 0.28) 100%), var(--tex-blotch), var(--tex-paper);
  background-size: auto, 600px 600px, 300px 300px;
  border: 1px solid #6b5636;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 228, 0.5), 0 4px 12px rgba(0, 0, 0, 0.5);
}
.desk-theme .side button:hover:not(:disabled), .desk-theme .panel button:hover:not(:disabled),
.desk-theme .library-templates button:hover:not(:disabled), .start-panel button:hover:not(:disabled), .desk-theme .menu button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.7); border-color: var(--ink);
}
.desk-theme .side button:disabled, .desk-theme .panel button:disabled { color: #9a8a6c; }
/* A filled (primary) button keeps its light words when unavailable (Library › Tokens › Save all for Roll20). */
.desk-theme .panel button.primary:disabled { color: var(--parchment); background: #6b5636; }
.desk-theme .side button.danger, .desk-theme .panel button.danger, .desk-theme .dz-dialog button.danger { color: var(--wax); border-color: var(--wax); background: transparent; }
.desk-theme .side { border-width: 0 0 0 3px; border-color: #150c06; }
.desk-theme .side .segmented { border-color: var(--border-strong); }
.desk-theme .side .segmented button + button { border-left-color: var(--border-strong); }
.desk-theme .panel-heading { color: var(--text); }
.desk-theme .side .panel-heading, .desk-theme .panel .panel-heading, .desk-theme .library-templates .panel-heading { color: var(--ink); }
.desk-theme .hint { color: var(--muted); }

/* ---- the board: cork in a wooden frame ---- */
.desk-theme .canvas {
  background-color: #b98a55;
  background-image: radial-gradient(ellipse at 50% 45%, rgba(255, 220, 160, 0.25), transparent 70%), var(--tex-cork-light), var(--tex-cork);
  background-size: auto, 300px 300px, 240px 240px;
}
/* The wooden frame sits above the board, so background pictures never spill over it. */
.desk-theme .canvas::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  box-shadow: inset 0 0 0 10px #4a2e16, inset 0 0 0 12px #150c06, inset 0 0 40px 12px rgba(0, 0, 0, 0.55);
}
.desk-theme .canvas .react-flow { clip-path: inset(10px); }
.desk-theme .react-flow { background: transparent; }
.desk-theme .card { box-shadow: 0 8px 14px rgba(40, 20, 5, 0.55), 0 1px 0 rgba(255, 255, 255, 0.4) inset; }
.desk-theme .card-name { font-family: var(--display); font-size: 19px; font-weight: 400; }
.desk-theme .string-label { background: var(--parchment-light); color: var(--ink); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); }
.desk-theme .legend, .desk-theme .empty-board {
  --text: #2a1f12; --muted: #5a4a32; color: var(--ink); background: var(--parchment-light); border-color: #6b5636;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.desk-theme .empty-board strong { color: var(--ink); }
.desk-theme .react-flow__controls { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); }
.desk-theme .react-flow__controls-button { background: var(--parchment-light); border-color: #a8916a; color: var(--ink); }
.desk-theme .react-flow__controls-button:hover { background: #fffaf0; }
.desk-theme .react-flow__controls-button svg { fill: var(--ink); }
.desk-theme .tool { color: var(--text); }
.desk-theme .menu { border-color: #3b2a14; }

/* ---- sheet and library on the table ---- */
.desk-theme .sheet-body, .desk-theme .library { background: transparent; }
.desk-theme .page-title h1 { font-family: var(--display); font-weight: 400; font-size: 30px; text-shadow: 0 2px 0 #000; }
.desk-theme .tabs button { color: var(--muted); }
.desk-theme .tabs button[aria-selected='true'] { color: var(--parchment-light); border-bottom-color: var(--gold); background: transparent; box-shadow: none; }
.desk-theme .source-tag { border-color: var(--border-strong); color: var(--muted); }
.desk-theme .score { background: rgba(255, 250, 236, 0.75); border-color: #a8916a; }
.desk-theme .score input { color: var(--ink); background: transparent; }
.desk-theme .subcard, .desk-theme .results li, .desk-theme .connections li, .desk-theme .removed li, .desk-theme .log li {
  background: rgba(255, 250, 236, 0.55); border-color: #a8916a;
}
.desk-theme .library-search .panel-heading { color: var(--parchment-light); }
.desk-theme input.big { background: var(--parchment-light); color: var(--ink); border-color: #3b2608; }
.desk-theme .filters label, .desk-theme .range-label { color: var(--parchment-light); }
.desk-theme .filters input, .desk-theme .filters select { background: var(--parchment-light); color: var(--ink); border-color: #3b2608; }
.desk-theme .srd-table thead th { color: var(--muted); }
.desk-theme .attribution { color: var(--muted); }
.desk-theme .tag-secret { color: var(--wax); border-color: var(--wax); }
.desk-theme .tag-known { color: #1f4f73; border-color: #1f4f73; }
.desk-theme .chip { border-color: #7a6440; }

/* ---- start screen ---- */
.start-screen .start { position: relative; z-index: 1; }
.start-screen .start-title { font-family: var(--display); font-weight: 400; font-size: 54px; color: var(--parchment-light); text-shadow: 0 3px 0 #000, 0 0 24px rgba(246, 201, 69, 0.25); }
.start-screen .muted { color: #d6c296; }
.start-panel h2 { font-family: var(--display); font-weight: 400; font-size: 24px; }
.start-panel { --ground: rgba(255, 250, 236, 0.6); }
.start-panel input { color: var(--ink); background: rgba(255, 250, 236, 0.8); border-color: #8a7350; }
.start-panel .muted, .start-panel .hint { color: var(--ink-muted); }
.start-panel button { color: var(--ink); border-color: #7a6440; }
.start-panel .recent-path { color: var(--ink-muted); }
.start-panel button.primary { color: #fbe9d0; background: radial-gradient(circle at 40% 35%, #b5392d, var(--wax) 60%, #5e1812); border-color: #4a120d; }
.start-panel button.primary:disabled { color: var(--parchment); background: #7a6a4c; border-color: #7a6a4c; }

/* ---- messages ---- */
.toast { color: var(--ink); background: var(--parchment-light); border: 2px solid #3b2a14; font-weight: 500; }
.toast-error { color: #fff1ec; background: var(--wax); border-color: #4a120d; }
.start-screen { overflow-y: auto; justify-content: center; }
.start-screen .start { flex: 0 1 640px; }
.candle.start-candle { position: absolute; left: 8%; top: 40px; }
.candle.topbar-candle { flex: none; width: 40px; height: 56px; margin: -6px -4px -6px 0; }
.candle.topbar-candle svg { width: 34px; height: 64px; margin-top: -2px; }
.candle.topbar-candle .candle-glow { width: 110px; height: 110px; top: 12px; }
.candle.topbar-candle .candle-light { top: 12px; }
.candle.tools-candle { width: 64px; height: 120px; }
.candle.tools-candle svg { width: 64px; height: 120px; }
.candle.tools-candle .candle-light { top: 24px; }
.desk-theme .tools { align-items: center; }
.desk-theme .filters input::placeholder { color: var(--ink-muted); }

/* ---- timeline ---- */
.zoom-label { font-size: 12px; color: var(--muted); min-width: 84px; text-align: center; }
.timeline-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w, 380px); gap: 18px; padding: 18px; }
.timeline-sheet { min-height: 0; padding: 0; gap: 0; overflow: hidden; }
.timeline-side { min-height: 0; overflow-y: auto; }
.timeline-empty { padding: 24px; }
.tl-scroll { flex: 1; min-height: 0; overflow: auto; }
.tl-grid { position: relative; padding-bottom: 12px; }
.tl-days { display: flex; height: 44px; position: sticky; top: 0; z-index: 3; background: rgba(241, 230, 198, 0.94); border-bottom: 1px solid #8a7350; }
.tl-day { flex: none; display: flex; flex-direction: column; justify-content: center; padding: 0 8px; border-left: 1px solid rgba(90, 74, 50, 0.4); min-width: 0; overflow: hidden; }
.tl-day-name { font-family: var(--display); font-size: 16px; white-space: nowrap; }
.tl-day-note { font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
.tl-day-note.full { color: #7a5a12; font-weight: 600; }
.tl-lane { position: relative; display: flex; border-bottom: 1px dashed rgba(90, 74, 50, 0.45); }
.tl-lane-head {
  flex: none; position: sticky; left: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px;
  background: rgba(232, 217, 176, 0.97); border-right: 2px solid #6b5636; box-shadow: 4px 0 8px rgba(60, 35, 10, 0.15);
}
.tl-lane-row { display: flex; align-items: center; gap: 8px; }
.desk-theme .tl-lane-title { min-height: 0; height: auto; max-width: 100%; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
.tl-lane-title { min-height: 32px; padding: 0; border: 0; background: transparent; font-family: var(--display); font-size: 18px; text-align: left; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.desk-theme .tl-lane-title:hover:not(:disabled) { background: transparent; color: var(--wax); }
.tl-lane-kind { font-size: 12px; color: var(--ink-muted); }
.tl-status { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 3px; color: #fff; }
.st-player_active { background: #2f5d8a; }
.st-autonomous { background: #8a6a12; }
.st-inactive { background: #5a5f66; }
.st-concluded { background: #3d434b; }
.tl-track {
  position: relative; flex: none; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(var(--day, 140px) - 1px), rgba(90, 74, 50, 0.25) calc(var(--day, 140px) - 1px), rgba(90, 74, 50, 0.25) var(--day, 140px));
}
.tl-act {
  position: absolute; top: 12px; height: calc(100% - 24px); padding: 6px 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left; overflow: hidden; border-radius: 4px; color: var(--ink); background: rgba(255, 250, 236, 0.92); border: 2px solid #6b5636;
  box-shadow: 0 3px 6px rgba(60, 35, 10, 0.3); z-index: 1;
}
.desk-theme .tl-act:hover:not(:disabled) { background: #fffaf0; border-color: var(--ink); }
.tl-act-title { font-weight: 600; max-width: 100%; overflow-wrap: anywhere; line-height: 1.2; }
.tl-act-when { font-family: var(--mono); font-size: 11px; max-width: 100%; overflow-wrap: anywhere; }
.tl-act-state { font-size: 12px; color: var(--ink-muted); max-width: 100%; overflow-wrap: anywhere; }
.tl-act.k-running { background: #2f5d8a; color: #fff; border-color: #173450; }
.tl-act.k-running .tl-act-state { color: #d8e6f2; }
.desk-theme .tl-act.k-running:hover:not(:disabled) { background: #3a6c9c; border-color: #173450; }
.tl-act.k-default { border-style: dashed; border-color: #a5770f; background: rgba(255, 244, 214, 0.9); }
.tl-act.k-awaiting { border-color: var(--wax); border-width: 3px; }
.tl-act.k-awaiting .tl-act-state { color: var(--wax); font-weight: 600; }
.tl-act.k-resolved { background: rgba(160, 150, 130, 0.75); border-color: #6b6253; }
.tl-act.is-selected { outline: 3px solid var(--wax); outline-offset: 2px; }
.tl-ghost { position: absolute; top: 12px; height: calc(100% - 24px); border: 2px dotted #8a7350; border-radius: 4px; background: rgba(255, 250, 236, 0.25); }
.tl-add { min-height: 32px; padding: 0 10px; font-size: 12px; margin-top: auto; }
.tl-now { position: absolute; width: 3px; margin-left: -1px; background: #e0a800; z-index: 4; pointer-events: none; box-shadow: 0 0 6px rgba(224, 168, 0, 0.6); }
.tl-now span { position: absolute; top: 46px; left: 6px; white-space: nowrap; font-size: 11px; font-weight: 700; color: #2a1806; background: var(--gold); padding: 1px 6px; border-radius: 3px; }
.tl-trigger { position: absolute; width: 0; border-left: 3px dotted #2f6fa3; z-index: 2; pointer-events: none; }
.tl-trigger.fired { border-left-style: dashed; border-left-color: #1f4f73; }
.tl-badge {
  position: absolute; left: -15px; min-width: 28px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 12px;
  font-size: 11px; font-weight: 700; color: #fff; background: #2f6fa3; border: 2px solid var(--parchment-light);
}
.tl-badge.static { position: static; display: inline-grid; flex: none; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 14px; border-top: 1px solid #a8916a; font-size: 12px; color: var(--ink); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 22px; height: 14px; border-radius: 3px; border: 2px solid #6b5636; background: rgba(255, 250, 236, 0.9); }
.sw-running { background: #2f5d8a; border-color: #173450; }
.sw-default { border-style: dashed; border-color: #a5770f; }
.sw-awaiting { border-color: var(--wax); border-width: 3px; }
.sw-resolved { background: rgba(160, 150, 130, 0.75); }
.sw-trigger { width: 0; height: 16px; border: 0; border-left: 3px dotted #2f6fa3; border-radius: 0; background: none; }
.sw-now { width: 3px; height: 16px; border: 0; background: #e0a800; border-radius: 0; }

.act-panel { display: flex; flex-direction: column; gap: 12px; }
.sub-heading { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 18px; }
.daytime .row label { font-size: 13px; }
.outcomes, .trigger-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.outcomes li { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid #a8916a; border-radius: 4px; background: rgba(255, 250, 236, 0.55); }
.outcomes li.is-default { border-style: dashed; border-color: #a5770f; }
.outcomes li.is-happened { border: 2px solid var(--wax); }
.seal {
  display: inline-grid; place-items: center; min-height: 36px; padding: 0 12px; border-radius: 18px; color: #fbe9d0; font-family: var(--display);
  background: radial-gradient(circle at 40% 35%, #b5392d, var(--wax) 60%, #5e1812);
}
.trigger-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border: 1px dotted #2f6fa3; border-radius: 4px; background: rgba(255, 250, 236, 0.55); }
.trigger-text { flex: 1 1 200px; min-width: 0; font-size: 13px; }
.whatif { border: 2px dashed #2f6fa3; border-radius: 4px; padding: 10px 12px; background: rgba(230, 240, 250, 0.6); display: flex; flex-direction: column; gap: 6px; }
.whatif ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.trigger-form { gap: 10px; }
@media (max-width: 1100px) { .timeline-layout { grid-template-columns: minmax(0, 1fr); } }

/* Dialogs and parchment cards on the table use ink tokens, so their fields are light parchment. */
.dz-dialog, .desk-theme .parchment-note, .desk-theme .parchment-sheet, .desk-theme .otf-card, .desk-theme .otf-result, .desk-theme .dm-panel:not(.advisor) {
  --text: #2a1f12; --muted: #5a4a32; --ground: rgba(255, 252, 240, 0.85); --border: #8a7350; --border-strong: #7a6440;
  --selection: var(--wax); --link: var(--wax); color: var(--text);
}
.dz-dialog :is(input, select, textarea), .desk-theme .parchment-note :is(input, select, textarea),
.desk-theme .otf-card :is(input, select), .desk-theme .dm-panel:not(.advisor) select {
  color: var(--ink); background: rgba(255, 252, 240, 0.85); border-color: #8a7350;
}
.dz-dialog :is(input, textarea)::placeholder, .desk-theme .parchment-note :is(input, textarea)::placeholder { color: #8a7a5c; }
.dz-dialog button:hover:not(:disabled), .desk-theme .parchment-note button:hover:not(:disabled) { background: #fffaf0; border-color: var(--ink); }
.dz-dialog .hint { color: var(--ink-muted); }

/* ---- session review ---- */
.review-layout { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w, 380px); gap: 18px; padding: 18px; align-items: start; }
.review-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.review-side { position: sticky; top: 0; }
.panel.conflict { border: 3px solid #c79a2e; box-shadow: 0 0 0 1px #6b4a12, 0 6px 14px rgba(0, 0, 0, 0.5); }
.panel.conflict.is-decided { border-color: #8a7350; opacity: 0.9; }
.conflict-tag { color: #7a5a12; }
.conflict-text { margin: 0; font-family: var(--display); font-size: 21px; line-height: 1.3; }
.conflict blockquote { margin: 0; padding-left: 12px; border-left: 3px solid #8a7350; color: var(--ink-muted); font-style: italic; }
.proposals { width: 100%; border-collapse: collapse; }
.proposals th, .proposals td { padding: 8px 10px; border-bottom: 1px solid #a8916a; text-align: left; vertical-align: top; }
.proposals thead th { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.proposals tbody th { font-weight: 400; }
.prop-what { display: block; font-weight: 600; }
.prop-sub { display: block; font-size: 12px; color: var(--ink-muted); }
.prop-before { color: var(--ink-muted); }
.prop-after { color: #1f4f73; font-weight: 600; }
.proposals tr.is-approved .prop-after { color: #24553a; }
.proposals tr.is-rejected .prop-after { text-decoration: line-through; color: var(--ink-muted); }
.proposals tr.is-flagged { background: rgba(199, 154, 46, 0.15); }
.proposals tr.ripple th, .proposals tr.ripple td { border-bottom-style: dashed; padding-top: 2px; }
.ripple-text { font-size: 13px; color: #1f4f73; padding-left: 18px; }
.proposals tr.edit-row td { background: rgba(255, 250, 236, 0.6); }
.proposals select { width: auto; }
.decision-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; color: #fff; background: #5a5f66; }
.decision-tag.d-approved { background: #24553a; }
.decision-tag.d-rejected { background: #6b2a24; }
.decision-tag.d-flagged { background: #8a6a12; }
.fights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fights li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fights .segmented button { min-width: 0; padding: 0 12px; }
.recap textarea { font-family: var(--display); font-size: 16px; line-height: 1.5; }
.past-sessions ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.past-sessions li { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
@media (max-width: 1100px) { .review-layout { grid-template-columns: minmax(0, 1fr); } .review-side { position: static; } }
.proposals td:last-child { min-width: 330px; }
.proposals td:last-child button { min-height: 40px; padding: 0 12px; }

/* Dark ink and red ink buttons keep their look on parchment panels and in dialogs. */
.desk-theme button.ink-button.primary-ink:not(:disabled), .desk-theme button.ink-button.primary-ink:hover:not(:disabled) { color: var(--parchment-light, #f6ecd0); }
.desk-theme button.ink-button.primary-ink:hover:not(:disabled) { background: #3d2c18; border-color: #000; color: #fff; }
.desk-theme button.ink-button.danger-ink:hover:not(:disabled) { background: #7a1e16; border-color: #7a1e16; color: #fff3e0; }
/* Drop-downs on the wooden bars are parchment with ink. */
.desk-theme select.ink-select { color: var(--ink); background: rgba(255, 248, 228, 0.85); border-color: #7a6440; }
.desk-theme select.ink-select.on-wood { background: var(--parchment); }
.timeline-side-wrap { position: relative; min-height: 0; display: flex; flex-direction: column; }
.timeline-side-wrap > .timeline-side { flex: 1; }
/* Timeline: storyline ticks, column grips, thin lanes, act encounters */
.tl-days-corner { flex: none; position: sticky; left: 0; z-index: 4; background: rgba(232, 217, 176, 0.97); border-right: 2px solid #6b5636; }
.tl-day, .tl-days-corner { position: relative; }
.tl-days-corner { position: sticky; }
.tl-grip { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 5; }
.tl-grip.is-row { top: auto; right: 0; bottom: -4px; left: 0; width: auto; height: 8px; cursor: row-resize; }
.tl-grip:hover { background: rgba(138, 106, 18, 0.35); }
.tl-lane.is-thin .tl-lane-head { padding: 2px 8px; justify-content: center; }
.tl-fold { min-height: 0; padding: 0 2px; border: 0; background: transparent; color: var(--ink); font-family: var(--display); font-size: 15px; text-align: left; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.desk-theme .tl-fold { min-height: 0; height: auto; }
.tl-encounters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tl-enc { display: inline-flex; align-items: center; gap: 2px; padding: 0 2px 0 6px; border: 1px solid #8a7350; border-radius: 10px; font-size: 13px; }
.desk-theme .tl-enc-x, .desk-theme .tl-enc-add { min-height: 0; height: 22px; width: 22px; padding: 0; line-height: 1; }
.tl-enc-x { border: 0; background: transparent; }
.tl-times { align-items: flex-start; gap: 16px; }

/* ---- one header on every screen (3.1) ---- */
/* A crowded top bar goes onto a second row: the title, date and clock are never cut (a long map name on a small window). */
.screen-head { flex-wrap: wrap; row-gap: 6px; min-height: 64px; padding: 8px 16px; }
.screen-title { display: flex; flex-direction: column; min-width: 0; flex: 0 1 auto; max-width: 100%; }
.screen-eyebrow { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; font-family: var(--display); font-style: italic; font-size: 13px; color: #d6c296; }
.screen-title h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--parchment-light); text-shadow: 0 2px 0 #000; overflow-wrap: anywhere; }
.screen-title h1 input { font-size: inherit; }
.screen-find {
  flex: 0 1 300px; min-width: 150px; min-height: 40px; container-type: inline-size; display: flex; align-items: center; gap: 8px; padding: 0 10px; text-align: left;
  color: #5a4a32; background: var(--parchment); border: 1px solid #3b2608; border-radius: 6px; cursor: text;
}
.screen-find span { flex: 1; white-space: nowrap; overflow: hidden; }
/* A squeezed top bar: the short words, never cut-off long ones. */
.screen-find .find-short { display: none; }
@container (max-width: 289px) { .screen-find .find-long { display: none; } .screen-find .find-short { display: inline; } }
.screen-find kbd { font-family: var(--mono); font-size: 11px; border: 1px solid #a8916a; border-radius: 3px; padding: 1px 5px; }
.screen-head .topbar-middle { flex: 0 1 260px; }
.screen-gap { flex: 1 1 0; }
.screen-actions { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.screen-actions > * { flex: none; white-space: nowrap; }
.screen-head .live-seal { width: 24px; height: 24px; font-size: 9px; }

/* Rail foot: Setup, AI, Close as one row of icons (3.1). */
.rail-item { min-height: 50px; }
.rail-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; border-top: 1px solid rgba(214, 194, 150, 0.22); padding-top: 6px; }
.rail-foot .rail-item { min-height: 44px; padding: 0; }
.rail-foot .rail-item svg { width: 18px; height: 18px; }
.rail-foot .rail-item span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.screen-head .clock, .screen-head .screen-tools { flex: none; white-space: nowrap; }

/* Board tools in groups, each with a small picture (3.1). */
.tools-group { display: block; width: 100%; margin-top: 4px; text-align: center; font-size: 10px; letter-spacing: 0.08em; opacity: 0.85; }
.tool { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tool-layer { border: 0; }
/* Ctrl+K: a small heading over each group of results (3.1). */
.find-list li[data-group]::before { content: attr(data-group); display: block; width: 100%; padding: 8px 4px 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.find-list li[data-group] { flex-wrap: wrap; }
/* Adventure UI skin (3.1, owner 2026-10-19): dark brown frame, aged parchment panels, Cinzel capital headings,
   deep red buttons. Only on <html data-skin="adventure">; the Desk skin is untouched. Notes keeps its own page (notes.css). */

:root[data-skin='adventure'] {
  --adv-ground: #24160d; --adv-rail: #1a100a; --adv-bar: #1f130b; --adv-line: #3a2617; --adv-edge: #5a4028;
  --adv-cream: #f0e3c6; --adv-cream-muted: #bfa680;
  --adv-parch: #e2cda0; --adv-ink: #3a2414; --adv-head: #2e1b0e; --adv-muted: #6e5235;
  --adv-paper-btn: #f1e3c0; --adv-paper-line: #b89a68;
  --adv-red: linear-gradient(#8e2a1d, #6b1810); --adv-red-edge: #4a0f09;
  --adv-parchment: radial-gradient(ellipse at 30% 20%, rgba(255, 246, 220, 0.6), transparent 60%),
    radial-gradient(ellipse at 85% 90%, rgba(140, 95, 45, 0.28), transparent 55%),
    radial-gradient(circle at 60% 45%, rgba(170, 125, 70, 0.14), transparent 40%), var(--tex-paper);
  --adv-burn: inset 0 0 30px rgba(105, 62, 22, 0.55), inset 0 0 3px rgba(80, 45, 15, 0.7), 0 6px 18px rgba(0, 0, 0, 0.6);
  --adv-cinzel: 'Cinzel', 'Palatino Linotype', Georgia, serif;
  --adv-sans: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
}
:root[data-skin='adventure'] body, :root[data-skin='adventure'] html { background: var(--adv-ground); }

/* ---- the frame: ground, rail, bars ---- */
[data-skin='adventure'] .desk-screen { background: radial-gradient(ellipse at 50% 40%, #2e1c10 0%, #1c110a 100%); font-family: var(--adv-sans); }
[data-skin='adventure'] .desk-theme { --text: var(--adv-cream); --muted: var(--adv-cream-muted); --ground: #2c1b10; --border: var(--adv-edge); --selection: #d9604a; --link: #e8b48a; --amber: #e0a050; }
[data-skin='adventure'] .rail { background: var(--adv-rail); border-right: 1px solid var(--adv-line); box-shadow: none; }
[data-skin='adventure'] .rail-mark { font-family: var(--adv-cinzel); font-size: 15px; width: 40px; height: 40px; color: var(--adv-cream); border-color: #9a3a26; background: #2a1810; }
[data-skin='adventure'] .rail-item { color: #d8c7a3; font-family: var(--adv-sans); font-size: 12px; border-radius: 4px; }
[data-skin='adventure'] .rail-item:hover:not(:disabled) { background: #2c1b10; border-color: var(--adv-line); }
[data-skin='adventure'] .rail-item[aria-current='page'] { color: #f6e6c8; background: #4a2216; border-color: #8a3a26; }
[data-skin='adventure'] .rail-group { font-family: var(--adv-cinzel); font-style: normal; font-weight: 700; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: #c0503e; border-top-color: var(--adv-line); }
[data-skin='adventure'] .rail-foot { border-top-color: var(--adv-line); }
[data-skin='adventure'] .rail-foot .rail-item { color: var(--adv-cream-muted); }

[data-skin='adventure'] .desk-theme :is(.topbar, .viewbar, .page-head, .tabs, .tools) {
  background: var(--adv-bar); background-image: none; border-color: var(--adv-line); box-shadow: none;
}
[data-skin='adventure'] .desk-theme :is(.viewbar, .tabs, .tools) { background: #1c110a; }

/* ---- the header ---- */
[data-skin='adventure'] .screen-head .candle, [data-skin='adventure'] .screen-head .egg-candle-wrap { display: none; }
[data-skin='adventure'] .screen-title h1 { font-family: var(--adv-cinzel); font-weight: 700; font-size: 22px; line-height: 1.35; letter-spacing: 0.04em; text-transform: uppercase; color: var(--adv-cream); text-shadow: none; }
[data-skin='adventure'] .screen-title h1 input { text-transform: none; }
[data-skin='adventure'] .screen-eyebrow { font-family: var(--adv-sans); font-style: normal; font-size: 12px; color: var(--adv-cream-muted); }
[data-skin='adventure'] .screen-find { background: #2c1b10; color: var(--adv-cream-muted); border-color: var(--adv-edge); border-radius: 4px; }
[data-skin='adventure'] .screen-find kbd { border-color: var(--adv-edge); }
[data-skin='adventure'] .desk-theme .clock { background: #2c1b10; color: var(--adv-cream); border-color: var(--adv-edge); border-radius: 4px; }
[data-skin='adventure'] .desk-theme .clock:hover:not(:disabled) { background: #3a2416; border-color: var(--adv-edge); }
[data-skin='adventure'] .screen-tools button.brass.icon { background: transparent; border-color: transparent; color: var(--adv-cream); box-shadow: none; }
[data-skin='adventure'] .screen-tools button.brass.icon:disabled { color: var(--adv-edge); filter: none; }
[data-skin='adventure'] .screen-tools button.brass.icon[aria-pressed='true'] { background: #2c1b10; border-color: var(--adv-edge); color: var(--adv-cream); }

/* ---- buttons ---- */
/* On the dark frame: outlined; on parchment: deep red. */
[data-skin='adventure'] button.brass:not(.nb *), [data-skin='adventure'] .desk-theme button.outline:not(.nb *), [data-skin='adventure'] .desk-theme button.ghost:not(.nb *) {
  background: transparent; border: 1px solid var(--adv-edge); color: var(--adv-cream); box-shadow: none; font-family: var(--adv-sans); font-weight: 500; border-radius: 4px;
}
/* Outline and ghost buttons on parchment (side panels, sheets): paper buttons with ink words, not the frame's cream (unreadable there). */
[data-skin='adventure'] .desk-theme :is(.dm-panel, .parchment-note, .parchment-sheet, .panel, .side, .journal-page, .chest, .library-templates) :is(button.outline, button.ghost):not(.nb *):not([aria-pressed='true']) {
  background: var(--adv-paper-btn); border: 1px solid var(--adv-paper-line); color: var(--adv-ink);
}
[data-skin='adventure'] :is(.dm-panel, .parchment-note, .parchment-sheet, .panel, .side, .journal-page, .chest, .library-templates, .board-map-hint) button.brass,
[data-skin='adventure'] button.wax, [data-skin='adventure'] .desk-theme button.primary:not(.nb *),
[data-skin='adventure'] .desk-theme button[aria-pressed='true']:not(.nb *), [data-skin='adventure'] .desk-theme .viewbar button[aria-pressed='true'] {
  background: var(--adv-red); border: 1px solid var(--adv-red-edge); color: #f6e6c8; font-family: var(--adv-sans); font-weight: 500;
  border-radius: 3px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 200, 170, 0.25);
}
[data-skin='adventure'] button.wax { font-size: 16px; min-height: 44px; padding: 0 20px; }
[data-skin='adventure'] .desk-theme button:hover:not(:disabled):not(.nb *) { filter: brightness(1.08); box-shadow: none; }
[data-skin='adventure'] button.ink-button:not(.nb *), [data-skin='adventure'] select.ink-select:not(.nb *), [data-skin='adventure'] .cartouche-button {
  background: var(--adv-paper-btn); border: 1px solid var(--adv-paper-line); color: var(--adv-ink); border-radius: 3px; font-family: var(--adv-sans); font-weight: 500;
}
/* The main ink button (Build with AI, Make a character card…): deep red like the other main buttons, never cream on cream. */
[data-skin='adventure'] .desk-theme button.ink-button.primary-ink:not(:disabled):not(.nb *) { background: var(--adv-red); border-color: var(--adv-red-edge); color: #f6e6c8; }
[data-skin='adventure'] select.ink-select.on-wood { background: #2c1b10; color: var(--adv-cream); border-color: var(--adv-edge); }

/* ---- parchment ---- */
[data-skin='adventure'] :is(.dm-panel, .parchment-note, .journal-page, .start-panel),
[data-skin='adventure'] .desk-theme :is(.side, .panel, .library-templates, .menu):not(.nb *) {
  --text: var(--adv-ink); --muted: var(--adv-muted); --border: var(--adv-paper-line); --ground: rgba(255, 248, 228, 0.7); --selection: #8e2a1d; --link: #8e2a1d;
  color: var(--adv-ink); background-color: var(--adv-parch); background-image: var(--adv-parchment); background-size: auto, auto, auto, 300px 300px;
  border: 0; border-radius: 3px; box-shadow: var(--adv-burn);
}
[data-skin='adventure'] .parchment-sheet::before {
  background-color: #d6bd8a; background-image: var(--adv-parchment); background-size: auto, auto, auto, 300px 300px;
  filter: none; box-shadow: inset 0 0 60px rgba(95, 55, 18, 0.65), 0 6px 18px rgba(0, 0, 0, 0.6);
}
[data-skin='adventure'] :is(.dm-panel, .parchment-note, .parchment-sheet, .journal-page, .panel, .side) :is(input, select, textarea) {
  background: rgba(255, 248, 228, 0.7); border-color: var(--adv-paper-line); color: var(--adv-ink);
}

/* ---- headings ---- */
[data-skin='adventure'] :is(.panel-title, .panel-heading, .mat-heading, .side-h, .journal-title, .map-empty h2, .region-name):not(.nb *) {
  font-family: var(--adv-cinzel); font-weight: 700; font-style: normal; letter-spacing: 0.05em; text-transform: uppercase; text-shadow: none; color: var(--adv-head);
}
[data-skin='adventure'] :is(.panel-title, .panel-heading, .side-h):not(.nb *) { font-size: 16px; padding-bottom: 5px; border-bottom: 1px solid rgba(110, 75, 40, 0.45); }
[data-skin='adventure'] .moon-name { font-family: var(--adv-sans); font-weight: 700; font-size: 18px; color: var(--adv-head); }
[data-skin='adventure'] :is(.mat-heading, .mat-heading.on-wood) { font-size: 17px; color: var(--adv-cream); }
[data-skin='adventure'] .ink-muted { color: var(--adv-muted); }

/* ---- the Desk ---- */
[data-skin='adventure'] .dm-screen { background: none; border: 0; box-shadow: none; padding: 0; gap: 14px; }
[data-skin='adventure'] .mat { background: none; border: 0; box-shadow: none; padding: 0; gap: 14px; border-radius: 0; }
[data-skin='adventure'] .mat::before, [data-skin='adventure'] .desk .prop:not(.map-empty-rose), [data-skin='adventure'] .desk .candle, [data-skin='adventure'] .desk .leaf,
[data-skin='adventure'] .egg-dice, [data-skin='adventure'] .journal-quill, [data-skin='adventure'] .tools-candle { display: none; }
[data-skin='adventure'] :is(.mat-stories, .chest, .mat-party) {
  padding: 14px 16px; border-radius: 3px; background-color: var(--adv-parch); background-image: var(--adv-parchment); background-size: auto, auto, auto, 300px 300px; box-shadow: var(--adv-burn);
}
[data-skin='adventure'] :is(.mat-stories, .chest, .mat-party) .mat-heading { color: var(--adv-head); font-size: 16px; padding-bottom: 5px; border-bottom: 1px solid rgba(110, 75, 40, 0.45); }
[data-skin='adventure'] .journal { background: none; border: 0; box-shadow: none; padding: 0; }
[data-skin='adventure'] .journal-page textarea { font-family: var(--adv-sans); font-style: normal; font-size: 15px; line-height: 26px; color: var(--adv-ink);
  background-color: #f4ead2; background-image: repeating-linear-gradient(transparent 0 25px, #cdb68c 25px 26px); background-position: 0 6px; border: 1px solid var(--adv-paper-line); }
[data-skin='adventure'] .clock-text { font-size: 17px; white-space: nowrap; }

/* Storylines and party cards: parchment rows and slips instead of tarot cards. */
[data-skin='adventure'] .tarot-stack { display: flex; flex-direction: column; gap: 8px; }
[data-skin='adventure'] .tarot-slot > .tarot, [data-skin='adventure'] .tarot-slot:nth-child(n) > .tarot, [data-skin='adventure'] .party-row > .tarot:nth-child(n) { transform: none; }
[data-skin='adventure'] .tarot {
  width: auto; height: auto; min-height: 52px; aspect-ratio: auto; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 6px 10px; text-align: left; border-radius: 3px; color: var(--adv-ink);
  background: rgba(150, 105, 55, 0.22); border: 1px solid rgba(110, 75, 40, 0.45); box-shadow: none; filter: none;
}
[data-skin='adventure'] .tarot::before, [data-skin='adventure'] .tarot::after { display: none; }
[data-skin='adventure'] .tarot .tarot-art { display: none; }
[data-skin='adventure'] .tarot-numeral { grid-row: span 2; font-family: var(--adv-cinzel); font-weight: 700; color: var(--adv-head); font-size: 16px; }
[data-skin='adventure'] .tarot-title { font-family: var(--adv-sans); font-weight: 500; font-size: 15px; color: var(--adv-ink); border: 0; padding: 0; margin: 0; text-align: left; }
[data-skin='adventure'] :is(.tarot-sub, .tarot-footer) { font-family: var(--adv-sans); font-size: 13px; color: var(--adv-muted); text-align: left; margin: 0; }
[data-skin='adventure'] .tarot-new { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 6px; background: var(--adv-paper-btn); border: 1px solid var(--adv-paper-line); color: var(--adv-ink); font-family: var(--adv-sans); }
[data-skin='adventure'] .tarot-plus { font-size: 18px; }
[data-skin='adventure'] .tarot-edit { width: 28px; height: 28px; min-height: 0; top: 6px; right: 6px; }
[data-skin='adventure'] .tarot-slot > .tarot { padding-right: 42px; }
[data-skin='adventure'] .party-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
[data-skin='adventure'] .tarot-pc { width: 240px; }
/* Party slips: numeral and name on top, class under them, the table numbers across the whole slip. */
[data-skin='adventure'] .party-row > .tarot-pc { grid-template-areas: 'n t' 'n s' 'f f'; align-items: start; align-content: start; row-gap: 2px; padding: 8px 10px; }
[data-skin='adventure'] .tarot-pc .tarot-footer { margin-top: 6px; color: var(--adv-ink); }
[data-skin='adventure'] .tarot-pc .pc-stats { justify-content: space-between; }

/* The new art on the Desk (HourScene, MoonArt) replaces the dial and the disc. */
[data-skin='adventure'] .adv-art-hour { width: 160px; height: 104px; flex: none; }
[data-skin='adventure'] .adv-art-moon { width: 108px; height: 108px; flex: none; }
[data-skin='adventure'] .dm-panel-row { justify-content: center; }
/* The time, light and clock buttons centred like the picture beside or above them (owner, 2026-10-20). */
[data-skin='adventure'] .dm-panel-row > .clock-side { align-items: center; text-align: center; }
[data-skin='adventure'] .dm-panel-row > .clock-side .row { justify-content: center; }

/* ---- board, sheet, library, timeline ---- */
[data-skin='adventure'] .desk-theme .canvas {
  background-color: #d6bd8a; background-image: radial-gradient(ellipse at 25% 30%, rgba(255, 240, 205, 0.45), transparent 55%), radial-gradient(ellipse at 75% 75%, rgba(120, 80, 35, 0.3), transparent 60%), var(--tex-paper);
  background-size: auto, auto, 300px 300px; box-shadow: inset 0 0 60px rgba(95, 55, 18, 0.65); border-color: #1c110a;
}
[data-skin='adventure'] .tools-group { font-family: var(--adv-cinzel); font-weight: 700; color: #c0503e; }
[data-skin='adventure'] .desk-theme .tool { background: transparent; border: 1px solid var(--adv-edge); color: var(--adv-cream); border-radius: 4px; }
[data-skin='adventure'] .desk-theme .tabs button[role='tab'] { font-family: var(--adv-sans); color: #d8c7a3; }
[data-skin='adventure'] .desk-theme .tabs button[role='tab'][aria-selected='true'] { color: var(--adv-head); background: var(--adv-parch); border-color: #8a6a44; border-bottom-color: transparent; border-radius: 3px 3px 0 0; font-weight: 700; }
[data-skin='adventure'] .find-list li.is-at { background: rgba(142, 42, 29, 0.12); }

/* Live desk: The advisor on parchment too. */
[data-skin='adventure'] .dm-panel.advisor { color: var(--adv-ink); background-color: var(--adv-parch); background-image: var(--adv-parchment); }
[data-skin='adventure'] .dm-panel.advisor .panel-title { color: var(--adv-head); }
[data-skin='adventure'] .live-mat { background: none; border: 0; box-shadow: none; }

/* Start screen */
[data-skin='adventure'] .start-panel h2 { font-family: var(--adv-cinzel); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 18px; color: var(--adv-head); }

/* AI buttons stay blue and dashed (rule 10) on parchment and on the frame. */
[data-skin='adventure'] .desk-theme button.ai-button { background: var(--adv-paper-btn); border: 2px dashed #2d6ea3; color: #1f4f78; border-radius: 3px; }
[data-skin='adventure'] .screen-actions button.ai-button { background: #2c1b10; border-color: #5b9bd5; color: #a9cdf0; }

/* Storyline rows: numeral on the left, title and status beside it. */
[data-skin='adventure'] .tarot-slot > .tarot { grid-template-areas: 'n t' 'n s' 'n f'; }
[data-skin='adventure'] .tarot-numeral { grid-area: n; }
[data-skin='adventure'] .tarot-title { grid-area: t; }
[data-skin='adventure'] .tarot-sub { grid-area: s; }
[data-skin='adventure'] .tarot-footer { grid-area: f; }
[data-skin='adventure'] .tarot-slot { position: relative; }
[data-skin='adventure'] .tarot-edit { position: absolute; background: var(--adv-paper-btn); border: 1px solid var(--adv-paper-line); color: var(--adv-ink); box-shadow: none; }
[data-skin='adventure'] .map-empty-rose { position: static; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }

/* The party and Next session: centred, with faint adventurers behind an empty party. */
[data-skin='adventure'] :is(.party-panel, .session-panel) { justify-content: flex-start; }
[data-skin='adventure'] :is(.party-panel, .session-panel):has(> .ink-muted) > :not(.panel-title) { align-self: center; text-align: center; position: relative; }
[data-skin='adventure'] :is(.party-panel, .session-panel):has(> .ink-muted) > button.ink-button { background: var(--adv-red); border-color: var(--adv-red-edge); color: #f6e6c8; }
[data-skin='adventure'] .party-panel:has(> .ink-muted) { overflow: hidden; padding-bottom: 60px; }
[data-skin='adventure'] .party-panel:has(> .ink-muted)::after {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 300px; height: 70px; margin-left: -150px; pointer-events: none; opacity: 0.2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 70'%3E%3Cg fill='%235f3e1e' stroke='%235f3e1e' stroke-linecap='round'%3E%3Cpath d='M22 70l4-30h12l4 30z'/%3E%3Ccircle cx='32' cy='34' r='5'/%3E%3Cpath d='M24 31l8-20 8 20z'/%3E%3Cpath d='M14 70V22' fill='none' stroke-width='2.5'/%3E%3Ccircle cx='14' cy='20' r='3.5'/%3E%3Cpath d='M78 70l2-26h16l2 26z'/%3E%3Ccircle cx='88' cy='36' r='6'/%3E%3Cpath d='M81 33q7-9 14 0z'/%3E%3Ccircle cx='74' cy='52' r='9'/%3E%3Cpath d='M102 60L112 22' fill='none' stroke-width='2.5'/%3E%3Cpath d='M136 70l3-28q8-14 16 0l3 28z'/%3E%3Cpath d='M141 40q7-16 14 0'/%3E%3Cpath d='M192 70l3-27h14l3 27z'/%3E%3Ccircle cx='202' cy='36' r='6'/%3E%3Cpath d='M214 54l8-22' fill='none' stroke-width='2.5'/%3E%3Ccircle cx='223' cy='30' r='4'/%3E%3Cpath d='M250 70l3-27h14l3 27z'/%3E%3Ccircle cx='260' cy='36' r='6'/%3E%3Cpath d='M276 26q14 18 0 38' fill='none' stroke-width='2.5'/%3E%3C/g%3E%3C/svg%3E") no-repeat center bottom / 300px 70px;
}
[data-skin='adventure'] .live .clock-panel > .adv-art-hour { align-self: center; }
[data-skin='adventure'] .live .clock-panel > .clock-row { justify-content: center; text-align: center; }
[data-skin='adventure'] .start-candle { display: none; }
[data-skin='adventure'] .start-screen .start-title { font-family: var(--adv-cinzel); font-weight: 700; font-size: 44px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--adv-cream); text-shadow: none; }
[data-skin='adventure'] .start-screen .muted { color: var(--adv-cream-muted); }

/* Headings straight on the dark ground read cream; on parchment, dark ink. */
[data-skin='adventure'] .desk-theme :is(.panel-heading, .side-h, .mat-heading):not(.nb *) { color: var(--adv-cream); border-bottom-color: var(--adv-line); }
[data-skin='adventure'] :is(.dm-panel, .parchment-note, .parchment-sheet, .journal-page, .start-panel, .side, .panel, .library-templates, .menu, .mat-stories, .chest, .mat-party, .dz-dialog) :is(.panel-heading, .side-h, .mat-heading):not(.nb *) {
  color: var(--adv-head); border-bottom-color: rgba(110, 75, 40, 0.45);
}
[data-skin='adventure'] .dz-dialog-head h2 { font-family: var(--adv-cinzel); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 20px; color: var(--adv-head); }
/* The players' view keeps its own header: same type as the others. */
[data-skin='adventure'] .desk-title h1 { font-family: var(--adv-cinzel); font-weight: 700; font-size: 30px; letter-spacing: 0.04em; text-transform: uppercase; text-shadow: none; color: var(--adv-cream); }
[data-skin='adventure'] .desk-eyebrow { font-family: var(--adv-sans); font-style: normal; color: var(--adv-cream-muted); font-size: 13px; }
[data-skin='adventure'] .desk-head .candle { display: none; }

/* Live › Logged this session sits on a dark panel: its title in cream (3.8.0). */
[data-skin='adventure'] .live-left .session-log .panel-title:not(.nb *) { color: var(--adv-cream); }
[data-skin='adventure'] .advisor-quiet { color: var(--adv-muted); }
