.tsRules { --ts-ink:#30291f; container-type:inline-size; color:var(--ts-ink); background:#fffdf7; max-width:72rem; margin:auto; padding:clamp(12px,3%,36px); font:1rem/1.65 system-ui,sans-serif; overflow-wrap:anywhere; }
.tsRules header { border-radius:12px; padding:clamp(12px,4cqw,42px); color:#fff4d4; background:linear-gradient(120deg,#192d35,#4e3621); margin-bottom:24px; }
.tsRules header h1 { font-size:clamp(1.15rem,8cqw,3.5rem); color:inherit; margin:.2em 0; font-family:Georgia,serif; }
.tsRules header p { margin:0; }
.tsRules nav { display:flex; flex-wrap:wrap; gap:8px 16px; padding:14px; background:#f0e9d7; border-radius:8px; margin-bottom:24px; }
.tsRules nav a { color:#664415; font-size:.9em; }
.tsRules .tsContents summary { padding:12px 16px; background:#f0e9d7; border-radius:8px; cursor:pointer; font-weight:600; }
.tsRules .tsContents { margin-bottom:20px; }
.tsRules .tsControls { border:1px solid #d7c59e; border-radius:8px; padding:16px; margin-bottom:24px; }
.tsRules h2,.tsRules h3 { color:#553c20; font-family:Georgia,serif; line-height:1.2; margin:1.6em 0 .65em; scroll-margin-top:1em; }
.tsRules h2 { border-bottom:2px solid #d7c59e; padding-bottom:.4em; }
.tsRules img { display:block; max-width:100%; height:auto; object-fit:contain; margin:16px auto; border-radius:6px; }
.tsRules table { width:100%; max-width:100%; border-collapse:collapse; table-layout:fixed; }
.tsRules td,.tsRules th { padding:8px; vertical-align:top; overflow-wrap:anywhere; }
.tsRules tr:nth-child(even) { background:#f2edde; }
.tsRules .ruleschanged { border-left:4px solid #a47423; padding:4px 18px 16px; background:#fff1cb; border-radius:6px; margin:16px 0; }
.tsRules .ruleschanged h2 { font-family:inherit; font-size:1.1em; border:0; }
.tsRules li { margin:.3em 0; }
@media(max-width:480px) { .tsRules { font-size:.95rem; padding:12px; } .tsRules td,.tsRules th { padding:4px; } }
.tsRules .tsGlossaryLinks a { display:inline-block; padding:8px 14px; border:1px solid #a47423; border-radius:6px; color:#553c20; background:#fff1cb; }
#panelRules .tsGlossaryLinks { display:none; }
.tsGlossaryPage { margin:0; background:#eee8da; }
.tsGlossaryFilters { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
.tsGlossaryFilters label { display:flex; flex-direction:column; gap:4px; min-width:0; flex:1 1 180px; font-weight:600; }
.tsGlossaryFilters select,.tsGlossaryFilters input { box-sizing:border-box; width:100%; min-width:0; padding:9px; border:1px solid #a99b80; border-radius:5px; background:#fff; color:#30291f; font:inherit; }
.tsGlossaryCards details { margin:12px 0; border:1px solid #d7c59e; border-radius:6px; scroll-margin-top:12px; }
.tsGlossaryCards summary { padding:12px; cursor:pointer; font-weight:600; background:#f0e9d7; }
.tsGlossaryCard { display:grid; grid-template-columns:minmax(0,240px) minmax(0,1fr); gap:20px; padding:16px; }
.tsGlossaryCard img { width:240px; margin:0 auto; }
.tsGlossaryCard p { white-space:pre-line; margin:0 0 12px; }
.tsGlossaryCard h3 { margin:16px 0 8px; }
.tsGlossaryCard .tsCardClassification { font-weight:600; }
@media(max-width:600px) { .tsGlossaryCard { grid-template-columns:minmax(0,1fr); padding:12px; } }

.tsGlossaryFamily { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.tsGlossaryFamily .tsGlossaryCard { grid-template-columns:minmax(0,1fr); align-content:start; gap:12px; padding:14px; }
.tsGlossaryFamily .tsGlossaryCard+.tsGlossaryCard { border-left:1px solid #d7c59e; }
.tsGlossaryFamily .tsGlossaryCard img { width:160px; max-width:100%; }
.tsGlossaryFamily .tsGlossaryHeroTitle { margin:0; font:600 15px/1.4 Georgia,serif; min-height:42px; }
.tsGlossaryLevel { display:inline-block; padding:2px 6px; border-radius:4px; background:#69502c; color:#fff5db; font:600 12px/1.4 Arial,sans-serif; }
@media(max-width:760px) { .tsGlossaryFamily { grid-template-columns:minmax(0,1fr); } .tsGlossaryFamily .tsGlossaryCard { grid-template-columns:minmax(0,160px) minmax(0,1fr); } .tsGlossaryFamily .tsGlossaryHeroTitle { grid-column:1/-1; min-height:0; } .tsGlossaryFamily .tsGlossaryCard+.tsGlossaryCard { border-left:0; border-top:1px solid #d7c59e; } }
@media(max-width:480px) { .tsGlossaryFamily .tsGlossaryCard { grid-template-columns:minmax(0,1fr); } }

/* Trim scanned white edges and round the card face without clipping controls. */
img.tsCardArt { clip-path:inset(.5% round 8% / 5.57%); }
