.technique-dialog {
  position: fixed;
  z-index: 10;
  inset: var(--panel-center) auto auto 50%;
  transform: translate(-50%, -50%);
  container-type: inline-size;
  width: var(--panel-width);
  max-height: var(--panel-height);
  margin: 0;
  padding: 0;
  border: 0;
  color: #482818;
  background: transparent;
  overflow: visible;
  font-family: Georgia, 'Times New Roman', serif;
  scrollbar-color: #ad7a49 #41291b;
}
.technique-dialog::backdrop { background: transparent; backdrop-filter: none; }
.technique-board {
  --u: calc(100cqw / 1586);
  --tree-u: var(--u);
  --dark-wood: url('assets/techniques/reference/frame-wood.webp');
  position: relative;
  isolation: isolate;
  aspect-ratio: 1586 / 992;
}
.technique-board::after,
.technique-board::before {
  content: '';
  position: absolute;
  pointer-events: none;
}
.technique-board::after {
  z-index: -2;
  inset: calc(49 * var(--u)) calc(56 * var(--u)) calc(65 * var(--u)) calc(54 * var(--u));
  clip-path: polygon(2% 0, 98% 0, 100% 7%, 100% 100%, 0 100%, 0 7%);
  background: var(--dark-wood) center / calc(45 * var(--u)) calc(144 * var(--u)) #432719;
}
.technique-board::before {
  z-index: -1;
  inset: calc(2 * var(--u)) calc(20 * var(--u)) calc(12 * var(--u)) calc(32 * var(--u));
  background: url('assets/techniques/reference/frame-shell.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 5px 9px #21150f99);
}
.technique-dialog button { color: inherit; font: inherit; cursor: pointer; }
.technique-dialog button:disabled { cursor: default; }
.technique-dialog button:focus-visible { outline: 2px solid #fff5c6; outline-offset: -3px; }
.technique-header, .technique-schools, .technique-page, .technique-workbench { display: contents; }
#technique-title, #technique-close, .technique-tab, .technique-theatre, .technique-tree-board, .technique-belt {
  position: absolute;
  top: calc(var(--y) * var(--u));
  left: calc(var(--x) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  margin: 0;
}
#technique-title {
  --x: 512; --y: 2; --w: 553; --h: 90;
  z-index: 2;
  background: url('assets/techniques/reference/title-plaque.webp') center / 100% 100% no-repeat;
}
#technique-close {
  --x: 1462; --y: 6; --w: 84; --h: 81;
  z-index: 5;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: url('assets/techniques/reference/close-stud.webp') center / contain no-repeat;
}
#technique-close:hover, #technique-replay:hover { filter: brightness(1.12); }

.technique-tab {
  z-index: 1;
  padding: 0;
  border: 0;
  border-radius: calc(13 * var(--u));
  background: var(--portrait-card) center / 100% 100% no-repeat;
}
.technique-tab[data-school='shield'] {
  --x: 73; --y: 84; --w: 287; --h: 139;
  --portrait-card: url('assets/techniques/tree/tab-shield.webp');
  --portrait-mobile: url('assets/techniques/tree/tab-thumb-shield.webp');
}
.technique-tab[data-school='club'] {
  --x: 357; --y: 83; --w: 292; --h: 143;
  --portrait-card: url('assets/techniques/tree/tab-club-neutral.webp');
  --portrait-mobile: url('assets/techniques/tree/tab-thumb-club.webp');
}
.technique-tab[data-school='daggers'] {
  --x: 650; --y: 86; --w: 299; --h: 140;
  --portrait-card: url('assets/techniques/tree/tab-daggers.webp');
  --portrait-mobile: url('assets/techniques/tree/tab-thumb-daggers.webp');
}
.technique-tab[data-school='common'] {
  --x: 950; --y: 101; --w: 299; --h: 125;
  --portrait-card: var(--cardboard-label);
  --portrait-mobile: url('assets/act-two/mel.webp');
  display: grid;
  grid-template-columns: 40% 1fr;
  align-items: center;
  padding: calc(7 * var(--u)) calc(14 * var(--u));
  color: #482818;
}
.technique-tab[data-school='magic'] {
  --x: 1246; --y: 91; --w: 293; --h: 136;
  --portrait-card: url('assets/techniques/tree/tab-magic.webp');
  --portrait-mobile: url('assets/techniques/tree/tab-thumb-magic.webp');
}
.technique-tab[aria-selected='true'] { z-index: 3; }
.technique-tab:not([data-school='club'])[aria-selected='true'] {
  filter: drop-shadow(0 0 2px #fff7ce) drop-shadow(0 0 5px #ffad40);
}
.technique-tab[data-school='club'][aria-selected='true'] {
  --portrait-card: url('assets/techniques/tree/tab-club.webp');
}
.technique-tab:not([aria-selected='true'], [aria-disabled='true']):hover { filter: brightness(1.08); }
.technique-dialog .technique-tab[aria-disabled='true'] {
  cursor: help;
  filter: grayscale(1) brightness(.78);
}
.technique-tab .technique-portrait, .technique-tab-copy { display: none; }
.technique-tab[data-school='common']::before {
  content: '';
  width: 100%;
  height: 100%;
  background: var(--portrait-mobile) center top / 100% auto no-repeat;
}
.technique-tab[data-school='common'] .technique-tab-copy {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  clip-path: none;
  line-height: 1.12;
}
.technique-tab[data-school='common'] .technique-tab-copy strong { display: block; font-size: calc(31 * var(--u)); }
.technique-tab[data-school='common'] .technique-tab-copy small { display: block; font-size: calc(25 * var(--u)); }

.technique-school-hint {
  position: absolute;
  z-index: 6;
  box-sizing: border-box;
  width: min(18rem, calc(100% - 16px));
  padding: 13px 18px 15px;
  color: #482818;
  background: var(--cardboard-label) center / 100% 100% no-repeat;
  filter: drop-shadow(0 4px 4px #20130dba);
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.technique-theatre { --x: 65; --y: 228; --w: 694; --h: 604; }
.technique-screen { position: relative; width: 100%; height: 100%; background: #6b4227; }
.technique-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/techniques/tree/stage-frame.webp') center / 100% 100% no-repeat;
  pointer-events: none;
}
.technique-screen canvas {
  position: absolute;
  inset: 6.2% 3.15% 4.7% 3.48%;
  display: block;
  width: 93.37%;
  height: 89.1%;
  background: url('assets/techniques/practice-stage.webp') center / 100% 100% no-repeat;
}
#technique-replay {
  position: absolute;
  z-index: 2;
  right: 3.7%;
  bottom: 7.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .42em;
  width: 37%;
  height: 10.2%;
  padding: 0 .5em .08em;
  border: 0;
  color: #ffebbb;
  background: url('assets/techniques/reference/replay-plate.webp') center / 100% 100% no-repeat;
  font-size: calc(26 * var(--u));
  font-weight: bold;
  white-space: nowrap;
  text-shadow: 1px 1px #3b2014;
}
#technique-replay img { width: 1.32em; height: 1em; object-fit: contain; }
.technique-preview-caption {
  position: absolute;
  z-index: 2;
  left: 7%;
  right: 7%;
  top: 11%;
  width: max-content;
  max-width: 86%;
  margin: 0 auto;
  padding: .55em .85em;
  color: #452619;
  background: var(--cardboard-label) center / 100% 100% no-repeat;
  font: 800 calc(19 * var(--u))/1.2 Georgia, serif;
  text-align: center;
}

.technique-tree-board {
  --x: 757; --y: 224; --w: 788; --h: 612;
  z-index: 1;
  background: url('assets/techniques/tree/tree-paper.webp') center / 100% 100% no-repeat;
}
#technique-tree-title {
  position: absolute;
  top: 2.45%;
  left: 18.66%;
  width: 57.74%;
  height: 8.82%;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0 5% .18em;
  color: #ffe4b5;
  background: url('assets/techniques/tree/tree-title.webp') center / 100% 100% no-repeat;
  font-size: calc(29 * var(--tree-u));
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px #4e2819;
}
#technique-tree-title:has(.technique-teacher-location:not([hidden])) {
  top: 1.8%;
  left: 14.5%;
  width: 66%;
  height: 10.6%;
  align-content: center;
  gap: 1px;
  padding-inline: 2%;
}
.technique-teacher-location {
  color: #ffe9c9;
  font-size: max(10px, calc(17 * var(--tree-u)));
  font-weight: bold;
  line-height: 1.1;
  white-space: nowrap;
}
.technique-tiers {
  position: absolute;
  inset: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  pointer-events: none;
}
.technique-tiers li {
  position: absolute;
  top: var(--row);
  left: 3.15%;
  width: 7.85%;
  height: 6.05%;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: #ffebc7;
  background: url('assets/techniques/tree/tier-stamp.webp') center / 100% 100% no-repeat;
  font-size: calc(28 * var(--tree-u));
  line-height: 1;
  font-weight: bold;
}
.technique-tiers li:nth-child(1) { --row: 19.25%; }
.technique-tiers li:nth-child(2) { --row: 36.35%; }
.technique-tiers li:nth-child(3) { --row: 53.85%; }
.technique-tiers li:nth-child(4) { --row: 70.95%; }
.technique-tiers li:nth-child(5) { --row: 88.15%; }
.technique-tiers li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7%;
  top: 182%;
  width: calc(716 * var(--tree-u));
  border-bottom: 1px dashed #a3653d7d;
}

.technique-links, .technique-index {
  position: absolute;
  inset: .98% 1.52% .98% .25%;
  width: 98.23%;
  height: 98.04%;
  pointer-events: none;
}
.technique-rope-defs { position: absolute; pointer-events: none; }
.technique-links { z-index: 0; filter: drop-shadow(0 1px 1px #4b2b18b2); }
.technique-links path, .technique-link {
  fill: none;
  stroke: url('#technique-rope-pigment') #955426;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.technique-links .technique-link-twist, .technique-links .technique-link-grain {
  stroke: #d09150;
  stroke-width: 5;
  stroke-dasharray: 2 7;
}
.technique-index { z-index: 1; }
.technique-tree-node {
  --node-art: url('assets/techniques/tree/node-ready.webp');
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: grid;
  place-items: center;
  width: 13.66%;
  height: 15.75%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 31%;
  transform: translate(-50%, -50%);
  background: var(--node-art) center / 100% 100% no-repeat;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
}
.technique-tree-node:nth-child(1) { --x: 37.4%; --y: 19.3%; }
.technique-tree-node:nth-child(2) { --x: 26.3%; --y: 37.1%; }
.technique-tree-node:nth-child(3) { --x: 48.2%; --y: 37.2%; }
.technique-tree-node:nth-child(4) { --x: 23.7%; --y: 54.2%; }
.technique-tree-node:nth-child(5) { --x: 50.0%; --y: 54.2%; }
.technique-tree-node:nth-child(6) { --x: 23.5%; --y: 71.4%; }
.technique-tree-node:nth-child(7) { --x: 51.0%; --y: 71.9%; }
.technique-tree-node:nth-child(8) { --x: 20.9%; --y: 88.9%; }
.technique-tree-node:nth-child(9) { --x: 42.0%; --y: 89.0%; }
.technique-tree-node:nth-child(10) { --x: 62.65%; --y: 88.9%; }
.technique-tree-node img { display: block; width: 63%; height: 73%; object-fit: contain; }
.technique-tree-node[data-status='learned'], .technique-tree-node[data-status='equipped'],
.technique-tree-node[data-state='learned'], .technique-tree-node[data-state='equipped'] {
  --node-art: url('assets/techniques/tree/node-learned.webp');
}
.technique-tree-node[aria-pressed='true'] {
  --node-art: url('assets/techniques/tree/node-active.webp');
  z-index: 2;
  transform: translate(-50%, -50%) scale(1.09);
}
.technique-tree-node[data-status='locked']:not([aria-pressed='true']) {
  filter: saturate(.68) brightness(.89);
}
.technique-tree-node[data-status='locked']::after {
  content: '';
  position: absolute;
  width: 35%;
  height: 38%;
  right: -2%;
  bottom: -1%;
  background: url('assets/techniques/tree/node-locked.webp') center / contain no-repeat;
  pointer-events: none;
}
.technique-tree-node:hover { filter: brightness(1.08); }
.technique-tree-node:focus-visible { outline-color: #924821 !important; }
.technique-stance-tab {
  position: absolute;
  left: 0;
  top: 1%;
  padding: .17em .40em .19em;
  border: 1px solid #835734;
  border-radius: .18em;
  background: #506347;
  color: #fff0c5;
  font: bold max(7px, calc(13 * var(--tree-u)))/1 Georgia, serif;
  pointer-events: none;
}

.technique-study {
  position: absolute;
  z-index: 3;
  left: 59.22%;
  top: 13.40%;
  width: 37.79%;
  height: 44.28%;
  display: flex;
  flex-direction: column;
  padding: calc(13 * var(--tree-u)) calc(17 * var(--tree-u)) calc(14 * var(--tree-u));
  background: url('assets/techniques/tree/dossier-card.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 2px #4b2e1a62);
}
.technique-study::before {
  content: none;
  position: absolute;
  top: 14.5%;
  right: 98%;
  width: 46%;
  height: 24%;
  background: url('assets/techniques/tree/dossier-pointer.webp') center / 100% 100% no-repeat;
  pointer-events: none;
}
.technique-dialog:is([data-school='club'], [data-school='daggers']):has(.technique-tree-node:first-child[aria-pressed='true']) .technique-study::before { content: ''; }
.technique-study:has(.technique-details:not([hidden])) { height: 70%; }
.technique-study-name {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 35% minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr) auto;
  align-items: center;
  column-gap: 4%;
  row-gap: 1px;
  min-height: max(27px, calc(76 * var(--tree-u)));
}
.technique-emblem {
  display: block;
  grid-row: 1 / -1;
  width: 100%;
  height: 100%;
  max-height: calc(72 * var(--tree-u));
  object-fit: contain;
}
#technique-name {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: #55291a;
  font-size: calc(29 * var(--tree-u));
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.technique-dialog[data-long-title='true'] #technique-name { font-size: calc(23 * var(--tree-u)); }
.technique-study-name:has(.technique-emblem[hidden]) #technique-name { grid-column: 1 / -1; }
.technique-study-actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 2px;
}
#technique-details-toggle, #technique-show-scene {
  min-width: 39%;
  padding: .10em .44em .15em;
  border: 0;
  color: #783b24;
  background: url('assets/techniques/reference/dossier-range.webp') center / 100% 100% no-repeat;
  font: bold max(9px, calc(13 * var(--tree-u)))/1.12 Georgia, serif;
  text-decoration: underline;
  text-decoration-color: #a4664380;
  text-underline-offset: 1px;
}
#technique-show-scene { display: none; }
#technique-details-toggle:hover, #technique-details-toggle[aria-expanded='true'] { filter: brightness(1.08) drop-shadow(0 1px #7c431e8c); }
#technique-details-toggle:focus-visible { outline-color: #994d27; }
.technique-facts {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: calc(5 * var(--tree-u));
  margin: calc(3 * var(--tree-u)) 0 calc(11 * var(--tree-u));
  padding: calc(5 * var(--tree-u)) 0 calc(4 * var(--tree-u));
  border-top: 1px solid #a3653d61;
  border-bottom: 1px solid #a3653d61;
  font-weight: bold;
  text-align: center;
}
#technique-cost {
  min-width: 43%;
  padding: .19em .44em .24em;
  color: #ffe6b8;
  background: url('assets/techniques/reference/dossier-cost.webp') center / 100% 100% no-repeat;
  font-size: calc(25 * var(--tree-u));
  line-height: 1;
}
#technique-cost.technique-stance-cost {
  min-width: 0;
  max-width: 100%;
  padding: .26em .48em .31em;
  background: #4a6049;
  border: 1px solid #8b633e;
  border-radius: .19em;
  color: #fff0c2;
  font-size: max(10px, calc(22 * var(--tree-u)));
}
#technique-summary {
  display: grid;
  place-items: center;
  min-height: calc(27 * var(--tree-u));
  padding-inline: .2em;
  font-size: calc(21 * var(--tree-u));
  line-height: 1.03;
  color: #542f20;
}
.technique-stance-lifetime {
  display: block;
  margin-top: .22em;
  color: #65543b;
  font-size: max(8px, .76em);
  white-space: nowrap;
}
#technique-cost:empty, #technique-summary:empty { display: none; }
.technique-choice-info, .technique-details { min-width: 0; }
.technique-choice-info {
  display: none;
  align-items: baseline;
  justify-content: space-between;
  gap: .4em;
  margin-top: .35em;
  font-size: max(9px, calc(13 * var(--tree-u)));
  font-weight: bold;
}
.technique-study:has(.technique-details:not([hidden])) .technique-choice-info { display: flex; }
.technique-choice-info p, .technique-description p { margin: 0; }
.technique-description .technique-stance-rules {
  margin-top: .39em;
  padding: .37em .45em;
  border-left: 2px solid #63734e;
  color: #4d5034;
  background: #667b4820;
}
.technique-details {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: .36em;
  padding-top: .28em;
  border-top: 1px solid #a96a4180;
  font: max(10px, calc(15 * var(--tree-u)))/1.22 'Trebuchet MS', 'Segoe UI', sans-serif;
}
.technique-details-pager { display: none; }
.technique-source { display: block; margin-top: .26em; }
.technique-assignment:not([hidden]) {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35em;
  margin-top: .4em;
  font: max(10px, calc(15 * var(--tree-u)))/1.22 'Trebuchet MS', 'Segoe UI', sans-serif;
}
.technique-assign {
  padding: .36em .55em;
  border: 0;
  color: #ffedc9 !important;
  background: var(--cardboard-stamp) center / 100% 100% no-repeat #8c3c24;
  white-space: nowrap;
}
#technique-status:not(:empty) { display: block; margin-top: .35em; font-size: max(9px, calc(13 * var(--tree-u))); }

.technique-belt {
  --x: 37; --y: 832; --w: 1524; --h: 153;
  background: url('assets/techniques/tree/belt-rail.webp') center / 100% 100% no-repeat;
}
.technique-belt-heading {
  position: absolute;
  inset: 12.94% auto auto 8.42%;
  width: 24.15%;
  height: 60.13%;
}
.technique-slots {
  position: absolute;
  inset: 14.38% auto auto 35.4%;
  width: 51.4%;
  height: 71%;
  display: grid;
  grid-template-columns: 1.28fr 1fr 1fr;
  align-items: center;
  gap: 2%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.technique-slot {
  position: relative;
  min-width: 0;
  height: 90%;
  border: 1px dashed #b17a4e;
  border-radius: calc(13 * var(--u));
  color: #ffe0a7;
  background: var(--dark-wood) center / cover #4f2c1b;
}
.technique-slot.is-filled {
  border: 0;
  color: #4f2817;
  background: url('assets/techniques/reference/dossier-range.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 3px 1px #1c120bc9);
}
.technique-slot:is(.is-previewed, :has(.technique-slot-demo[aria-pressed='true'])) {
  outline: max(1px, calc(3 * var(--u))) solid #ffd68f;
  box-shadow: 0 0 8px 3px #f6a643;
}
.technique-slot.is-target {
  outline: max(2px, calc(3 * var(--u))) solid #fff0b4;
  box-shadow: inset 0 0 0 1px #744318, 0 0 8px 3px #f6a643;
}
.technique-slot-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(13 * var(--u));
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 calc(12 * var(--u));
  border: 0;
  border-radius: inherit;
  text-align: left;
  background: transparent;
}
.technique-slot-demo img { width: 34%; height: 80%; object-fit: contain; }
.technique-slot-demo strong { display: block; line-height: 1.08; font-size: calc(25 * var(--u)); }
.technique-slot-demo small { display: block; font-size: calc(16 * var(--u)); line-height: 1.12; }
.technique-slot[data-long-label] .technique-slot-demo { gap: calc(7 * var(--u)); padding-right: calc(23 * var(--u)); }
.technique-slot[data-long-label] .technique-slot-demo strong { font-size: max(9px, calc(20 * var(--u))); }
.technique-slot-demo[data-common-picker] { text-align: center; }
.technique-slot-demo[data-belt-slot]:hover { box-shadow: inset 0 0 0 1px #d1a770; }
.technique-common-picker {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 100%;
  width: min(15rem, 100%);
  max-height: min(12rem, 35vh);
  overflow-y: auto;
  padding: 6px 9px;
  border: 1px solid #9e6738;
  border-radius: 8px 11px 6px 9px;
  background: url('assets/techniques/reference/dossier-range.webp') center / 100% 100% no-repeat #e9bd7c;
  box-shadow: 0 4px 7px #20130dba;
  font-size: 14px;
}
.technique-common-picker button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 3px 6px;
  border: 0;
  background: transparent;
  text-align: left;
}
.technique-common-picker button:is(:hover, :focus-visible) { background-color: #f8e1b5a3; }
.technique-common-picker img { width: 30px; height: 30px; object-fit: contain; }
.technique-slot.is-filled:not(.is-previewed, .is-target) .technique-slot-demo > span:not(.technique-empty-mark) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.technique-remove {
  position: absolute;
  top: 3%;
  right: 3%;
  opacity: 0;
  padding: 0 .22em .08em;
  border: 0;
  border-radius: .24em;
  background: #faf0c9;
  color: #6d2a19;
  font-size: calc(25 * var(--u)) !important;
}
.technique-slot:hover .technique-remove, .technique-slot:focus-within .technique-remove { opacity: 1; }

@media (max-width: 760px), (max-height: 480px) {
  .technique-dialog { overflow-y: auto; }
  .technique-board {
    --u: 1px;
    --tree-u: calc(100cqw / 806);
    aspect-ratio: auto;
    padding: 5px;
    background: var(--dark-wood) #563522;
  }
  .technique-board::before, .technique-board::after { display: none; }
  .technique-header, .technique-page, .technique-workbench { display: block; }
  .technique-header { position: relative; height: 44px; }
  #technique-title { --x: unset; --y: 0; --w: 168; --h: 37; left: 50%; transform: translateX(-50%); }
  #technique-close { --x: unset; --y: 0; --w: 34; --h: 34; left: auto; right: 1%; }
  .technique-schools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .technique-tab {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
    padding: 1px 2px 5px;
    border-radius: 4px;
    color: #522a16;
    background: var(--cardboard-label) center / 100% 100% no-repeat #be8852;
  }
  .technique-tab::before {
    content: '';
    width: 89%;
    height: 38px;
    align-self: center;
    background: var(--portrait-mobile) center 26% / cover no-repeat;
    border-radius: 4px;
    clip-path: inset(0 0 2px round 3px);
  }
  .technique-tab[aria-selected='true'] { box-shadow: 0 0 0 1px #fff3bb, 0 0 4px 2px #e9a039; }
  .technique-tab-copy {
    display: block;
    position: static;
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    line-height: 1;
  }
  .technique-tab-copy strong { display: block; font-size: clamp(10px, 3vw, 17px); }
  .technique-tab-copy small { display: none; }
  .technique-tab[data-school='common'] { display: flex; padding: 1px 2px 5px; }
  .technique-tab[data-school='common']::before { width: 89%; height: 38px; background-size: 41px auto; }
  .technique-tab[data-school='common'] .technique-tab-copy strong { font-size: clamp(10px, 3vw, 17px); }
  .technique-tab[data-school='common'] .technique-tab-copy small { font-size: 10px; }
  .technique-theatre, .technique-tree-board, .technique-belt { position: relative; inset: auto; width: auto; height: auto; margin-top: 6px; }
  .technique-screen { height: auto; aspect-ratio: 694/604; }
  #technique-replay { font-size: clamp(11px, 3.2vw, 18px); }
  .technique-preview-caption { font-size: 13px; }
  .technique-tree-board { aspect-ratio: 788 / 612; }
  #technique-tree-title { font-size: max(11px, calc(29 * var(--tree-u))); }
  #technique-name { font-size: max(11px, calc(29 * var(--tree-u))); }
  .technique-dialog[data-long-title='true'] #technique-name { font-size: max(11px, calc(23 * var(--tree-u))); }
  .technique-study { height: 46%; padding: calc(12 * var(--tree-u)); }
  .technique-study-name { min-height: 34px; }
  #technique-show-scene { display: inline-block; white-space: nowrap; }
  .technique-study-actions button { min-height: 21px; }
  .technique-study:has(.technique-details:not([hidden])) { height: 74%; }
  .technique-stance-study:has(.technique-details:not([hidden])) {
    z-index: 4;
    inset: 5% 3% 3%;
    width: auto;
    height: auto;
    padding: 8px 11px;
  }
  .technique-stance-study:has(.technique-details:not([hidden])) .technique-study-name {
    grid-template-columns: 18% minmax(0, 1fr);
  }
  .technique-stance-study:has(.technique-details:not([hidden])) .technique-study-actions { flex-wrap: nowrap; }
  .technique-stance-study .technique-details { font-size: 12px; }
  #technique-summary { font-size: max(8px, calc(21 * var(--tree-u))); }
  .technique-belt { min-height: 87px; padding: 6px 8px 8px; background-size: 100% 100%; }
  .technique-belt-heading {
    position: static;
    width: 128px;
    height: 20px;
    margin: 0 auto 2px;
    background: url('assets/techniques/reference/loadout-plate.webp') center / 100% 100% no-repeat;
  }
  .technique-slots { position: static; width: auto; height: 47px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .technique-slot { height: 100%; border-radius: 6px; }
  .technique-slot-demo { gap: 2px; padding: 0 3px; }
  .technique-slot-demo img { width: min(34%, 32px); }
  .technique-slot-demo strong { font-size: 11px; }
  .technique-slot-demo small { font-size: 8px; }
  .technique-slot[data-long-label] .technique-slot-demo { padding-right: 15px; }
  .technique-remove { opacity: .95; font-size: 15px !important; }
}
@media (max-width: 370px) {
  .technique-study { padding-inline: 5px; }
  .technique-study-name { gap: 3%; }
  #technique-name { font-size: 10px; }
  #technique-summary { font-size: 8px; }
}

.technique-dialog[data-mentor-lesson] #technique-title {
  display: grid;
  place-items: center;
  background: var(--dark-wood) center / cover #5d3019;
  box-shadow: inset 0 0 0 2px #8d4a27, 0 .12em .34em #2c180e9c;
  border-radius: .36em;
  color: #ffe5af;
  font-size: max(15px, calc(43 * var(--u)));
  text-align: center;
}
.technique-dialog[data-mentor-lesson] #technique-title span,
.technique-dialog[data-mentor-lesson] #technique-belt-title {
  position: static;
  clip-path: none;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  white-space: normal;
}
.technique-dialog[data-mentor-lesson] .technique-belt-heading {
  display: grid;
  place-items: center;
  background: var(--cardboard-label) center / 100% 100% no-repeat #d9ab70;
  text-align: center;
}
.technique-dialog[data-mentor-lesson] #technique-belt-title {
  color: #482818;
  font-size: max(14px, calc(30 * var(--u)));
}
.technique-dialog[data-mentor-lesson] .technique-slots { grid-template-columns: repeat(var(--mentor-cards, 3), minmax(0, 1fr)); }
.technique-dialog .mentor-lesson-card {
  border: 0;
  color: #4f2817;
  background: url('assets/techniques/reference/dossier-range.webp') center / 100% 100% no-repeat;
}
.mentor-lesson-card .technique-slot-demo { gap: .32em; }
.mentor-lesson-card .technique-slot-demo strong { font-size: max(11px, calc(23 * var(--u))); }
.mentor-lesson-card .technique-slot-demo small { font-size: max(10px, calc(16 * var(--u))); }
@media (min-width: 761px) and (min-height: 481px) {
  .technique-slots[data-many-lessons] { width: 61%; inset-inline-start: 34%; }
  .technique-slots[data-many-lessons] .technique-slot-demo { padding-inline: .28em; }
  .technique-slots[data-many-lessons] .technique-slot-demo img { flex: 0 0 18%; }
  .technique-slots[data-many-lessons] .technique-slot-demo span { min-width: 0; }
  .technique-slots[data-many-lessons] .technique-slot-demo strong { font-size: max(11px, calc(18 * var(--u))); }
}
#technique-train:not([hidden]) {
  flex: 0 0 auto;
  margin-top: .35em;
  min-height: 30px;
  font-size: max(12px, calc(20 * var(--tree-u)));
}

@media (max-width: 760px), (max-height: 480px) {
  .technique-dialog[data-mentor-lesson] #technique-title { font-size: 20px; }
  .technique-dialog[data-mentor-lesson] .technique-study:has(#technique-train:not([hidden])) { min-height: 190px; }
  .technique-dialog[data-mentor-lesson] .technique-slots { height: auto; grid-template-columns: minmax(0, 1fr); }
  .technique-dialog[data-mentor-lesson] .technique-belt-heading { min-height: 34px; }
  .technique-dialog[data-mentor-lesson] #technique-belt-title { font-size: 16px; }
  .mentor-lesson-card { min-height: 44px; }
  .mentor-lesson-card .technique-slot-demo strong { font-size: 14px; }
}

@media (orientation: landscape) and (max-width: 1180px) and (max-height: 540px),
       (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .cardboard-game .technique-dialog {
    top: calc(var(--yard-visible-height, 100dvh) / 2);
    width: min(var(--mobile-modal-width, calc(100dvw - 24px)), var(--mobile-modal-height, var(--panel-height)) * 2.88);
    height: var(--mobile-modal-height, var(--panel-height));
    max-height: none;
    overflow: clip;
  }
  .technique-dialog .technique-board {
    --u: clamp(.45px, .1cqw, .72px);
    --tree-u: clamp(.43px, .08cqw, .68px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 3px;
    height: 100%;
    margin: 0;
    padding: 4px 7px 6px;
    aspect-ratio: auto;
    background: var(--dark-wood) #563522;
    border: 2px ridge #9e633c;
    border-radius: 10px;
  }
  .technique-dialog .technique-board::before,
  .technique-dialog .technique-board::after { display: none; }
  .technique-dialog .technique-header { position: relative; display: grid; place-items: center; height: 31px; }
  .technique-dialog #technique-title {
    inset: 0 auto auto 50%;
    width: min(43%, 215px);
    height: 100%;
    transform: translateX(-50%);
  }
  .technique-dialog[data-mentor-lesson] #technique-title { font-size: clamp(14px, 2.6cqw, 20px); }
  .technique-dialog #technique-close { inset: -2px 0 auto auto; width: 35px; height: 35px; }
  .technique-dialog .technique-schools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .technique-dialog .technique-tab {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(24px, 35%) minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    gap: 2px;
    width: 100%;
    height: auto;
    min-height: clamp(28px, 9dvh, 42px);
    padding: 2px 5px;
    border-radius: 4px;
    color: #522a16;
    background: var(--cardboard-label) center / 100% 100% no-repeat #be8852;
  }
  .technique-dialog .technique-tab::before {
    content: '';
    width: 100%;
    height: 100%;
    background: var(--portrait-mobile) center 25% / cover no-repeat;
    border-radius: 4px;
  }
  .technique-dialog .technique-tab[data-school='common']::before { background-size: contain; }
  .technique-dialog .technique-tab-copy {
    position: static;
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    clip-path: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .technique-dialog .technique-tab-copy strong { display: block; font-size: clamp(11px, 2.1cqw, 17px); }
  .technique-dialog .technique-tab[data-school='common'] .technique-tab-copy strong { font-size: clamp(11px, 2.1cqw, 17px); }
  .technique-dialog .technique-tab-copy small { display: none; }
  .technique-dialog .technique-tab[data-school='common'] .technique-tab-copy small { display: block; font-size: clamp(9px, 1.4cqw, 12px); }
  .technique-dialog .technique-page { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; gap: 3px; }
  .technique-dialog .technique-workbench { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.28fr); min-height: 0; gap: 4px; }
  .technique-dialog :is(.technique-theatre, .technique-tree-board, .technique-belt) {
    position: relative;
    inset: auto;
    margin: 0;
    width: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
  }
  .technique-dialog .technique-screen { height: 100%; aspect-ratio: auto; }
  .technique-dialog .technique-screen canvas { object-fit: contain; }
  .technique-dialog #technique-replay { width: auto; min-height: 28px; font-size: clamp(11px, 1.9cqw, 16px); }
  .technique-dialog .technique-preview-caption { top: 8%; font-size: clamp(10px, 1.65cqw, 13px); }
  .technique-dialog #technique-tree-title { min-height: 15px; font-size: clamp(11px, 1.8cqw, 15px); }
  .technique-dialog #technique-tree-title:has(.technique-teacher-location:not([hidden])) { min-height: 26px; }
  .technique-dialog .technique-tree-board:has(.technique-details:not([hidden])) #technique-tree-title { visibility: hidden; }
  .technique-dialog .technique-tiers li { font-size: clamp(10px, 1.75cqw, 14px); }
  .technique-dialog .technique-study { top: 14%; height: auto; max-height: 83%; padding: 4px 7px; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) {
    inset: 9% 2% 3%;
    width: auto;
    height: auto;
    max-height: none;
    padding: 5px 8px;
  }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) .technique-study-name { grid-template-columns: minmax(28px, 12%) minmax(0, 1fr) auto; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) .technique-study-actions { grid-area: 1 / 3; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) #technique-name { grid-area: 1 / 2; }
  .technique-dialog .technique-study-name { min-height: 0; }
  .technique-dialog #technique-name { font-size: clamp(12px, 1.9cqw, 16px); }
  .technique-dialog #technique-show-scene { display: none; }
  .technique-dialog #technique-details-toggle { min-height: 24px; font-size: 11px; }
  .technique-dialog #technique-cost,
  .technique-dialog #technique-summary { font-size: clamp(11px, 1.7cqw, 14px); }
  .technique-dialog .technique-facts { margin: 2px 0; padding: 2px 0; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) .technique-facts { display: flex; justify-content: start; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) #technique-cost { min-width: auto; }
  .technique-dialog .technique-details {
    margin-top: 2px;
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: clamp(11px, 1.7cqw, 14px);
  }
  .technique-dialog .technique-belt { display: grid; min-height: 44px; padding: 3px 5px; }
  .technique-dialog .technique-belt-heading { display: none; }
  .technique-dialog .technique-slots {
    position: static;
    grid-template-columns: repeat(var(--mentor-cards, 3), minmax(0, 1fr));
    width: 100%;
    height: 100%;
    gap: 4px;
  }
  .technique-dialog .technique-slot { min-height: 36px; }
  .technique-dialog :is(.technique-slot-demo strong, .mentor-lesson-card .technique-slot-demo strong) { font-size: clamp(10px, 1.7cqw, 14px); }
  .technique-dialog .technique-common-picker:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    width: min(24rem, 100%);
    max-height: none;
    overflow: visible;
  }

  .technique-dialog[data-mentor-lesson] .technique-page {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 5px;
  }
  .technique-dialog[data-mentor-lesson] .technique-workbench { display: contents; }
  .technique-dialog[data-mentor-lesson] .technique-theatre { grid-area: 1 / 1 / -1 / 2; }
  .technique-dialog[data-mentor-lesson] .technique-belt {
    grid-area: 1 / 2;
    min-height: 0;
    padding: 4px 5px;
  }
  .technique-dialog[data-mentor-lesson] .technique-belt-heading { display: none; }
  .technique-dialog[data-mentor-lesson] .technique-slots {
    height: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
  }
  .technique-dialog[data-mentor-lesson] .mentor-lesson-card {
    height: auto;
    min-height: clamp(34px, 10dvh, 47px);
  }
  .technique-dialog[data-mentor-lesson] .technique-slot-demo {
    justify-content: center;
    padding: 2px 4px;
  }
  .technique-dialog[data-mentor-lesson] .technique-slot-demo img { max-width: 29%; }
  .technique-dialog[data-mentor-lesson] .technique-slot-demo small { font-size: 9px; }
  .technique-dialog[data-mentor-lesson] .technique-tree-board {
    grid-area: 2 / 2;
    background: none;
  }
  .technique-dialog[data-mentor-lesson] :is(#technique-tree-title, .technique-tiers, .technique-index, .technique-links) { display: none; }
  .technique-dialog[data-mentor-lesson] .technique-study {
    inset: 0;
    width: auto;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: clamp(5px, 2.1dvh, 10px) 9px;
  }
  .technique-dialog[data-mentor-lesson] .technique-study:has(.technique-details:not([hidden])) {
    inset: 0;
    height: 100%;
    max-height: none;
  }
  .technique-dialog[data-mentor-lesson] .technique-study:has(#technique-train:not([hidden])) { min-height: 0; }
  .technique-dialog[data-mentor-lesson] .technique-study::before { display: none; }
  .technique-dialog[data-mentor-lesson] .technique-study-name {
    grid-template: auto / 24px minmax(0, 1fr) auto;
    column-gap: 5px;
  }
  .technique-dialog[data-mentor-lesson] .technique-study-name .technique-emblem { height: 25px; }
  .technique-dialog[data-mentor-lesson] .technique-study-actions { grid-area: 1 / 3; }
  .technique-dialog[data-mentor-lesson] #technique-details-toggle { white-space: nowrap; }
  .technique-dialog[data-mentor-lesson] .technique-facts {
    display: flex;
    align-items: center;
    justify-content: start;
    text-align: left;
  }
  .technique-dialog[data-mentor-lesson] #technique-cost { min-width: 0; }
  .technique-dialog[data-mentor-lesson] .technique-choice-info { flex-wrap: wrap; }
  .technique-dialog[data-mentor-lesson] #technique-train:not([hidden]) {
    align-self: end;
    margin-top: auto;
    min-height: clamp(25px, 8dvh, 33px);
    padding-inline: 12px;
  }

  .technique-dialog .technique-details[data-stance-pages] [data-technique-detail]:not([data-current]),
  .technique-dialog:has(.technique-slots[data-many-lessons]) .technique-details [data-technique-detail]:not([data-current]) { display: none; }
  .technique-dialog .technique-details[data-stance-pages]:not([hidden]) .technique-details-pager,
  .technique-dialog:has(.technique-slots[data-many-lessons]) .technique-details:not([hidden]) .technique-details-pager { display: flex; }
  .technique-details-pager {
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
    font: bold 10px/1.1 'Trebuchet MS', sans-serif;
  }
  .technique-details-pager button {
    min-width: 25px;
    height: 19px;
    padding: 0 4px;
    border: 1px solid #94633b;
    border-radius: 3px;
    background: #efd7aa;
    font: bold 15px/1 Georgia, serif;
  }
  .technique-details-pager button:disabled { opacity: .48; }
}

@media (orientation: landscape) and (max-width: 1180px) and (max-height: 350px) {
  .technique-dialog .technique-header { height: 25px; }
  .technique-dialog .technique-tab { min-height: 26px; }
  .technique-dialog .technique-tab-copy strong,
  .technique-dialog .technique-tab[data-school='common'] .technique-tab-copy strong { font-size: clamp(10px, 1.65cqw, 14px); }
  .technique-dialog .technique-tab[data-school='common'] .technique-tab-copy small { font-size: 8px; }
  .technique-dialog .technique-belt { min-height: 37px; }
  .technique-dialog .technique-slot { min-height: 31px; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) { inset: 8% 1% 2%; padding: 4px 7px; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) .technique-emblem { max-height: 24px; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) #technique-details-toggle { min-height: 22px; }
  .technique-dialog .technique-study:has(.technique-details:not([hidden])) #technique-summary { min-height: 0; }
  .technique-dialog .technique-choice-info { margin-top: 2px; }
  .technique-dialog .technique-details { font-size: 11px; }
  .technique-dialog[data-mentor-lesson] .technique-tab { padding-inline: 2px; }
  .technique-dialog[data-mentor-lesson] .mentor-lesson-card { min-height: 30px; }
  .technique-dialog[data-mentor-lesson] .technique-slot-demo { gap: 2px; }
  .technique-dialog[data-mentor-lesson] .technique-slot-demo img { width: 20px; height: 20px; flex: 0 0 20px; }
  .technique-dialog[data-mentor-lesson] .technique-slot-demo strong { font-size: clamp(9px, 1.55cqw, 12px); }
  .technique-dialog[data-mentor-lesson] .technique-slot-demo small { font-size: 8px; }
  .technique-dialog[data-mentor-lesson] .technique-slots[data-many-lessons] {
    grid-template-columns: repeat(var(--mentor-cards), minmax(0, 1fr));
  }
  .technique-dialog[data-mentor-lesson] .technique-slots[data-many-lessons] img { display: none; }
  .technique-dialog[data-mentor-lesson] .technique-facts { margin-block: 1px; }
  .technique-dialog[data-mentor-lesson] :is(#technique-summary, .technique-details) { line-height: 1.13; }

  .technique-dialog[data-mentor-lesson] .technique-study {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    column-gap: 3px;
    padding-block: 4px;
  }
  .technique-dialog[data-mentor-lesson] .technique-study-name { grid-column: 1 / -1; }
  .technique-dialog[data-mentor-lesson] .technique-facts { grid-area: 2 / 1 / 3 / -1; flex-wrap: wrap; }
  .technique-dialog[data-mentor-lesson] .technique-study:has(#technique-train:not([hidden])) .technique-facts { grid-column: 1; }
  .technique-dialog[data-mentor-lesson] #technique-train:not([hidden]) {
    grid-area: 2 / 2;
    align-self: center;
    min-height: 24px;
    margin: 0;
  }
  .technique-dialog[data-mentor-lesson] .technique-choice-info { grid-area: 3 / 1 / 4 / -1; }
  .technique-dialog[data-mentor-lesson] .technique-details { grid-area: 4 / 1 / 5 / -1; }
  .technique-dialog[data-mentor-lesson] #technique-status { grid-area: 5 / 1 / 6 / -1; }
}

@media (orientation: landscape) and (max-height: 300px) {
  .technique-dialog[data-mentor-lesson] .technique-page { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
  .technique-dialog[data-mentor-lesson] .technique-study,
  .technique-dialog[data-mentor-lesson] .technique-study:has(.technique-details:not([hidden])) { padding: 2px 7px; }
  .technique-dialog[data-mentor-lesson] :is(.technique-slots, .technique-belt) { gap: 3px; }
  .technique-dialog[data-mentor-lesson] .technique-details [data-technique-detail]:not([data-current]) { display: none; }
  .technique-dialog[data-mentor-lesson] .technique-details:not([hidden]) .technique-details-pager { display: flex; }
  .technique-dialog[data-mentor-lesson] .technique-study:has(.technique-details-pager) .technique-study-name {
    padding-inline-end: 89px;
  }
  .technique-dialog[data-mentor-lesson] .technique-study:has(.technique-details-pager) #technique-details-toggle,
  .technique-dialog[data-mentor-lesson] .technique-study:has(.technique-details:not([hidden])) .technique-choice-info,
  .technique-dialog[data-mentor-lesson] .technique-stance-lifetime,
  .technique-dialog[data-mentor-lesson] .technique-details-counter > span { display: none; }
  .technique-dialog[data-mentor-lesson] .technique-details-pager {
    position: absolute;
    inset: 4px 7px auto auto;
    min-height: 24px;
    margin: 0;
  }
  .technique-dialog[data-mentor-lesson] .technique-details-pager button { height: 17px; }
}

@media (orientation: landscape) and (max-width: 1180px) and (max-height: 540px) {
  html[data-mobile-game] .technique-dialog .technique-header { height: 44px; }
  html[data-mobile-game] .technique-dialog #technique-close { width: 44px; height: 44px; }
  html[data-mobile-game] .technique-dialog .technique-tab { min-height: 40px; }
  html[data-mobile-game] .technique-dialog #technique-replay { min-height: 44px; }
  html[data-mobile-game] .technique-dialog .technique-slot { min-height: 44px; }
  html[data-mobile-game] .technique-dialog[data-mentor-lesson] .technique-board { grid-template-rows: auto minmax(0, 1fr); }
  html[data-mobile-game] .technique-dialog[data-mentor-lesson] .technique-schools { display: none; }
  html[data-mobile-game] .technique-dialog[data-mentor-lesson] #technique-train { min-height: 44px; }
}
