@font-face { font-family: Cinzel; src: url(/h/Cinzel.8991f6262b.woff2) format("woff2"); font-weight: 400 900; }
@font-face { font-family: CormorantI; src: url(/h/CormorantItalic.d88ef1957c.woff2) format("woff2"); font-weight: 300 700; }
@font-face { font-family: Shippori; src: url(/h/ShipporiMincho-Regular.34344375ca.woff2) format("woff2"); font-weight: 400; }
@font-face { font-family: Shippori; src: url(/h/ShipporiMincho-Bold.6591104d14.woff2) format("woff2"); font-weight: 700; }
:root { --ui-bottom: 0px;   /* reserved bottom band (the council cards, W6): the dock, corner, key and compass sit above it; labels avoid it */ --ink: #121917; --paper: rgba(26,34,33,.9); --paper-2: rgba(36,46,45,.92); --line: rgba(143,160,156,.32); --line-hi: rgba(196,203,200,.55);
  --seal: #7a1a12; --seal-hi: #9b2a1f; --ease: cubic-bezier(.2,.7,.2,1); --t-fast: .18s; --t-mid: .28s; --t-slow: .42s; --t-reveal: .7s; --f-latin: Cinzel, serif; --f-ital: CormorantI, serif; --f-ja: Shippori, serif;
  --text: #c4cbc8; --hair: rgba(143,160,156,.6); --red: #64130d; --red-hi: #7e221b; --gold: #a1875a; --gold-d: #70603f; --sea: #2b474d; }
* { box-sizing: border-box; }
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; margin: 0; height: 100%; overflow: hidden; background: var(--sea); color: var(--text); font-family: Cinzel, serif; }
#view, #view canvas { position: fixed; inset: 0; display: block; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#grain { position: fixed; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  box-shadow: inset 0 0 160px rgba(10,16,15,.45); }
#frame { position: fixed; inset: 1.6vh; border: 1px solid var(--hair); pointer-events: none; }


/* the compass sits in the corner above the help/settings buttons, pale ink on a faint glass disc: legible over the
   dark land up close as well as over the sea (dark ink in mid-screen vanished over close-range terrain) */
#compass { position: fixed; right: 22px; bottom: calc(74px + var(--ui-bottom)); width: 62px; height: 62px; border: 1.2px solid rgba(210,216,212,.55); border-radius: 50%; font-family: Shippori; color: rgba(222,227,223,.82); font-size: 14px; pointer-events: auto; cursor: pointer; transform-origin: 50% 50%;
  background: radial-gradient(circle, rgba(22,30,29,.34), rgba(22,30,29,.18) 70%, transparent 72%); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
#compass span { position: absolute; transform: translate(-50%, -50%); }
#compass .n { left: 50%; top: 22%; } #compass .s { left: 50%; top: 78%; } #compass .e { left: 78%; top: 50%; } #compass .w { left: 22%; top: 50%; }
#compass i { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%);
  background: linear-gradient(#182120, #182120) center/1px 100% no-repeat, linear-gradient(#182120, #182120) center/100% 1px no-repeat; }


/* --- map labels ------------------------------------------------------------ */
.lbl { position: absolute; left: 0; top: 0; will-change: transform, opacity; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.lbl.on { opacity: 1; visibility: visible; transition: opacity .35s; }
.region { display: flex; align-items: center; gap: 8px; transform-origin: 0 50%; }
.region .medal { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #b8a06e, var(--gold) 55%, #8b744b);
  box-shadow: inset 0 0 0 2px var(--gold-d), 0 2px 6px rgba(0,0,0,.35); display: grid; place-items: center; pointer-events: auto; cursor: pointer; }
.region .medal.diamond { border-radius: 4px; transform: rotate(45deg) scale(.82); }
.region .medal.diamond i { transform: rotate(-45deg); }
.region .medal i { width: 72%; height: 72%; background: #5e4d30; opacity: .85; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.region .seal { position: relative; font-family: Shippori; font-weight: 700; color: #ece4dd; background: var(--red); writing-mode: vertical-rl;
  font-size: 20px; line-height: 1.04; padding: 9px 5px; letter-spacing: .02em; box-shadow: inset 0 0 6px rgba(0,0,0,.35);
  -webkit-mask: linear-gradient(transparent, #000 6%, #000 94%, transparent); }
.region .name { font-weight: 500; font-size: 21px; letter-spacing: .12em; text-shadow: 0 0 2px rgba(14,20,19,.9), 0 0 10px rgba(14,20,19,.75), 0 0 22px rgba(14,20,19,.45); }
.place { display: flex; align-items: flex-end; gap: 4px; transform-origin: 100% 100%; }
.place .kj { writing-mode: vertical-rl; font-family: Shippori; font-size: 12px; border: 1px solid var(--hair); padding: 3px 1px; background: rgba(40,52,51,.35); }
.place .en { font-size: 10px; letter-spacing: .14em; padding-bottom: 2px; text-shadow: 0 0 2px rgba(14,20,19,.9), 0 0 8px rgba(14,20,19,.6); }
.place.castle .en { font-family: CormorantI; font-weight: 600; font-size: 11.5px; font-style: italic; }
.place .tick { position: absolute; right: -6px; bottom: -6px; width: 5px; height: 5px; border-radius: 50%; background: var(--text); }
.place, .province { pointer-events: auto; cursor: pointer; }
.province { font-family: Shippori; font-size: 13px; letter-spacing: .3em; color: rgba(214,222,219,.78); text-shadow: 0 0 5px rgba(20,28,27,.7); writing-mode: vertical-rl; transform-origin: 50% 50%; }
.sea { text-align: center; color: rgba(196, 214, 208, .5); text-shadow: 0 0 12px rgba(10, 30, 34, .35); }
.sea .kj { font-family: Shippori; writing-mode: vertical-rl; font-size: 24px; letter-spacing: .08em; margin: 0 auto 6px; }
.sea .en { font-size: 10px; letter-spacing: .28em; }

#card { position: fixed; right: 3.5vw; top: 13vh; width: min(380px, 92vw); max-height: 74vh; overflow: auto; background: rgba(30,40,39,.94);
  border: 1px solid var(--hair); padding: 18px 18px 14px; font-family: Shippori, serif; font-size: 14px; line-height: 1.6; color: #d3d9d6; }
#card h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: .08em; }
#card .en { font-family: Cinzel; font-size: 12px; letter-spacing: .14em; margin: 2px 0 10px; color: #aeb8b4; }
#card h3 { font-family: Cinzel; font-size: 11px; letter-spacing: .2em; color: #c9796d; margin: 14px 0 4px; }
#card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; } #card dt { color: #93a09c; } #card dd { margin: 0; }
#card .src { margin-top: 12px; font-size: 11px; color: #8b9893; word-break: break-word; }
#card .conf { font-family: Cinzel; font-size: 10px; border: 1px solid currentColor; border-radius: 8px; padding: 0 6px; margin-left: 6px; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--sea); font-family: Shippori; font-size: 22px; letter-spacing: .4em; transition: opacity 1s; z-index: 9; }
#loading.done { opacity: 0; pointer-events: none; }


#shafts { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 214deg at 100% 0%, rgba(214,200,140,0) 0deg, rgba(214,200,140,.07) 2.2deg, rgba(214,200,140,0) 5deg, rgba(214,200,140,0) 9deg);
  -webkit-mask: radial-gradient(circle at 100% 0%, #000 10%, transparent 75%); mask: radial-gradient(circle at 100% 0%, #000 10%, transparent 75%); }
body[data-look=dusk] #shafts { opacity: .5; }   /* toned down: a frame device, not a feature */
body[data-look=dusk] { --sea: #262a2c; }
body[data-look=dusk] #grain { box-shadow: inset 0 0 220px rgba(5,7,8,.7); }
body[data-look=dusk] .sea { color: #8d9192; }
body[data-look=dusk] #compass { border-color: rgba(190,196,196,.5); color: #c9cdcd; }
body[data-look=dusk] #compass i { background: linear-gradient(#c9cdcd, #c9cdcd) center/1px 100% no-repeat, linear-gradient(#c9cdcd, #c9cdcd) center/100% 1px no-repeat; }

.region .name small { display: block; font-size: 10px; letter-spacing: .22em; opacity: .75; margin-top: 3px; }
.region.t2 .medal { width: 34px; height: 34px; } .region.t2 .seal { font-size: 16px; padding: 7px 4px; } .region.t2 .name { font-size: 16px; }

.note { display: flex; align-items: center; gap: 8px; pointer-events: auto; cursor: pointer; }
.note .cap { display: flex; flex-direction: column; gap: 2px; text-shadow: 0 0 2px rgba(14,20,19,.9), 0 0 8px rgba(14,20,19,.6); }
.note .cap em { font-family: CormorantI; font-style: italic; font-weight: 600; font-size: 13px; letter-spacing: .14em; }
.note .cap span { font-family: Cinzel; font-size: 9px; letter-spacing: .14em; opacity: .8; }
.note .cap.korea { align-items: center; text-align: center; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 5px 8px; background: rgba(30,40,39,.35); }
.note .cap.korea b { font-family: Shippori; font-weight: 700; font-size: 15px; letter-spacing: .3em; color: #d8a99f; }

#card ul.blades { list-style: none; padding: 0; margin: 4px 0 0; }
#card ul.blades li { padding: 6px 0; border-top: 1px solid rgba(143,160,156,.25); }
#card ul.blades b { font-weight: 700; letter-spacing: .06em; } #card ul.blades i { opacity: .75; }
#card ul.blades .sub { font-size: 11.5px; color: #93a09c; margin-top: 2px; }

#labels, #labels * { pointer-events: none !important; }
#card, #card * { -webkit-user-select: text; user-select: text; }
img, svg { -webkit-user-drag: none; }

.road { display: flex; align-items: baseline; gap: 6px; transform-origin: 50% 50%; text-shadow: 0 0 2px rgba(14,20,19,.95), 0 0 8px rgba(14,20,19,.7); }
.road .kj { font-family: Shippori; font-size: 12px; letter-spacing: .18em; color: #dcdccf; }
.road .en { font-family: CormorantI; font-style: italic; font-weight: 600; font-size: 11px; letter-spacing: .16em; color: #c9cdc2; }
.road.sea-lane .kj, .road.sea-lane .en { color: #b9c6c2; }

#realms { position: fixed; inset: 0; pointer-events: none !important; overflow: hidden; transition: opacity .3s; }
.realm { position: absolute; left: 0; top: 0; white-space: nowrap; display: flex; flex-direction: column; align-items: center; line-height: 1; pointer-events: none;
  color: rgba(246,240,226,.92); text-shadow: 0 0 2px rgba(10,12,12,.9), 0 0 9px rgba(10,12,12,.55); }
.realm .re { font-family: Cinzel; font-weight: 600; }
.realm .rj { font-family: Shippori; font-weight: 700; font-size: .42em; letter-spacing: .5em; margin-bottom: .15em; opacity: .85; }

.realm .mon { width: .95em; height: .95em; margin-bottom: .12em; background: rgba(246,240,226,.9); -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat;
  filter: drop-shadow(0 0 2px rgba(10,12,12,.9)); }


[hidden] { display: none !important; }
.place.modelled .tick { display: none; }   /* a modelled castle carries its own mark */

/* ============================================================ minimal chrome (2026-11-04 UI pass)
   at rest: a quiet mark, the compass, one seal (views) and two tiny corner glyphs (keys, settings) */
#mark { position: fixed; top: calc(1.6vh + 14px); left: calc(1.6vh + 16px); display: flex; align-items: baseline; gap: 10px; pointer-events: none;
  font: 500 13px/1 var(--f-latin); letter-spacing: .32em; color: rgba(196,203,200,.82); text-shadow: 0 0 6px rgba(14,20,19,.6); transition: opacity .4s; }
#mark span { font: 12px/1 var(--f-ja); letter-spacing: .18em; opacity: .7; }
button { -webkit-tap-highlight-color: transparent; }
#dock { position: fixed; left: calc(1.6vh + 16px); bottom: calc(1.6vh + 16px + var(--ui-bottom)); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; z-index: 5; transition: opacity .4s; }
#seal { width: 44px; height: 44px; border: 0; padding: 0; cursor: pointer; background: var(--seal); color: #efe6de; font: 700 19px/1 var(--f-ja);
  box-shadow: inset 0 0 0 1px rgba(255,220,200,.14), inset 0 0 8px rgba(0,0,0,.35), 0 2px 10px rgba(0,0,0,.3); border-radius: 3px; display: grid; place-items: center;
  transition: transform .25s var(--ease), background .2s; }
#seal i { font-style: normal; letter-spacing: -.05em; }
#seal:hover, #dock.open #seal { background: var(--seal-hi); }
#dock .stack { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px;
  opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .2s var(--ease), transform .25s var(--ease); backdrop-filter: blur(6px); }
#dock.open .stack { opacity: 1; transform: none; pointer-events: auto; }
#dock .stack button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--text); cursor: pointer; padding: 6px 10px 6px 6px; border-radius: 2px; text-align: left; }
#dock .stack button i { width: 30px; height: 26px; display: grid; place-items: center; font: 700 14px/1 var(--f-ja); font-style: normal; border: 1px solid var(--line); border-radius: 2px; }
#dock .stack button span { font: 500 11px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
#dock .stack button:hover { background: rgba(196,203,200,.07); }
#dock .stack button.on i { background: var(--seal); border-color: var(--seal-hi); color: #f2e9e1; }
#dock .stack hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
#corner { position: fixed; right: calc(1.6vh + 16px); bottom: calc(1.6vh + 16px + var(--ui-bottom)); display: flex; gap: 8px; z-index: 5; transition: opacity .4s; }
#corner button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-hi); background: rgba(26,34,33,.55); color: var(--text);
  font: 600 13px/1 var(--f-ja); cursor: pointer; opacity: .62; transition: opacity .2s, background .2s; }
#corner button:hover, #corner button.on { opacity: 1; background: var(--paper); }
#legendchip { position: fixed; left: calc(1.6vh + 76px); bottom: calc(1.6vh + 22px + var(--ui-bottom)); font: 500 10px/1.3 var(--f-latin); letter-spacing: .14em; color: rgba(196,203,200,.85);
  text-shadow: 0 0 5px rgba(14,20,19,.8); pointer-events: none; transition: opacity .3s; display: flex; gap: 14px; align-items: center; }
#legendchip i { display: inline-block; width: 9px; height: 9px; border-radius: 1px; margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
#legendchip .ramp { width: 70px; height: 6px; border-radius: 1px; background: linear-gradient(90deg, #4b4f49, #8e7a48, #d3ad55); display: inline-block; margin: 0 6px; vertical-align: 0; }

/* sheets (settings, help) */
.sheet { position: fixed; right: calc(1.6vh + 16px); bottom: calc(1.6vh + 58px); width: min(340px, calc(100vw - 32px)); max-height: min(72vh, 620px); overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 3px; color: var(--text); z-index: 6; backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0,0,0,.35); animation: rise var(--t-mid) var(--ease); scrollbar-width: thin; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: inherit; }
.sheet h2 { margin: 0; font: 700 17px/1 var(--f-ja); letter-spacing: .1em; }
.sheet h2 span { font: 500 10px/1 var(--f-latin); letter-spacing: .24em; text-transform: uppercase; margin-left: 8px; opacity: .65; }
.x { border: 0; background: none; color: var(--text); font: 300 22px/1 var(--f-latin); cursor: pointer; opacity: .6; padding: 0 2px; }
.x:hover { opacity: 1; }
.tabs { display: flex; gap: 2px; padding: 8px 12px 0; }
.tabs button { flex: 1; border: 0; background: none; color: var(--text); font: 500 10px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; padding: 8px 0 9px;
  border-bottom: 1px solid transparent; cursor: pointer; opacity: .55; }
.tabs button.on { opacity: 1; border-bottom-color: var(--seal-hi); } .tabs button { transition: opacity var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease); } .tabs button:hover { opacity: .85; }
.tab { padding: 6px 16px 10px; }
.tab h4 { margin: 16px 0 6px; font: 500 9.5px/1 var(--f-latin); letter-spacing: .22em; text-transform: uppercase; color: #b9a77e; }
.tab h4:first-child { margin-top: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font: 13px/1.3 var(--f-ja); letter-spacing: .03em; cursor: pointer; }
.row small { display: block; margin-top: 1px; font: italic 12px/1.3 var(--f-ital); letter-spacing: .01em; text-transform: none; opacity: .6; }
.sw { position: relative; flex: none; width: 28px; height: 14px; border-radius: 7px; background: rgba(196,203,200,.12); box-shadow: inset 0 0 0 1px rgba(143,160,156,.3); transition: background var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease); }
.sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #8f9c98; transition: transform var(--t-mid) var(--ease), background var(--t-mid) var(--ease); }
.row input { display: none; }
/* on: a quiet gilt track, not a red alarm */
.row input:checked + .sw { background: rgba(161,135,90,.42); box-shadow: inset 0 0 0 1px rgba(201,168,95,.55); } .row input:checked + .sw::after { transform: translateX(14px); background: #ece4cf; }
.row:hover .sw { box-shadow: inset 0 0 0 1px rgba(196,203,200,.5); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; flex: none; }
.seg button { border: 0; background: none; color: var(--text); font: 500 10px/1 var(--f-latin); letter-spacing: .1em; padding: 6px 8px; cursor: pointer; opacity: .65; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: rgba(161,135,90,.3); opacity: 1; color: #f0e7d2; }
.row input[type=range] { display: block; width: 120px; accent-color: var(--gold); }
.row output { font: 500 10px var(--f-latin); letter-spacing: .1em; width: 34px; text-align: right; opacity: .7; }
.sheet footer { padding: 6px 16px 14px; border-top: 1px solid var(--line); }
.sheet footer button { border: 1px solid var(--line); background: none; color: var(--text); font: 500 10px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; padding: 8px 10px; cursor: pointer; opacity: .7; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0; padding: 14px 16px 16px; font: 13px/1.35 var(--f-ja); }
.keys dt { font: 500 11px/1.4 var(--f-latin); letter-spacing: .08em; white-space: nowrap; opacity: .85; }
kbd { display: inline-block; min-width: 20px; padding: 2px 5px; border: 1px solid var(--line-hi); border-bottom-width: 2px; border-radius: 3px; text-align: center; font: 600 10.5px/1.2 var(--f-latin); }
.keys dd { margin: 0; opacity: .85; }

/* hover tooltip */
#tip { position: fixed; left: 0; top: 0; pointer-events: none; padding: 5px 9px 6px; font: 12px/1.35 var(--f-ja); color: #e7ebe8; background: rgba(18,24,23,.86);
  border: 1px solid var(--line); border-radius: 2px; z-index: 8; white-space: nowrap; transition: opacity .12s; }
#tip b { font: 600 11px/1.3 var(--f-latin); letter-spacing: .12em; }
#tip .k { opacity: .6; font-size: 11px; }
#tip i { display: inline-block; width: 8px; height: 8px; border-radius: 1px; margin-right: 6px; vertical-align: 0; }

/* panels (castle card now; the domain card later): shared tokens */
.panel, #card { position: fixed; right: calc(1.6vh + 16px); top: calc(1.6vh + 16px); width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 3.2vh - 92px); overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 10px 40px rgba(0,0,0,.35); backdrop-filter: blur(8px); z-index: 6;
  animation: rise var(--t-mid) var(--ease); scrollbar-width: thin; }
#card { padding: 18px 18px 14px; font-family: var(--f-ja); font-size: 14px; line-height: 1.6; color: #d3d9d6; }
#card-x { position: absolute; top: 8px; right: 10px; }
body.hideui #mark, body.hideui #dock, body.hideui #corner, body.hideui #compass, body.hideui #legendchip, body.hideui .sheet { opacity: 0 !important; pointer-events: none !important; }
body[data-look=dusk] { --paper: rgba(22,25,27,.92); --line: rgba(160,166,166,.28); }
@media (max-width: 640px) {
  #compass { display: none; }
  .sheet, .panel, #card { left: 12px; right: 12px; width: auto; bottom: 12px; top: auto; max-height: 64vh; }
  #dock { left: 14px; bottom: calc(14px + var(--ui-bottom)); } #corner { right: 14px; bottom: calc(14px + var(--ui-bottom)); }
  #legendchip { left: 70px; bottom: calc(26px + var(--ui-bottom)); right: 90px; flex-wrap: wrap; gap: 4px 10px; font-size: 9px; }
}
#dock .stack button kbd { margin-left: auto; padding-left: 14px; border: 0; min-width: 0; opacity: .35; font: 500 9.5px/1 var(--f-latin); }

/* ============================================================ domain card (web/card.js) */
#dpanel.domain { width: min(404px, calc(100vw - 32px)); padding: 0; color: var(--text); font: 13px/1.5 var(--f-ja); overflow-x: hidden;
  --e: #5f9478; --w: #a2565a; --s: #a08a5a; --n: #8b908a; }
#dpanel.domain.enter .dc > * { animation: cardIn var(--t-slow) var(--ease) both; }
#dpanel.domain.enter .dc > *:nth-child(2) { animation-delay: .04s; } #dpanel.domain.enter .dc > *:nth-child(3) { animation-delay: .08s; }
#dpanel.domain.enter .dc > *:nth-child(4) { animation-delay: .12s; } #dpanel.domain.enter .dc > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
#dpanel .px { position: absolute; top: 10px; right: 12px; z-index: 2; }
#dpanel .dc { padding: 18px 20px 14px; }
#dpanel .ja { font-family: var(--f-ja); } #dpanel .ro { font: 500 10.5px/1.3 var(--f-latin); letter-spacing: .12em; color: #aab5b1; }
#dpanel .age { font: 500 10px var(--f-latin); opacity: .55; letter-spacing: .06em; }
#dpanel small { display: block; font: 10px/1.35 var(--f-latin); letter-spacing: .06em; opacity: .55; margin-top: 1px; }
#dpanel a, #dpanel [data-realm] { cursor: pointer; color: inherit; text-decoration: none; }
#dpanel a { border-bottom: 1px solid var(--line-hi); }
/* crest medallion: gilt disc with the house mon cut in */
.crest { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #c2aa76, var(--gold) 52%, #84704a); box-shadow: inset 0 0 0 2px var(--gold-d), inset 0 0 10px rgba(60,44,20,.35), 0 3px 10px rgba(0,0,0,.35); }
.crest i { width: 70%; height: 70%; background: #4f4029; opacity: .88; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.crest.plain { background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--c, #5d6463) 70%, #fff 12%), var(--c, #5d6463)); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25), 0 3px 10px rgba(0,0,0,.3); }
.crest.plain b { font: 700 24px/1 var(--f-ja); color: rgba(240,234,224,.9); }
.crest.sm { width: 26px; height: 26px; box-shadow: inset 0 0 0 1px var(--gold-d); } .crest.sm.plain b { font-size: 12px; }
#dpanel .hd { display: flex; gap: 14px; align-items: center; padding-right: 22px; }
#dpanel .nm h2 { margin: 0; font: 700 25px/1.1 var(--f-ja); letter-spacing: .12em; color: #e6ebe8; }
#dpanel .nm > .ro { margin-top: 4px; font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: #c9cfcc; }
#dpanel .nm > .ro span { font: 11px var(--f-ja); letter-spacing: .1em; text-transform: none; opacity: .55; margin-left: 6px; }
#dpanel .lord { margin-top: 6px; font-size: 14px; color: #dfe4e1; } #dpanel .lord .ro { margin-left: 4px; }
#dpanel .ttl { margin-top: 2px; font: 12px/1.4 var(--f-ja); color: #a9b3af; letter-spacing: .04em; }
/* the three numbers that matter */
#dpanel .stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#dpanel .st { padding: 10px 8px 9px; text-align: center; } #dpanel .st + .st { border-left: 1px solid var(--line); }
#dpanel .st b { display: block; font: 700 19px/1.15 var(--f-ja); color: #e8ece9; letter-spacing: .04em; }
#dpanel .st span { display: block; margin-top: 3px; font: 500 9px/1.3 var(--f-latin); letter-spacing: .14em; text-transform: uppercase; opacity: .62; }
#dpanel .st span em { font-style: normal; color: #d8c08a; opacity: 1; }
#dpanel .st.hi b { color: #f0dfb4; }
#dpanel .st.side b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 1px; margin-right: 7px; vertical-align: 3px; background: var(--n); }
#dpanel .st.side.e b::before { background: var(--e); } #dpanel .st.side.w b::before { background: var(--w); } #dpanel .st.side.s b::before { background: linear-gradient(90deg, var(--e) 50%, var(--w) 50%); }
/* tabs */
#dpanel .tb { display: flex; margin: 12px -6px 2px; overflow-x: auto; scrollbar-width: none; }
#dpanel .tb button { flex: 1 0 auto; border: 0; background: none; color: var(--text); cursor: pointer; padding: 7px 7px 8px; border-bottom: 1px solid transparent; opacity: .5;
  font: 500 9px/1 var(--f-latin); letter-spacing: .14em; text-transform: uppercase; transition: opacity .15s, border-color .2s; }
#dpanel .tb button span { display: block; font: 700 13px/1 var(--f-ja); letter-spacing: .1em; margin-bottom: 4px; text-transform: none; }
#dpanel .tb button:hover { opacity: .8; } #dpanel .tb button.on { opacity: 1; border-bottom-color: var(--seal-hi); }
#dpanel .pane { padding-top: 6px; animation: cardIn var(--t-mid) var(--ease); }
#dpanel h4 { margin: 18px 0 8px; font: 500 10px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: #93a09c; display: flex; align-items: baseline; gap: 8px; }
#dpanel h4 span { font: 500 12px/1 var(--f-ja); letter-spacing: .05em; color: #b9a77e; text-transform: none; }
#dpanel h4 i { font-style: normal; opacity: .6; margin-left: auto; }
#dpanel .kv { display: grid; grid-template-columns: 74px 1fr; gap: 7px 12px; margin: 10px 0 0; }
#dpanel .kv dt { font: 500 9px/1.5 var(--f-latin); letter-spacing: .14em; text-transform: uppercase; opacity: .55; }
#dpanel .kv dt span { display: block; font: 12px/1.2 var(--f-ja); letter-spacing: .1em; text-transform: none; opacity: .9; }
#dpanel .kv dd { margin: 0; align-self: center; }
#dpanel .cf { font: 600 11px/1 var(--f-latin); color: #c9a85f; margin-left: 5px; cursor: help; opacity: .85; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { border: 1px solid var(--line); border-radius: 2px; padding: 3px 7px 3px; font: 12.5px/1.2 var(--f-ja); }
.chip.w { border-color: var(--line-hi); background: rgba(196,203,200,.06); }
.chip small { display: inline !important; margin-left: 5px; }
/* resources: eight glyphs with three pips */
.res { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rs { border: 1px solid var(--line); border-radius: 2px; padding: 6px 4px 5px; text-align: center; }
.rs i { display: block; font: 700 15px/1 var(--f-ja); font-style: normal; color: #e2d6b8; }
.rs em { display: block; font: 500 8px/1 var(--f-latin); letter-spacing: .14em; text-transform: uppercase; font-style: normal; opacity: .55; margin-top: 4px; }
.rs .pips { display: flex; gap: 3px; justify-content: center; margin-top: 5px; }
.rs .pips b { width: 9px; height: 3px; border-radius: 1px; background: rgba(196,203,200,.16); } .rs .pips b.on { background: #c9ab6a; }
.rs.none { opacity: .38; } .rs.none i { color: var(--text); }
#dpanel .nt { margin: 6px 0; font-size: 12.5px; line-height: 1.55; color: #c8cfcc; }
#dpanel .nt b { font: 500 9px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: #a9b3af; margin-right: 6px; }
#dpanel .fine { font: 11px/1.45 var(--f-ital); font-style: italic; letter-spacing: .02em; opacity: .55; margin: 10px 0 2px; }
/* economy grid */
.econ { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); margin-top: 8px; }
.ec { position: relative; padding: 9px 4px 8px; border-bottom: 1px solid var(--line); }
.ec:nth-child(odd) { padding-right: 12px; border-right: 1px solid var(--line); } .ec:nth-child(even) { padding-left: 12px; }
.ec > span { display: block; font: 12px/1.1 var(--f-ja); letter-spacing: .08em; opacity: .85; }
.ec > span em { display: block; font: 500 8.5px/1.4 var(--f-latin); letter-spacing: .12em; text-transform: uppercase; font-style: normal; opacity: .55; margin-top: 2px; }
.ec b { display: block; font: 600 16px/1.2 var(--f-latin); letter-spacing: .04em; color: #e6ebe8; margin-top: 4px; }
.ec b small { display: inline !important; margin-left: 6px; font-weight: 500; }
.ec .cf { position: absolute; top: 10px; right: 8px; }
ul.ls { list-style: none; margin: 0; padding: 0; } ul.ls li { padding: 5px 0 5px 12px; position: relative; font-size: 12.5px; line-height: 1.5; border-top: 1px solid rgba(143,160,156,.16); }
ul.ls li::before { content: ''; position: absolute; left: 1px; top: 12px; width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }
/* people / relations / castles */
ul.ppl, ul.rel, ul.cas, ul.dh { list-style: none; margin: 0; padding: 0; }
ul.ppl li { padding: 7px 0; border-top: 1px solid rgba(143,160,156,.16); }
ul.ppl .pn { font-size: 14px; } ul.ppl .pr { font-size: 12px; color: #b4bdb9; line-height: 1.45; margin-top: 1px; } ul.ppl .pk { font: 11.5px/1.4 var(--f-ja); color: #d8c08a; margin-top: 2px; }
ul.rel li, ul.cas li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; border-top: 1px solid rgba(143,160,156,.16); border-radius: 2px; transition: background .15s; }
ul.rel li[data-realm]:hover, ul.cas li:hover, .hold:hover { background: rgba(196,203,200,.06); }
ul.rel li > div, ul.cas li > div { flex: 1; min-width: 0; }
.rn { font-size: 14px; } .rt { font-size: 11.5px; color: #b4bdb9; } .rt em { font-style: normal; opacity: .7; }
.re { font: 11px/1.45 var(--f-ja); color: #93a09c; margin-top: 2px; }
ul.cas li { cursor: pointer; align-items: center; }
.ct { flex: none; width: 10px; height: 10px; border: 1.5px solid #b9c2be; transform: rotate(45deg); margin: 0 4px 0 2px; } .ct.seat { background: var(--gold); border-color: #d8c08a; }
.go { opacity: 0; font: 13px var(--f-latin); transition: opacity .15s; color: #d8c08a; } li:hover > .go, .hold:hover > .go { opacity: .9; }
#dpanel .prov { margin-top: 14px; padding-top: 9px; border-top: 1px solid var(--line); font: 10px/1.5 var(--f-latin); letter-spacing: .04em; color: #7f8d89; word-break: break-word; }
/* district strip */
.ds { margin: -4px 0 14px; padding: 0 22px 12px 0; border-bottom: 1px solid var(--line); }
.only-district .ds { border-bottom: 0; margin-bottom: 0; }
.dn b { font: 700 20px/1.1 var(--f-ja); letter-spacing: .12em; color: #e6ebe8; } .dn span { margin-left: 10px; font: 500 9.5px var(--f-latin); letter-spacing: .18em; text-transform: uppercase; opacity: .6; }
.nohold { margin: 8px 0 0; font: 13px/1.5 var(--f-ital); font-style: italic; letter-spacing: .02em; color: #b9c2be; }
ul.dh li { padding: 4px 0 0; font-size: 13px; }
.shared { margin-top: 6px; font: 500 9.5px/1.6 var(--f-latin); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.shared a { font: 13px var(--f-ja); letter-spacing: .04em; text-transform: none; }
.dres { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.dres span { border: 1px solid var(--line); border-radius: 2px; padding: 3px 7px; font: 10.5px/1.3 var(--f-latin); letter-spacing: .04em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dres i { font: 700 12px var(--f-ja); font-style: normal; color: #e2d6b8; margin-right: 6px; }
.hold { display: flex; gap: 10px; align-items: center; padding: 9px 6px; margin-top: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.hold > div { flex: 1; font-size: 14px; } .hold small { display: block !important; }
#dpanel .hd.place h2 { font-size: 23px; }
body[data-look=dusk] .crest i { background: #3e331f; }
@media (max-width: 640px) {
  #dpanel.domain { width: auto; max-height: 62vh; border-radius: 10px 10px 3px 3px; }
  #dpanel.domain::before { content: ''; display: block; width: 38px; height: 4px; border-radius: 2px; background: rgba(196,203,200,.28); margin: 8px auto 0; }
  #dpanel .dc { padding: 10px 16px 12px; } .crest { width: 48px; height: 48px; } #dpanel .nm h2 { font-size: 21px; }
  #dpanel .st b { font-size: 16px; } .res { grid-template-columns: repeat(4, 1fr); }
  #dpanel .tb { margin: 10px -10px 2px; } #dpanel .tb button { flex: 1 1 0; min-width: 0; padding: 7px 2px 8px; letter-spacing: .02em; font-size: 8px; }   /* five tabs fit a 390 px sheet */
}
#dpanel .st span.k { margin-top: 2px; opacity: .45; letter-spacing: .1em; } #dpanel .st span.k em { color: #d8c08a; font-style: normal; }
#dpanel .st sup { font: 600 9px var(--f-latin); opacity: .55; margin-left: 2px; }
#dpanel .nt b { display: block; margin-bottom: 1px; }
#compass { transition: opacity .25s; }
body:has(#dpanel:not([hidden])) #compass, body:has(#card:not([hidden])) #compass, body:has(#settings:not([hidden])) #compass { opacity: 0; }   /* never under an open sheet */
/* source drawer: a quiet 源 after a clean line; the research text opens beneath it */
:is(#dpanel, #ftree) .srcb { all: unset; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px; vertical-align: 1px; border: 1px solid rgba(201, 168, 95, .28); border-radius: 50%;
  font: 9px/1 var(--f-ja); color: #a8946a; cursor: pointer; opacity: .55; transition: opacity .2s, background .2s; }
:is(#dpanel, #ftree) .srcb:hover, :is(#dpanel, #ftree) .srcb:focus-visible, :is(#dpanel, #ftree) .srcb.on { opacity: 1; background: rgba(201, 168, 95, .14); }
:is(#dpanel, #ftree) .src, .p5 details.ev[open] { margin: 6px 0 2px; padding: 8px 11px 8px 12px; border-left: 1px solid rgba(201, 168, 95, .45);
  background: linear-gradient(90deg, rgba(221, 208, 178, .085), rgba(221, 208, 178, .035)); border-radius: 0 2px 2px 0;
  font: 11.5px/1.6 var(--f-ja); color: #b9b4a6; animation: page var(--t-mid) var(--ease) both; white-space: normal; transform-origin: 0 0; }
@keyframes page { from { opacity: 0; transform: translateY(-2px) scaleY(.96); } to { opacity: 1; transform: none; } }
:is(#dpanel, #ftree) .src p { margin: 0 0 4px; } :is(#dpanel, #ftree) .src p:last-child { margin: 0; }
#dpanel .fine.est { margin: 0 0 10px; }
#dpanel .fine.est .cf { margin: 0 4px 0 0; }
#dpanel .prov.ent { display: flex; align-items: center; flex-wrap: wrap; }
#dpanel .prov.ent .src { flex-basis: 100%; }
body[data-look="dusk"] :is(#dpanel, #ftree) .src, body[data-look="dusk"] .p5 details.ev[open] { color: #a9adab; border-left-color: rgba(201,168,95,.3);; background: rgba(0, 0, 0, .22); }
/* the 源 sits at the row's right edge, never on a line of its own */
#dpanel .ppl li, #dpanel .rel li, #dpanel .cas li, #dpanel .ls li, #dpanel .kv dd, #dpanel .nt.ent, #dpanel .dh li { position: relative; padding-right: 24px; }
#dpanel .ppl li > .srcb, #dpanel .rel li .srcb, #dpanel .cas li .srcb, #dpanel .ls li > .srcb, #dpanel .kv dd > .srcb, #dpanel .nt.ent > .srcb, #dpanel .dh li > .srcb { position: absolute; right: 0; top: 3px; margin: 0; }
#dpanel .cas li .srcb { right: 22px; }
/* ---------------------------------------------------------------- family (一族) and portraits */
.face { all: unset; position: relative; flex: none; display: block; cursor: zoom-in; border-radius: 50%; overflow: hidden; background: #2a3332;
  box-shadow: inset 0 0 0 1px rgba(201,168,95,.55), 0 0 0 2px rgba(20,26,25,.9), 0 0 0 3px rgba(161,135,90,.45), 0 3px 10px rgba(0,0,0,.35); transition: box-shadow .2s, transform .2s var(--ease); }
.face img { display: block; width: 100%; height: 100%; object-fit: cover; filter: sepia(.12) saturate(.82) contrast(1.02); }   /* a light grade toward the slate palette; the artwork itself is untouched */
.face:hover, .face:focus-visible { box-shadow: inset 0 0 0 1px rgba(216,192,138,.9), 0 0 0 2px rgba(20,26,25,.9), 0 0 0 3px rgba(216,192,138,.7), 0 4px 12px rgba(0,0,0,.4); }
.face.s { width: 30px; height: 30px; } .face.m { width: 44px; height: 44px; } .face.l { width: 86px; height: 86px; } .face.h { width: 50px; height: 50px; }
.face .at { position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; font: 700 8px/1 var(--f-ja); font-style: normal;
  color: #e9dfc6; background: rgba(60,52,36,.92); box-shadow: 0 0 0 1px rgba(201,168,95,.6); }
.face.l .at { width: 20px; height: 20px; font-size: 11px; right: 2px; bottom: 2px; }
.face.disputed { box-shadow: inset 0 0 0 1px rgba(201,168,95,.35), 0 0 0 2px rgba(20,26,25,.9), 0 0 0 3px rgba(143,160,156,.35), 0 3px 10px rgba(0,0,0,.35); }
.face.disputed .at { background: rgba(46,54,53,.94); color: #c9cfcc; box-shadow: 0 0 0 1px rgba(143,160,156,.6); }
.crest.xs { width: 15px; height: 15px; display: inline-grid; vertical-align: -3px; margin-right: 4px; box-shadow: inset 0 0 0 1px var(--gold-d); } .crest.xs.plain b { font-size: 8px; }
#dpanel .hdc { position: relative; flex: none; width: 76px; height: 58px; } #dpanel .hdc .crest { position: absolute; left: 0; top: 0; }
#dpanel .hdc .face.h { position: absolute; right: 0; bottom: -4px; }
ul.ppl .prk { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 2px; } ul.ppl .prk .pr { margin-top: 0; min-width: 0; } ul.ppl .prk .pk { margin-top: 0; flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
ul.ppl li.wf { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; } ul.ppl li.wf > .face { grid-row: span 3; margin-top: 2px; }
/* the lord */
.fm-lord { display: flex; gap: 16px; align-items: flex-start; margin: 8px 0 4px; }
.fl-face { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; } .fl-face .crest { width: 86px; height: 86px; }
.pcred { font: italic 11px/1.3 var(--f-ital); letter-spacing: 0; color: #8a9793; text-align: center; max-width: 110px; text-wrap: balance; }
.pcred span { font-family: var(--f-ja); color: #c9b78f; cursor: help; }
.fl-t { flex: 1; min-width: 0; padding-top: 4px; } .fl-t .pn .ja { font: 700 20px/1.15 var(--f-ja); letter-spacing: .1em; color: #e6ebe8; }
.fl-t > .ro { margin-top: 3px; font-size: 10.5px !important; letter-spacing: .2em !important; text-transform: uppercase; }
.fl-l { display: flex; gap: 12px; margin-top: 7px; font: 500 10px var(--f-latin); letter-spacing: .08em; color: #9aa6a2; } .fl-l b { font: 600 15px var(--f-latin); color: #e6ebe8; margin-right: 3px; }
.fl-p { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font: 12px/1.4 var(--f-ja); color: #b4bdb9; }
/* a person row */
.pr { position: relative; display: flex; gap: 10px; align-items: center; padding: 6px 26px 6px 0; }
.pr > .crest.sm { width: 30px; height: 30px; opacity: .8; }
.pr .pt { flex: 1; min-width: 0; } .pr .pn { font-size: 13.5px; line-height: 1.3; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.pr .pn .ro { font-size: 9.5px !important; letter-spacing: .1em !important; }
.pr .pl { display: flex; flex-wrap: wrap; gap: 0 8px; font: 11px/1.45 var(--f-ja); color: #a9b3af; margin-top: 1px; }
.pr .pl .rl { color: #c4cbc8; } .pr .pl .mo { color: #b9a77e; } .pr .pl .stt { color: #93a09c; }
.pr .lf { flex: none; text-align: right; font: 500 9.5px/1.25 var(--f-latin); letter-spacing: .06em; color: #8f9c98; min-width: 34px; }
.pr .lf b { display: block; font: 600 15px/1.1 var(--f-latin); color: #e2e7e4; } .pr .lf .dd { display: block; color: #9a8f86; } .pr .lf .sp { display: block; opacity: .7; }
.pr > .srcb { position: absolute; right: 0; top: 9px; margin: 0 !important; }
.pr.gone { opacity: .52; } .pr.gone .face img { filter: grayscale(.7) sepia(.15); }
.pr.isheir .pn .ja { color: #f0dfb4; }
.tg { display: inline-flex; align-items: center; font: 500 9px/1 var(--f-latin); letter-spacing: .08em; padding: 2px 5px 2px; border-radius: 2px; border: 1px solid var(--line); color: #c4cbc8; white-space: nowrap; }
.tg.heir { font: 700 10px/1 var(--f-ja); letter-spacing: .1em; color: #f0dfb4; border-color: rgba(216,192,138,.55); background: rgba(161,135,90,.14); }
.tg.ad { font: 700 10px/1 var(--f-ja); color: #b4bdb9; }
a.tg { border-bottom: 1px solid var(--line) !important; cursor: pointer; font-family: var(--f-ja); font-size: 10.5px; letter-spacing: .04em; } a.tg:hover { border-color: var(--line-hi) !important; background: rgba(196,203,200,.06); }
.tg.out { color: #d8c08a; }
/* succession */
.fm-succ { border: 1px solid var(--line); border-radius: 3px; padding: 4px 10px 8px; background: rgba(0,0,0,.1); }
.fm-succ .nohold { margin: 8px 0 4px; }
.sx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.fl { display: inline-flex; align-items: center; gap: 6px; font: 500 9.5px/1 var(--f-latin); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px;
  background: rgba(162,86,90,.18); border: 1px solid rgba(162,86,90,.5); color: #e2c4c3; } .fl b { font: 700 11px/1 var(--f-ja); letter-spacing: .1em; text-transform: none; }
.fl.aged_lord { background: rgba(160,138,90,.14); border-color: rgba(160,138,90,.45); color: #e1d3b0; }
.sec { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; cursor: help; font: 500 9.5px var(--f-latin); letter-spacing: .14em; text-transform: uppercase; }
.sec .pips { display: flex; gap: 3px; } .sec .pips b { width: 12px; height: 4px; border-radius: 1px; background: rgba(196,203,200,.16); }
.sec.l3 .pips b.on { background: #7fa98f; } .sec.l2 .pips b.on { background: #b3a26c; } .sec.l1 .pips b.on, .sec.l0 .pips b.on { background: #b26a68; }
.sec em { font-style: normal; color: #dfe4e1; } .sec i { font: italic 10px var(--f-ital); letter-spacing: .02em; text-transform: none; opacity: .55; }
ul.rk { margin-top: 6px; } ul.rk li { font-size: 11.5px; color: #b4bdb9; }
/* spouses */
ul.fm-sp { list-style: none; margin: 0; padding: 0; } ul.fm-sp > li { position: relative; border-top: 1px solid rgba(143,160,156,.16); }
ul.fm-sp > li[data-realm]:hover { background: rgba(196,203,200,.04); }
ul.fm-sp > li.sub { padding: 8px 0 2px; font: 500 9px/1 var(--f-latin); letter-spacing: .2em; text-transform: uppercase; color: #8f9c98; border: 0; }
ul.fm-sp .orig { position: absolute; right: 26px; top: 8px; font: 10.5px var(--f-ja); color: #b9a77e; }
/* the lineage tree: an ink spine with branches (系図) */
.fm-tree .me { margin: 4px 0 0; padding: 2px 8px; border: 1px solid rgba(216,192,138,.35); border-radius: 3px; background: rgba(161,135,90,.08); }
.fm-tree .me .pr { padding-right: 0; }
ul.tr { list-style: none; margin: 0 0 0 14px; padding: 0 0 0 14px; border-left: 1px solid rgba(196,203,200,.28); }
ul.tr > li { position: relative; } ul.tr > li::before { content: ''; position: absolute; left: -14px; top: 21px; width: 11px; border-top: 1px solid rgba(196,203,200,.28); }
ul.tr > li:last-child::after { content: ''; position: absolute; left: -15px; top: 22px; bottom: 0; width: 2px; background: #1d2625; }
ul.tr.up { border-left-style: dashed; margin-bottom: 4px; } ul.tr.flat { border-left: 0; margin-left: 0; padding-left: 0; } ul.tr.flat > li::before, ul.tr.flat > li::after { display: none; }
ul.tr.kids { margin-top: 0; }
ul.tr ul.tr { margin-left: 15px; }
.spo { margin: -3px 0 4px 40px; display: flex; flex-wrap: wrap; gap: 2px 10px; font: 11px/1.3 var(--f-ja); color: #a99a78; }
button.fx { all: unset; display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; margin: 6px 0 2px; padding: 6px 2px; cursor: pointer;
  font: 500 9.5px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: #a9b3af; border-top: 1px solid rgba(143,160,156,.16); }
button.fx i { font-style: normal; margin-left: auto; opacity: .6; } button.fx::after { content: '+'; font: 13px/1 var(--f-latin); opacity: .6; } button.fx.on::after { content: '−'; }
button.fx:hover { color: #e6ebe8; } button.fx.sm { margin: -2px 0 2px 40px; width: auto; padding: 3px 2px; border: 0; font-size: 8.5px; color: #8f9c98; }
body[data-look=dusk] ul.tr > li:last-child::after { background: #1a1c1e; }
/* full portrait */
#plb { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(8,12,11,.72); backdrop-filter: blur(2px); }
#plb[hidden] { display: none; }
#plb.in figure { animation: cardIn var(--t-slow) var(--ease) both; }
#plb figure { position: relative; margin: 0; max-width: min(92vw, 720px); max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 18px 14px;
  background: var(--paper); border: 1px solid var(--hair); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
#plb .frame { padding: 8px; background: #1b2221; box-shadow: inset 0 0 0 1px rgba(201,168,95,.45), 0 0 0 1px rgba(20,26,25,1); }
#plb img { display: block; max-width: 100%; max-height: 68vh; object-fit: contain; filter: sepia(.06) saturate(.92); }
#plb figcaption { width: 100%; max-width: 560px; text-align: center; color: var(--text); }
#plb .pn .ja { font: 700 19px/1.2 var(--f-ja); letter-spacing: .12em; color: #e6ebe8; } #plb .pn .ro { font: 500 10.5px var(--f-latin); letter-spacing: .2em; text-transform: uppercase; color: #aab5b1; margin-left: 8px; }
#plb .pa { margin-top: 6px; font: 12px/1.45 var(--f-ital); font-style: italic; color: #c9b78f; } #plb .pa b { font: 700 11px var(--f-ja); font-style: normal; margin-right: 4px; }
#plb .pa.disputed { color: #b4bdb9; }
#plb .pm { margin-top: 4px; font: 10px var(--f-latin); letter-spacing: .1em; color: #8f9c98; }
#plb .pc { margin-top: 6px; font: 10px/1.45 var(--f-latin); letter-spacing: .02em; color: #8f9c98; word-break: break-word; } #plb .pc a { color: #b9a77e; text-decoration: none; border-bottom: 1px solid rgba(185,167,126,.4); }
#plb .px { position: absolute; top: 8px; right: 10px; }
@media (max-width: 640px) {
  .fm-lord { gap: 12px; } .fl-face { width: 76px; } .face.l, .fl-face .crest { width: 68px; height: 68px; } .fl-t .pn .ja { font-size: 18px; }
  ul.tr { margin-left: 8px; padding-left: 12px; } ul.tr > li::before { left: -12px; width: 9px; } ul.tr > li:last-child::after { left: -13px; }
  #plb figure { padding: 12px 10px 10px; } #plb img { max-height: 58vh; }
}
/* tabs: every kanji always fits; only the active (or hovered) tab spells its English beneath — no overflow, no shift */
#dpanel .tb { overflow: visible; margin: 14px 0 2px; border-bottom: 1px solid rgba(143,160,156,.16); }
#dpanel .tb button { flex: 1 1 0; min-width: 0; padding: 8px 0 9px; margin-bottom: -1px; letter-spacing: .08em; font-size: 8.5px; transition: opacity var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease); }
#dpanel .tb button em { display: block; font-style: normal; white-space: nowrap; opacity: 0; transform: translateY(-2px); transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease); }
#dpanel .tb button.on em, #dpanel .tb button:hover em, #dpanel .tb button:focus-visible em { opacity: 1; transform: none; }
.pr .pl .stt { flex-basis: 100%; }
.pr { align-items: flex-start; } .pr > .face, .pr > .crest { margin-top: 1px; } .pr .pt, .pr .pl { text-align: left; } .pr .lf { padding-top: 2px; }
ul.tr > li::before { top: 22px; } ul.tr > li:last-child::after { top: 23px; }

/* ---- house title: the main name on one line, the alternative name small */
#dpanel .nm h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dpanel .nm h2 small.alt { display: block; margin-top: 3px; font: 500 11px/1.2 var(--f-ja); letter-spacing: .14em; color: #9aa6a2; white-space: normal; }

/* ---- the compact 一族 tab: rows of small portraits */
ul.mini { list-style: none; margin: 4px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px 6px; }
ul.mini li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
ul.mini li .face.m, ul.mini li .crest { width: 44px; height: 44px; }
ul.mini li.gone { opacity: .55; } ul.mini li.gone img { filter: grayscale(.8) sepia(.15); }
ul.mini li.isheir .face, ul.mini li.isheir .crest { box-shadow: 0 0 0 1px rgba(20,26,25,.9), 0 0 0 2px rgba(216,192,138,.85); }
ul.mini .sl { position: absolute; top: 30px; left: calc(50% + 12px); font: 700 8px/1 var(--f-ja); padding: 2px 3px; color: #f1e6cf; background: var(--seal); border-radius: 2px; }
ul.mini .mj { margin-top: 5px; font: 600 11.5px/1.2 var(--f-ja); color: #dfe5e2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.mini .ma { font: 9.5px/1.3 var(--f-ital); font-style: italic; color: #93a09c; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-face[data-ftree] { cursor: pointer; }
.ftbtn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; margin: 14px 0 4px; padding: 10px 14px; border: 1px solid rgba(201,168,95,.45);
  border-radius: 3px; background: linear-gradient(180deg, rgba(161,135,90,.14), rgba(161,135,90,.05)); color: #e6ddc8; font: 600 11px/1 var(--f-latin); letter-spacing: .2em; text-transform: uppercase; transition: background .2s, border-color .2s; }
.ftbtn span { font: 700 14px/1 var(--f-ja); letter-spacing: .1em; color: #d8c08a; text-transform: none; }
.ftbtn i { margin-left: auto; font: 11px var(--f-ital); font-style: italic; letter-spacing: 0; text-transform: none; color: #a9b2ae; }
.ftbtn:hover, .ftbtn:focus-visible { background: rgba(161,135,90,.2); border-color: rgba(216,192,138,.75); }

/* ---- the family tree overlay */
#ftree { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; background: rgba(8,12,11,.62); }
#ftree[hidden] { display: none; }
#ftree.in .ft-win { animation: cardIn var(--t-slow) var(--ease) both; }
.ft-win { position: relative; width: min(1320px, 94vw); height: min(820px, 90vh); display: flex; flex-direction: column; background: rgba(22,29,28,.97);
  box-shadow: inset 0 0 0 1px rgba(143,160,156,.32), 0 0 0 1px rgba(10,14,13,.9), 0 24px 70px rgba(0,0,0,.55); border-radius: 3px; overflow: hidden; color: var(--text); }
.ft-h { display: flex; align-items: center; gap: 14px; padding: 12px 16px 10px 18px; border-bottom: 1px solid var(--line); }
.ft-t { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.ft-t h3 { margin: 0; font: 700 21px/1.1 var(--f-ja); letter-spacing: .14em; color: #e6ebe8; white-space: nowrap; }
.ft-t h3 small { margin-left: 10px; font: 500 11px var(--f-ja); letter-spacing: .12em; color: #95a19d; }
.ft-t .ro { margin-top: 3px; font: 500 9.5px var(--f-latin); letter-spacing: .22em; text-transform: uppercase; color: #9aa6a2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-b { display: flex; gap: 6px; }
.ft-b button { all: unset; cursor: pointer; padding: 6px 10px; border: 1px solid var(--line); border-radius: 2px; font: 600 9.5px/1 var(--f-latin); letter-spacing: .18em; text-transform: uppercase; color: #c4cbc8; }
.ft-b button:hover, .ft-b button.on { border-color: rgba(216,192,138,.6); color: #e6ddc8; background: rgba(161,135,90,.1); }
.ft-b button.x { font: 300 20px/1 var(--f-latin); padding: 2px 8px 4px; letter-spacing: 0; }
.ft-b button[hidden] { display: none; }
.ft-body { position: relative; flex: 1; display: flex; min-height: 0; }
.ft-vp { position: relative; flex: 1; overflow: hidden; cursor: grab; touch-action: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(64,78,76,.22), rgba(0,0,0,0) 70%); }
.ft-vp:active { cursor: grabbing; }
.ft-w { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.ft-w.anim { transition: transform .55s var(--ease); }
.ft-l { position: absolute; overflow: visible; pointer-events: none; }
.ft-l path { fill: none; stroke: rgba(196,203,200,.42); stroke-width: 1.2; }
.ft-l path.mr { stroke: rgba(216,192,138,.75); stroke-width: 1.4; }
.ft-l path.cs { stroke: rgba(216,192,138,.38); stroke-dasharray: 1 0; }
.ft-l path.bt { stroke: rgba(216,192,138,.7); stroke-dasharray: 1.5 4; stroke-linecap: round; stroke-width: 1.6; }
.ft-l path.ad { stroke-dasharray: 5 4; stroke: rgba(196,203,200,.5); }
.ft-l path.vt { stroke: rgba(196,203,200,.16); }
.ft-l path.hf { stroke-dasharray: 2 3; }
.ft-n { position: absolute; left: 0; top: 0; }
.tn { position: absolute; left: 0; top: 0; width: 100px; height: 128px; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; }
.tn .ring { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: visible; background: #26302f;
  box-shadow: 0 0 0 1px rgba(14,19,18,.95), 0 0 0 2.5px rgba(201,168,95,.62), 0 5px 14px rgba(0,0,0,.45); transition: box-shadow .2s, transform .2s; }
.tn .ring img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: sepia(.12) saturate(.82) contrast(1.02); pointer-events: none; }
.tn .ring .crest { width: 64px; height: 64px; border-radius: 50%; }
.tn .ring .at { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 700 9px/1 var(--f-ja); font-style: normal;
  background: rgba(46,54,53,.96); color: #d8c08a; box-shadow: 0 0 0 1px rgba(201,168,95,.6); }
.tn.sp .ring { width: 54px; height: 54px; margin-top: 5px; } .tn.sp .ring .crest { width: 54px; height: 54px; }
.tn.lord .ring { width: 74px; height: 74px; margin-top: -5px; box-shadow: 0 0 0 1px rgba(14,19,18,.95), 0 0 0 3px rgba(225,200,142,.95), 0 0 0 5px rgba(14,19,18,.7), 0 0 22px rgba(216,192,138,.25), 0 6px 18px rgba(0,0,0,.5); }
.tn.lord .ring .crest { width: 74px; height: 74px; }
.tn.dead .ring img, .tn.dead .ring .crest { filter: grayscale(.92) sepia(.12) brightness(.82); }
.tn.dead .ring { box-shadow: 0 0 0 1px rgba(14,19,18,.95), 0 0 0 2px rgba(143,160,156,.35), 0 4px 12px rgba(0,0,0,.4); }
.tn.dead .nj, .tn.dead .nr { opacity: .62; }
.tn:hover .ring { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(14,19,18,.95), 0 0 0 2.5px rgba(232,212,160,.95), 0 8px 18px rgba(0,0,0,.5); }
.tn.on .ring { box-shadow: 0 0 0 1px rgba(14,19,18,.95), 0 0 0 3px #e8d4a0, 0 0 0 6px rgba(216,192,138,.22), 0 8px 20px rgba(0,0,0,.5); }
.tn .seal { position: absolute; top: 46px; left: 66px; font: 700 9px/1 var(--f-ja); padding: 3px 4px; color: #f3e9d2; background: var(--seal); border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.45); letter-spacing: .05em; }
.tn .mos { position: absolute; top: 2px; left: 64px; display: flex; gap: 2px; }
.tn .mos .mo { display: block; cursor: pointer; } .tn .mos .crest.xs { width: 18px; height: 18px; box-shadow: 0 0 0 1px rgba(14,19,18,.9); }
.tn .nj { margin-top: 7px; font: 600 12.5px/1.2 var(--f-ja); letter-spacing: .06em; color: #e2e8e5; max-width: 112px; } .tn .nj.lg { font-size: 11px; letter-spacing: .02em; }
.tn .nr { margin-top: 2px; font: 500 7.6px/1.25 var(--f-latin); letter-spacing: .1em; text-transform: uppercase; color: #95a19d; max-width: 104px; overflow-wrap: anywhere; }
.tn .na { margin-top: 3px; font: 500 9.5px/1.2 var(--f-latin); letter-spacing: .06em; color: #b3a682; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.tn.dead .na { color: #8d9894; }
.tn .more { all: unset; position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); cursor: pointer; padding: 2px 7px; border: 1px solid rgba(201,168,95,.5); border-radius: 9px; font: 600 9px/1.2 var(--f-latin); color: #d8c08a; background: rgba(22,29,28,.95); }
.ft-key { position: absolute; left: 14px; bottom: 10px; display: flex; gap: 14px; font: 9.5px var(--f-ital); font-style: italic; color: #8f9c98; pointer-events: none; }
.ft-key i { display: inline-block; width: 18px; height: 0; margin-right: 5px; vertical-align: middle; border-top: 1.4px solid rgba(216,192,138,.75); }
.ft-key i.k-b { border-top-style: dotted; } .ft-key i.k-a { border-top: 1.2px dashed rgba(196,203,200,.6); }
.ft-key b { font: 700 9px var(--f-ja); font-style: normal; margin-right: 4px; color: #b9a77e; } .ft-key b.sz { color: #f3e9d2; background: var(--seal); padding: 1px 3px; border-radius: 2px; }
.ft-side { width: 330px; flex: none; overflow-y: auto; border-left: 1px solid var(--line); padding: 14px 16px; background: rgba(18,24,23,.6); position: relative; font: 13px/1.5 var(--f-ja); }
.ft-side[hidden] { display: none; }
.ft-side.in { animation: cardIn var(--t-mid) var(--ease) both; }
.ft-side .x { all: unset; cursor: pointer; position: absolute; right: 10px; top: 6px; font: 300 18px/1 var(--f-latin); color: #aab5b1; }
.ft-side dl { margin: 14px 0 0; } .ft-side dt { display: flex; align-items: baseline; gap: 7px; font: 500 10px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: #93a09c; margin-bottom: 7px; }
.ft-side dt .hj { font: 500 11.5px/1 var(--f-ja); letter-spacing: .05em; color: #b9a77e; }
.ft-side dd { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.pchip { all: unset; cursor: pointer; padding: 3px 8px; border: 1px solid var(--line); border-radius: 12px; font: 12px var(--f-ja); color: #d6ddda; }
.pchip:hover { border-color: rgba(216,192,138,.6); } .pchip.dead { color: #8f9c98; }
.hchip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: 12px var(--f-latin); color: #d8c08a; }
.ft-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; padding: 6px 10px; border-radius: 2px; background: rgba(12,17,16,.95); box-shadow: 0 0 0 1px rgba(143,160,156,.35), 0 6px 18px rgba(0,0,0,.45);
  font: 12px/1.35 var(--f-ja); color: #e6ebe8; white-space: nowrap; }
.ft-tip span { font: 500 9px var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: #9aa6a2; } .ft-tip div { font: 10.5px var(--f-ital); font-style: italic; color: #b3a682; }
.ft-tip[hidden] { display: none; }
/* phone: generation by generation */
#ftree.narrow .ft-win { width: 100vw; height: 100dvh; border-radius: 0; }
#ftree.narrow .ft-body { flex-direction: column; }
#ftree.narrow .ft-vp { overflow-y: auto; cursor: auto; touch-action: auto; }
#ftree.narrow .ft-w, #ftree.narrow .ft-n { position: static; transform: none !important; }
#ftree.narrow .ft-l, #ftree.narrow .ft-key, #ftree.narrow [data-ft="fit"] { display: none; }
#ftree.narrow section { padding: 10px 12px 4px; } #ftree.narrow h5 { margin: 0 0 8px; font: 500 9.5px var(--f-latin); letter-spacing: .2em; text-transform: uppercase; color: #8f9c98; }
#ftree.narrow .strip { display: flex; flex-wrap: wrap; gap: 4px 2px; padding-bottom: 14px; }
#ftree.narrow .tn { position: relative; transform: none; flex: none; }
#ftree.narrow .ft-side { width: auto; max-height: 46vh; border-left: 0; border-top: 1px solid var(--line); }
/* portrait viewer: zoom and pan inside the frame */
#plb .frame { position: relative; }
#plb .zv { overflow: hidden; cursor: zoom-in; touch-action: none; max-height: 68vh; }
#plb .zv.zoomed { cursor: grab; } #plb .zv.zoomed:active { cursor: grabbing; }
#plb .zv img { transform-origin: 50% 50%; will-change: transform; user-select: none; }
#plb .zb { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
#plb .zb button { all: unset; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 2px; background: rgba(18,24,23,.86); box-shadow: inset 0 0 0 1px rgba(201,168,95,.4); color: #e6ddc8; font: 15px/1 var(--f-latin); }
#plb .zb button:hover { box-shadow: inset 0 0 0 1px rgba(232,212,160,.85); }
#plb .ptl { margin-top: 6px; font: 12px/1.4 var(--f-ja); color: #c9cfcc; }
.tn.cn { width: 72px; height: 104px; } .tn.cn .ring { width: 40px; height: 40px; margin-top: 16px; box-shadow: 0 0 0 1px rgba(14,19,18,.95), 0 0 0 1.5px rgba(201,168,95,.5), 0 3px 8px rgba(0,0,0,.4); }
.tn.cn .ring .crest { width: 40px; height: 40px; } .tn.cn .ring .at { width: 12px; height: 12px; font-size: 7px; }
.tn.cn .nj { font-size: 10.5px; letter-spacing: .02em; max-width: 72px; } .tn.cn .na { font-size: 8.5px; }
.tn.chip .ring { display: grid; place-items: center; background: rgba(161,135,90,.14); } .tn.chip .ring b { font: 700 10px/1 var(--f-ja); color: #d8c08a; letter-spacing: .05em; }
.tn.chip:hover .ring { background: rgba(161,135,90,.26); }
.tn.sat .ring { box-shadow: 0 0 0 1px rgba(14,19,18,.95), 0 0 0 1.5px rgba(160,172,168,.4), 0 4px 12px rgba(0,0,0,.4); }
.ft-l path.sb { stroke: rgba(196,203,200,.3); stroke-width: 1; }
.ft-l path.pl { stroke: rgba(216,192,138,.32); stroke-width: 1; stroke-dasharray: 3 3; }
.ft-l path.um { stroke: rgba(196,203,200,.3); }
.ft-l text.csl { fill: rgba(216,192,138,.7); font: 600 9px var(--f-ja); writing-mode: vertical-rl; letter-spacing: .1em; }
.tn .seal { top: 50px; left: 8px; }
.ft-side { padding-top: 34px; } .ft-side .pr { padding-right: 30px; } .ft-side > .pr .face.s { width: 56px; height: 56px; }
.ft-side > .pr { grid-template-columns: 56px 1fr auto; }

.ft-l text.sbl { fill: rgba(170,182,178,.62); font: 500 7.5px var(--f-latin); letter-spacing: .16em; text-transform: uppercase; }
.ft-l path.og { stroke: rgba(196,203,200,.18); stroke-width: 1; stroke-dasharray: 2 3; }
.ft-l text.ogl { fill: rgba(170,182,178,.55); font: 500 7.5px var(--f-latin); letter-spacing: .16em; text-transform: uppercase; }

/* ============================================================ faith layer (寺社 labels, 信 lens chips, network lines) */
.place.faith { gap: 3px; }
.place.faith .kj { font-size: 11px; background: rgba(40,52,51,.28); }
.place.faith .en { font-family: CormorantI; font-style: italic; font-weight: 600; font-size: 10.5px; letter-spacing: .08em; }
.place.faith .fg { order: -1; align-self: flex-end; font: 700 9px/1 var(--f-ja); font-style: normal; width: 13px; height: 13px; display: grid; place-items: center; border-radius: 1px;
  color: #efe5db; background: #8e3a2b; box-shadow: inset 0 0 0 1px rgba(255,220,200,.16), 0 1px 3px rgba(0,0,0,.35); margin-bottom: 1px; }
.place.faith.temple .fg, .place.faith.mountain .fg { background: #262c2c; box-shadow: inset 0 0 0 1px rgba(214,186,112,.5), 0 1px 3px rgba(0,0,0,.35); color: #dcc58c; }
.place.faith.church .fg { background: #e3ddcc; color: #2b302f; }
.place.faith.cruin .fg { filter: grayscale(.85) brightness(.85); }
.place.faith .tick { width: 4px; height: 4px; background: rgba(222,214,196,.85); }
.place.faith.modelled .fg { display: none; }   /* the model is the mark */
.place.faith.t3 .en { display: none; }        /* small institutions: the name in kanji only */
#legendchip .lenses { display: inline-flex; gap: 3px; pointer-events: auto; margin-right: 2px; }
#legendchip .lenses button { width: 24px; height: 22px; border: 1px solid var(--line-hi); border-radius: 2px; background: rgba(26,34,33,.55); color: var(--text); font: 700 12px/1 var(--f-ja); cursor: pointer; padding: 0; opacity: .75; }
#legendchip .lenses button.on { background: var(--seal); border-color: var(--seal-hi); color: #f2e9e1; opacity: 1; }
#faithnet { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; transition: opacity .3s; }
#faithnet path { fill: none; stroke: rgba(232,222,196,.9); stroke-width: 1.8; stroke-dasharray: 0.1 4.4; stroke-linecap: round; filter: drop-shadow(0 0 1.5px rgba(14,18,17,.9)); }
body[data-look=dusk] #faithnet path, body[data-look=dusk] #faithnet circle { stroke: rgba(226,206,160,.85); }
#labels.faith-glyph .place.faith .kj, #labels.faith-glyph .place.faith .en, #labels.faith-glyph .place.faith .tick { display: none; }
#labels.faith-glyph .place.faith .fg { margin: 0; width: 12px; height: 12px; }
#legendchip i.hatch { background: repeating-linear-gradient(135deg, #8a8e86 0 2px, #5d625c 2px 4px); }
#faithnet circle { fill: rgba(232,222,196,.12); stroke: rgba(232,222,196,.9); stroke-width: 1.3; stroke-dasharray: 0.1 3; stroke-linecap: round; filter: drop-shadow(0 0 1.5px rgba(14,18,17,.9)); }
#legendchip i.dots { width: 14px; height: 2px; box-shadow: none; background: repeating-linear-gradient(90deg, rgba(232,222,196,.9) 0 2px, transparent 2px 5px); vertical-align: 2px; }
#legendchip i.ring { border-radius: 50%; background: none; border: 1px dotted rgba(232,222,196,.9); box-shadow: none; }
@media (max-width: 640px) { #legendchip .lenses button { width: 32px; height: 30px; font-size: 14px; } }
/* lineage-ext: aliases, the record's alternatives, a card head that the lineage records correct */
.ft-side dl.aka dd, #dpanel dl.aka dd { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ft-side dl.aka span i, #dpanel dl.aka span i { font: 500 9px var(--f-latin); letter-spacing: .14em; color: #8f9c98; margin-right: 5px; font-style: normal; }
.altrec { margin: 10px 0 0; font: 12px/1.5 var(--f-ja); color: #c9cfcb; }
.altrec i { font: italic 500 11px var(--f-latin); color: #c9a85f; margin-right: 6px; }
.altrec b { font-weight: 400; color: #7f8c88; }
.altrec .af { display: block; font: 10.5px/1.4 var(--f-latin); color: #8f9c98; margin-top: 2px; }
#dpanel .lord.hc .hcm { display: inline-block; margin-left: 8px; font: 500 9px/1 var(--f-latin); letter-spacing: .12em; text-transform: uppercase; color: #c9a85f; border-bottom: 1px dotted rgba(201,168,95,.6); cursor: help; vertical-align: 2px; }
[data-look="dusk"] .altrec { color: #c4c8c4; }
.altrec .af { text-transform: none; letter-spacing: 0; font-variant: normal; }
.ft-side dl.aka dd span, #dpanel dl.aka dd span { text-transform: none; letter-spacing: 0; }
.altrec .af { font: 11px/1.45 var(--f-ja); color: #8f9c98; }

/* ---- fictional kin (web/build_shogun_fiction.py): clear but quiet — a tiny 仮 seal on the ring, a lighter name */
i.kx { font-style: normal; display: inline-grid; place-items: center; width: 13px; height: 13px; border-radius: 50%;
  font: 600 8px/1 var(--f-ja, serif); color: #d9ddd7; background: rgba(38,46,45,.92); border: 1px solid rgba(199,177,122,.55); vertical-align: 1px; }
.tn .ring > i.kx { position: absolute; right: -1px; top: -1px; width: 15px; height: 15px; font-size: 9px; z-index: 2; }
.tn.cn .ring > i.kx { width: 12px; height: 12px; font-size: 7.5px; right: -2px; top: -2px; }
.tn.fic .nj { font-weight: 400; opacity: .82; } .tn.fic .nr { opacity: .72; }
span.fxw { position: relative; display: inline-block; line-height: 0; } span.fxw > i.kx { position: absolute; right: -3px; top: -3px; }
.pr.fic .pn .ja, .mi.fic .mj { font-weight: 400; opacity: .82; }
.pr.fic .pn .ro { opacity: .7; }
.fine.fxl i.kx, .fxn i.kx, .tfx i.kx { margin-right: 5px; }
.fxn { margin: 8px 0 2px; font-size: 11px; color: #a9b3ae; font-style: italic; }
.tfx { margin-top: 3px; font-size: 10px; opacity: .75; }
.ft-key .kfx i.kx { margin-right: 4px; }
body[data-look="dusk"] i.kx { background: rgba(28,31,34,.94); }

/* ---------------------------------------------------------------- the five rings (五輪), web/rings.js — CHARACTER_SYSTEM §13 */
.g5 { display: inline-block; line-height: 0; vertical-align: middle; }
.g5 svg { overflow: visible; }
.g5 .st { fill: var(--text); stroke: var(--text); stroke-width: .55; stroke-opacity: .85; }
.g5 .st.b { fill: var(--gold); stroke: #d8c08a; fill-opacity: .95 !important; }
/* trait seals: one carved form per family (web/rings.js SEAL_D), kanji on the face; ink, vermilion, gilt, slate */
i.ts { --sf: var(--seal); --sk: #efe8da; --sr: rgba(201,168,95,.75); --dy: 0;
  position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; font: 600 11px/1 var(--f-ja); font-style: normal;
  color: var(--sk); letter-spacing: 0; vertical-align: middle; transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease); filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); }
i.ts:hover { transform: translateY(-1px); filter: drop-shadow(0 2px 2.5px rgba(0,0,0,.5)); }
i.ts .sf { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
i.ts .sf .sb { fill: var(--sf); stroke: var(--sr); stroke-width: .9; vector-effect: non-scaling-stroke; }
i.ts .sf .si2 { fill: none; stroke: var(--sk); stroke-opacity: .22; stroke-width: .6; vector-effect: non-scaling-stroke; }
i.ts .sk5 { position: relative; transform: translateY(calc(var(--dy) * 1px * var(--k, 1))); text-shadow: 0 0 1px rgba(0,0,0,.25); }
i.ts.s { width: 15px; height: 15px; font-size: 8px; --k: .75; } i.ts.s .sf .si2 { display: none; }
i.ts.l { width: 30px; height: 30px; font-size: 15.5px; --k: 1.5; }
i.ts.f-character { --sf: #8a2518; }
i.ts.f-governance { --sf: #2c3f55; }
i.ts.f-arts { --sf: #34544b; }
i.ts.f-martial { --sf: #1d232b; --sr: #b8402f; --sk: #ece4d6; }   /* iron ink, vermilion rim: reads apart from the vermilion character seals at 15 px */
i.ts.f-martial .sf .sb { stroke-width: 1.5; }
i.ts.f-faith { --sf: #151c1b; --sr: rgba(201,168,95,.95); --sk: #e2cf9c; }
i.ts.f-upbringing { --sf: #a1875a; --sk: #1a201f; --sr: rgba(40,46,44,.55); }
i.ts.f-body { --sf: #535d5a; --sk: #ece7dc; }
i.ts.f-life { --sf: #5c4831; }
i.ts.f-reputation { --sf: #c3a66a; --sk: #1d221f; --sr: rgba(120,98,58,.9); }
i.ts.f-interior { --sf: #5b4462; --sr: rgba(214,196,214,.6); }   /* wisteria: apart from the black faith drop at 15 px */
i.ts.br .sf .sb { stroke: rgba(222,214,196,.8); stroke-dasharray: 2.2 1.6; }
i.ts .tr { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font: 700 7px/1 var(--f-latin); color: #c9ad6c; letter-spacing: -1.5px; opacity: .8; }
.rl5 i.ts .tr { display: none; }
i.ts.s .tr { display: none; }
i.ts.dv { opacity: .82; }
i.ts.lat { color: var(--hair); font-family: var(--f-latin); } i.ts.lat .sf .sb { fill: none; stroke: var(--hair); stroke-dasharray: 1 1.4; }
i.ts.dn { opacity: .45; filter: grayscale(.6); } i.ts .dm { position: absolute; right: -4px; top: -4px; font: 700 7.5px/1 var(--f-ja); color: var(--text); background: #26302f; border-radius: 50%; padding: 1px; }
body[data-densho] i.ts.dn { opacity: .9; filter: grayscale(.5); } i.ts.dn .sf .sb { stroke-dasharray: 1.2 1.4; }
i.kx.sui { background: #3b4644; }
/* the ruler line */
.rl5 { display: grid; gap: 7px; margin-top: 8px; font: 13px/1.2 var(--f-latin); color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.rl5 .r1, .rl5 .r2 { display: flex; align-items: center; min-height: 22px; white-space: nowrap; }
.rl5 .r1 .g5 { margin-right: 9px; }
.rl5 .kr, .rl5 .r2 .sls { margin-left: 13px; padding-left: 13px; border-left: 1px solid rgba(143,160,156,.24); }
.rl5 .rr { display: inline-flex; gap: 9px; align-items: baseline; }
.rl5 .rv { display: inline-flex; align-items: baseline; gap: 3px; font-weight: 600; }
.rl5 .rv i, .ft-tip .t5 i { font: normal 400 10.5px/1 var(--f-ja); opacity: .62; } .rl5 .rv.b { color: var(--gold); } .rl5 .rv.b i { opacity: .95; }
.rl5 .kr { display: inline-flex; align-items: baseline; gap: 4px; color: var(--gold); font: 400 10.5px var(--f-ja); }
.rl5 .kr b { font: 600 15px/1 var(--f-latin); } .rl5 .kr em { font-style: normal; font-size: 12px; color: #d8d2c2; opacity: .9; }
.rl5 .tks { display: inline-flex; gap: 9px; } .rl5 .tk { font-weight: 600; } .rl5 .tk b { font: 400 10.5px var(--f-ja); margin-right: 3px; opacity: .62; }
.rl5 .sls { display: inline-flex; gap: 5px; align-items: center; }
.rl5 .more5 { background: none; border: 0; color: var(--hair); font: 11px var(--f-latin); cursor: pointer; padding: 0 2px; transition: color .2s; }
.rl5 .more5:hover { color: var(--text); }
/* tree nodes: the gorintō on the portrait's left rim, two seals at its lower right */
.tn .ring .n5 { position: absolute; left: -14px; top: 50%; transform: translateY(-50%) scale(var(--zi, 1)); transform-origin: 100% 50%; z-index: 2; filter: drop-shadow(0 0 1.5px rgba(10,14,13,.95)); }
.tn.sp .ring .n5 { left: -11px; } .tn.cn .ring .n5 { left: -10px; }
.tn .ring .ns5 { position: absolute; right: -9px; bottom: -3px; display: flex; gap: 1px; z-index: 2; transform: scale(var(--zi, 1)); transform-origin: 0 100%; }
.tn.cn .ring .ns5 { right: -7px; }
ul.mini li .m5 { position: absolute; left: calc(50% - 32px); top: 14px; z-index: 1; filter: drop-shadow(0 0 1.5px rgba(10,14,13,.95)); }
.ft-tip .t5 { margin-top: 4px; font: 11px/1.35 var(--f-latin); opacity: .85; }
/* the person panel: one rhythm — section headings in small caps with their kanji, 8 px grid, numbers in lining figures */
.p5 { margin: 14px 0 4px; border-top: 1px solid var(--line); padding-top: 14px; font-variant-numeric: lining-nums tabular-nums; }
.p5 .fxn { margin: 0 0 10px; }
.p5h { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.p5 .kq { text-align: center; } .p5 .kq .g5 { display: block; margin: 0 auto 6px; }
.p5 .kq b { display: block; font: 600 24px/1 var(--f-latin); color: var(--gold); }
.p5 .kq span { display: block; margin-top: 3px; font: 10px/1 var(--f-ja); letter-spacing: .15em; opacity: .7; } .p5 .kq em { display: block; margin-top: 4px; font: normal 12.5px/1.2 var(--f-ja); color: #d8d2c2; }
.p5 ul.rgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.p5 ul.rgs li { display: grid; grid-template-columns: 48px 18px 1fr; gap: 8px; align-items: baseline; white-space: nowrap; }
.p5 ul.rgs li .rj { font: 500 11.5px/1 var(--f-latin); letter-spacing: .04em; opacity: .8; } .p5 ul.rgs li b { font: 600 13.5px/1 var(--f-latin); text-align: right; }
.p5 ul.rgs li .rf { font: italic 13px/1.2 var(--f-ital); opacity: .8; overflow: hidden; text-overflow: ellipsis; }
.p5 ul.rgs li .rf .fj { font: normal 11.5px var(--f-ja); opacity: .9; } .p5 ul.rgs li .rf .dot { margin: 0 5px; opacity: .45; }
.p5 ul.rgs li.b { color: var(--gold); } .p5 ul.rgs li.b .rj { opacity: 1; }
.p5 h5 { display: flex; align-items: baseline; gap: 7px; margin: 16px 0 7px; font: 500 10px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: #93a09c; }
.p5 h5 .hj { font: 500 11.5px/1 var(--f-ja); letter-spacing: .05em; color: #b9a77e; }
.p5 h5 .dvm { margin-left: auto; text-transform: none; letter-spacing: 0; cursor: help; }
.p5 .trk { display: grid; gap: 5px; }
.p5 .trk > span { display: grid; grid-template-columns: 16px 58px 18px 1fr; gap: 8px; align-items: center; }
.p5 .trk b { font: 400 12px/1 var(--f-ja); opacity: .8; } .p5 .trk em { font: italic 12.5px/1 var(--f-ital); opacity: .75; }
.p5 .trk .nv { font: 600 12.5px/1 var(--f-latin); text-align: right; }
.p5 .trk .rt { font: 11.5px/1.2 var(--f-ja); color: #b9b4a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p5 .bar { position: relative; display: block; height: 3px; border-radius: 2px; background: rgba(196,203,200,.12); overflow: hidden; }
.p5 .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(196,203,200,.45), rgba(214,219,216,.85)); border-radius: 2px; }
.p5 .off5 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px 10px; }
.p5 .off5 > span { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding-bottom: 3px; border-bottom: 1px solid rgba(143,160,156,.14); cursor: help; }
.p5 .off5 .oj { font: 11.5px/1.2 var(--f-ja); color: #c9cfcc; white-space: nowrap; } .p5 .off5 b { font: 600 12px/1 var(--f-latin); color: var(--text); }
.p5 .hvs { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 12.5px/1.3 var(--f-latin); }
.p5 .hv { border-bottom: 1px dotted var(--hair); cursor: help; padding-bottom: 1px; } .p5 .hv b { font: 400 12px var(--f-ja); margin-right: 5px; opacity: .8; }
.p5 .hv small { font: 10px var(--f-ja); opacity: .7; margin-left: 1px; }
.p5 ul.trs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.p5 .trw { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.p5 .trw .tn5 { display: block; font: 600 12.5px/1.3 var(--f-latin); letter-spacing: .02em; } .p5 .trw .tn5 .ja { font: 600 13px var(--f-ja); margin-right: 5px; }
.p5 .trw .tn5 em { font: italic 400 13px var(--f-ital); color: #b9a77e; margin-left: 2px; }
.p5 .trw .tf { display: block; margin-top: 2px; font: italic 13px/1.35 var(--f-ital); opacity: .82; }
.p5 .trw .te { display: block; margin-top: 3px; font: 11px/1.45 var(--f-ja); color: #9fa9a5; }
.p5 .trw.lat .tn5 { opacity: .6; }
.p5 i.dvm { font: italic 400 11.5px var(--f-ital); opacity: .6; margin-left: 4px; letter-spacing: 0; }
.p5 details.ev { margin-top: 4px; } .p5 details.ev summary { cursor: pointer; opacity: .6; list-style: none; font: italic 12px var(--f-ital); width: max-content; transition: opacity .2s; }
.p5 details.ev summary:hover { opacity: .95; } .p5 details.ev summary::-webkit-details-marker { display: none; }
.p5 details.ev summary::before { content: '源'; display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 6px; border: 1px solid rgba(201,168,95,.35); border-radius: 50%; font: normal 8.5px/1 var(--f-ja); color: #a8946a; vertical-align: 1px; }
.p5 details.ev[open] summary { opacity: .9; margin-bottom: 4px; }
.p5 details.ev > :not(summary) { display: block; font: 11.5px/1.55 var(--f-ja); } .p5 details.ev .wy { font-style: italic; } .p5 details.ev .cfn { opacity: .75; }
.p5 details.ev a { color: #c9ad6c; text-decoration: none; border-bottom: 1px solid rgba(201,168,95,.35); width: max-content; }
.p5 details.bs { margin: 12px 0 0; } .p5 details.bs span + span { margin-top: 3px; } .p5 details.bs b { font: 600 11px var(--f-ja); margin-right: 5px; color: #b9a77e; }
i.ts .sh, .p5 .hv .sh { position: absolute; left: -4px; top: -4px; font: 700 7.5px/1 var(--f-ja); color: #efe8da; background: #1d2423; border: .5px solid var(--hair); border-radius: 50%; padding: 1px; }
.p5 .hv { position: relative; } .p5 .hv.rum { background: repeating-linear-gradient(135deg, rgba(196,203,200,.16) 0 2px, transparent 2px 5px); padding: 0 3px; }
.p5 .trw .kn5 { display: block; font: italic 12px/1.3 var(--f-ital); color: var(--gold); opacity: .9; margin-top: 2px; }
@keyframes ts-in { from { opacity: 0; transform: scale(.88); filter: blur(1.5px); } to { opacity: 1; transform: none; } } i.ts.new { animation: ts-in var(--t-reveal) var(--ease) both; }
/* Settings → Map → Sea: the classic slate Day sea keeps its dark-ink sea names (2026-11-05) */
body[data-sea=classic] { --sea: #435654; }
body[data-sea=classic][data-look=teal] .sea { color: #1f2928; text-shadow: none; }
/* a retainer's rings in the household tab: the small gorintō, his calibre and up to two seals, after the name */
.rt5 { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; vertical-align: -4px; }
.rt5 > b { font: 600 11px/1 var(--f-latin); color: var(--gold); margin-right: 2px; font-variant-numeric: lining-nums; }
#dock .stack button i.two { font-size: 10.5px; letter-spacing: -.04em; }
#dpanel .st .k { white-space: nowrap; letter-spacing: .08em; }
#dpanel .hd > :last-child { min-width: 0; flex: 1; }
@media (max-width: 480px) {
  /* phone: the ruler wraps on purpose — rings, then 器量 and its tier, then tracks and seals; nothing runs off the edge */
  .rl5 .r1, .rl5 .r2 { flex-wrap: wrap; row-gap: 6px; white-space: normal; }
  .rl5 .r1 .kr { flex-basis: 100%; margin-left: 0 !important; padding-left: 0 !important; border-left: 0 !important; }
  .rl5 { font-size: 12px; } .rl5 .rr, .rl5 .tks { gap: 6px; } .rl5 .kr, .rl5 .r2 .sls { margin-left: 9px; padding-left: 9px; } .rl5 .kr em { font-size: 11px; }
  .p5 .off5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .p5 .trk > span { grid-template-columns: 16px 52px 18px 1fr; }
}

/* 器量 tier: small caps rank + a five-step ladder (the period word is in the tooltip) */
em.kt { font: normal 600 9.5px/1 var(--f-latin) !important; letter-spacing: .12em; text-transform: uppercase; color: #d8d2c2; opacity: .85; display: inline-flex; align-items: center; gap: 5px; }
em.kt .lad { display: inline-flex; gap: 2px; } em.kt .lad b { width: 4px; height: 4px; border-radius: 50%; border: 1px solid rgba(201,168,95,.6); }
em.kt .lad b.on { background: var(--gold); border-color: var(--gold); }
.p5 .kq em.kt { display: flex; flex-direction: column; gap: 4px; margin-top: 5px; font-size: 8.5px !important; }
.rl5 em.kt .lad { display: none; }   /* the ladder lives in the person panel; the ruler keeps the word only */

/* ============================================================ English first (web/en.js) */
/* map: Japanese script as a small accent, or none ('Names in Japanese script' off) */
.region .seal { font-size: 12.5px; padding: 6px 3px; opacity: .86; }
.place .kj { font-size: 9.5px; padding: 2px 0; opacity: .72; }
.sea .kj { font-size: 13px; margin-bottom: 4px; opacity: .7; }
.province { writing-mode: horizontal-tb; font: 500 10.5px/1 var(--f-latin); letter-spacing: .32em; text-transform: uppercase; }
body.nojs .region .seal, body.nojs .place .kj, body.nojs .sea .kj, body.nojs .jas { display: none; }
/* the one secondary Japanese line under a name (card and person headers) */
.jas { display: block; margin-top: 3px; font: 12px/1.3 var(--f-ja); letter-spacing: .14em; color: #95a29e; text-transform: none; }
/* a reading the record does not give (dictionary reading): a faint dotted underline, explained on hover */
.rdg { text-decoration: underline dotted rgba(201,168,95,.45); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.jnote { font-style: italic; opacity: .6; }
abbr.gl { text-decoration: underline dotted rgba(196,203,200,.4); text-underline-offset: 2px; cursor: help; }
#dpanel .nm h2 { font: 600 21px/1.15 var(--f-latin); letter-spacing: .1em; text-transform: uppercase; }
#dpanel .pn, #dpanel .ro { font-family: var(--f-latin); }
#dpanel .pn { font: 500 12.5px/1.35 var(--f-latin); letter-spacing: .05em; color: #e2e7e4; }
.mi .mj { font: 500 10px/1.25 var(--f-latin); letter-spacing: .03em; }
.who { cursor: pointer; }
.pr.who:hover .pn, .mi.who:hover .mj, li.who:hover .pn { color: #f0dfb4; }
.fl-face.who:hover .face, .hdc[data-who]:hover .face { box-shadow: 0 0 0 1px rgba(216,192,138,.8); }
.tn .nre { font: 500 10.5px/1.2 var(--f-latin); letter-spacing: .02em; white-space: normal; max-width: 96px; margin: 4px auto 0; }
.tn .nre.lg { font-size: 9.5px; }
#ftree .ft-h h3 { font-family: var(--f-latin); letter-spacing: .1em; }
#ftree .ft-h h3 .jas { display: inline; margin: 0 0 0 10px; font-size: 12px; }
/* the mini-overview of a wide family tree */
.ft-mini { position: absolute; left: 14px; bottom: 34px; background: rgba(14,19,18,.82); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; overflow: hidden; }
.ft-mini svg { display: block; width: 100%; height: 100%; }
.ft-mini rect { fill: rgba(196,203,200,.42); } .ft-mini rect.h { fill: #d8c08a; }
.ft-mini .vr { position: absolute; left: 0; top: 0; border: 1px solid rgba(216,192,138,.85); background: rgba(216,192,138,.08); pointer-events: none; }
/* ============================================================ the person panel (web/person.js) */
#pp { position: fixed; right: calc(1.6vh + 16px); top: calc(1.6vh + 16px); bottom: calc(1.6vh + 16px); width: min(392px, calc(100vw - 32px)); overflow-y: auto; overflow-x: hidden;
  z-index: 38; padding: 10px 20px 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 14px 50px rgba(0,0,0,.45);
  backdrop-filter: blur(10px); color: var(--text); font: 13px/1.5 var(--f-latin); scrollbar-width: thin; }
#pp[hidden] { display: none; }
#pp.in { animation: cardIn var(--t-slow) var(--ease) both; }
#pp .pp-bar { display: flex; justify-content: space-between; align-items: center; height: 26px; margin-bottom: 6px; }
#pp .pp-back { all: unset; cursor: pointer; font: 500 10.5px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: #b9c2be; opacity: .8; }
#pp .pp-back:hover { opacity: 1; color: #f0dfb4; }
#pp .pp-hd { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
#pp .pp-face { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#pp .pp-face .face.l { width: 96px; height: 96px; }
#pp .pp-view { all: unset; cursor: pointer; font: 500 9px/1 var(--f-latin); letter-spacing: .12em; text-transform: uppercase; color: #c9b27c; opacity: .75; }
#pp .pp-view:hover { opacity: 1; }
#pp .pp-nm { min-width: 0; }
#pp .pp-nm h2 { margin: 2px 0 0; font: 600 19px/1.2 var(--f-latin); letter-spacing: .08em; color: #eef1ef; }
#pp .pp-l { display: flex; gap: 10px; margin-top: 7px; font: 500 11px/1.2 var(--f-latin); letter-spacing: .08em; color: #c4cbc8; }
#pp .pp-l span + span { opacity: .7; }
#pp .pp-r { margin-top: 6px; font: 13px/1.4 var(--f-ital); color: #d6dcd9; }
#pp .pp-t { margin-top: 3px; font: 11px/1.4 var(--f-latin); letter-spacing: .04em; color: #a9b3af; }
#pp .hchip { margin-top: 8px; }
#pp h5 { margin: 16px 0 6px; font: 600 9.5px/1 var(--f-latin); letter-spacing: .24em; text-transform: uppercase; color: #9aa6a2; }
#pp .pp-ch { display: flex; flex-wrap: wrap; gap: 6px; }
#pp .pchip { font: 500 11.5px/1.2 var(--f-latin); letter-spacing: .02em; }
#pp .pchip.fic { font-style: italic; opacity: .85; }
#pp .pp-hd.gone .face { filter: grayscale(1) brightness(.85); }
#pp details.ev { margin-top: 14px; font-size: 11.5px; }
#pp details.ev span { display: block; margin-top: 4px; color: #a9b3af; }
#pp .crest-w .crest { width: 72px; height: 72px; }
body[data-look=dusk] #pp { background: rgba(24,27,29,.95); }
@media (max-width: 640px) { #pp { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 78vh; } #pp .pp-face .face.l { width: 72px; height: 72px; } }
/* English-first fixes for the tabs, rings, tracks and offices (labels are words now, not single kanji) */
#dpanel .tb button em { opacity: 1; transform: none; font: 600 8.5px/1 var(--f-latin); letter-spacing: .14em; text-transform: uppercase; }
#dpanel .tb button { opacity: .55; } #dpanel .tb button.on { opacity: 1; }
.rl5 .r1, .rl5 .r2 { flex-wrap: wrap; row-gap: 4px; white-space: normal; }
.rl5 .rv i { font: 500 10px/1 var(--f-latin); letter-spacing: .04em; font-style: normal; margin-right: 3px; opacity: .78; }
.rl5 .tk b { font: 500 10px/1 var(--f-latin); letter-spacing: .06em; opacity: .7; }
.rl5 .kr { font: 500 10px/1 var(--f-latin); letter-spacing: .08em; }
.p5 .rgs .rj { font: 500 12px/1 var(--f-latin); letter-spacing: .04em; min-width: 46px; display: inline-block; }
.p5 .trk > span { grid-template-columns: 64px 22px 1fr; }
.p5 .trk .rk { grid-template-columns: 64px 22px 1fr; }
.p5 .trk .rk .rt { white-space: normal; font: 11px/1.35 var(--f-latin); color: #b4bdb9; }
.p5 .off5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 18px; }
.p5 .off5 .oj { font: 12px/1.2 var(--f-latin); letter-spacing: .02em; }
.p5 details.ev summary::before { content: '¶'; font: 10px/1 var(--f-latin); }
.p5 .tn5 { font-family: var(--f-latin); letter-spacing: .04em; }
.p5 .hv b { font: 500 11px/1 var(--f-latin); letter-spacing: .04em; margin-right: 5px; }
#dpanel .tb { flex-wrap: wrap; justify-content: center; gap: 0 2px; }
#dpanel .tb button { flex: 0 0 auto; padding: 8px 7px 9px; }
#dpanel .tb button em { font-size: 8px; letter-spacing: .12em; }
/* drawn view icons (web/deglyph.js) replace the kanji glyphs in the switcher */
#dock .stack button i svg.dk { width: 17px; height: 17px; display: block; }
#seal i svg.dk { width: 22px; height: 22px; display: block; margin: auto; }
#seal i { display: grid; place-items: center; width: 100%; height: 100%; }
header > i.dkh svg.dk { width: 20px; height: 20px; display: block; }
.keys dt.ctx { grid-column: 1 / -1; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font: 600 10px/1 var(--f-ui, inherit); letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.keys dd.ctx { display: none; }
/* ---- the five rings medallion (web/medallion.js): paper roundels with brushed ensō, on the panel's lacquer */
.md5 { --md-paper: #e9e1cf; --md-paper2: #ddd3bd; --md-ink: #1c201e; --md-gilt: #b8913a; --md-gilt-hi: #d4ae55;
  --md-earth: #59684a; --md-water: #2f4c6e; --md-fire: #b3442b; --md-fire2: #d08a3a; --md-wind: #6d7f8f; --md-void: #a9883b;
  margin: 4px 0 10px; padding: 0; position: relative; }
body[data-look=dusk] .md5 { --md-paper: #cfc6b2; --md-paper2: #c1b7a1; --md-ink: #161a19; }
.md5 svg { width: 100%; height: auto; display: block; overflow: visible; max-width: 400px; margin: 0 auto; }
.md5.lg svg { max-width: 520px; }   /* the emblems stay at or under their 370 px source at retina */
.md5 .wash { fill: none; stroke: none; }
.md5 .lk-dusk { display: none; } body[data-look=dusk] .md5 .lk-dusk { display: inline; } body[data-look=dusk] .md5 .lk-day { display: none; }
.md5 .em .gr { filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); }
.md5 .gen .halo { fill: none; stroke: var(--md-gilt-hi); stroke-width: 1; opacity: .55; }
.md5 .gen .gilt-rim { fill: none; stroke: var(--md-gilt-hi); stroke-width: 1.6; opacity: .85; }
/* the art sits on the panel with a soft ink-bleed shadow; Dusk is a quiet tone grade; all static (never animated) */
.md5 .gen image { filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
body[data-look=dusk] .md5 .gen image { filter: brightness(.84) sepia(.1) saturate(.95) drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.md5 .gen .blr { opacity: 0; }
.md5 .em.weak .gen image { opacity: .88; }
/* rings estimated from role or age: the same medallion, quietly desaturated */
.md5.dv .gen image { filter: saturate(.45) drop-shadow(0 1.5px 2.5px rgba(0,0,0,.3)); }
body[data-look=dusk] .md5.dv .gen image { filter: brightness(.84) saturate(.4) drop-shadow(0 1.5px 2.5px rgba(0,0,0,.4)); }
.md5.dv .vd text, .md5.dv .cal .cv { opacity: .82; }
.md5 .vd.sp circle { fill: none; stroke: none; } .md5 .em.top .vd.sp circle { fill: none; stroke: var(--md-gilt-hi); stroke-width: 1.2; }
.md5 .ens { fill: var(--md-ink); opacity: .9; }
.md5 .em.best .ens { fill: var(--md-gilt); opacity: 1; }
.md5 .em.weak .ens, .md5 .em.weak .mot { opacity: .55; }
.md5 .mdf { stroke: none; }
.md5 .mdk { fill: none; stroke-width: 2.9; stroke-linecap: round; stroke-linejoin: round; }
.md5 .mdk.mdt { stroke-width: 1.8; opacity: .7; }
.md5 .earth .mdf { fill: var(--md-earth); } .md5 .earth .mdk { stroke: var(--md-ink); stroke-width: 2.2; opacity: .75; }
.md5 .water .mdk { stroke: var(--md-water); }
.md5 .fire .mdf { fill: var(--md-fire); } .md5 .fire .mdi { fill: var(--md-fire2); }
.md5 .wind .mdk { stroke: var(--md-wind); stroke-width: 2.4; }
.md5 .void .mdv { fill: none; stroke: var(--md-ink); stroke-width: 1.4; opacity: .45; } .md5 .void .mdf { fill: var(--md-void); }
.md5 .vd circle { fill: var(--md-paper2); stroke: var(--md-ink); stroke-width: 1; }
.md5 .vd text { font: 600 13px/1 var(--f-latin); fill: var(--md-ink); text-anchor: middle; }
.md5 .em.top .vd circle { fill: var(--md-gilt); stroke: var(--md-gilt-hi); }
.md5 .earth .mdb { fill: var(--md-ink); opacity: .72; }
.md5 .void .mdi { fill: none; stroke: #f4ecd8; stroke-width: 1.2; stroke-linecap: round; opacity: .8; }
.md5 .lb .rn { font: 600 11px/1 var(--f-latin); letter-spacing: .16em; fill: var(--text, #e4e0d6); }
.md5 .lb .fc { font: italic 13px/1 var(--f-ital); fill: var(--text, #e4e0d6); opacity: .72; }
.md5 .em.top .lb .rn { fill: var(--md-gilt-hi); }
.md5 .cal circle { fill: #1b2120; stroke: var(--md-gilt); stroke-width: 1.4; }
body[data-look=dusk] .md5 .cal circle { fill: #141718; }
.md5 .cal .cv { font: 600 20px/1 var(--f-latin); fill: #efe6d4; text-anchor: middle; }
.md5 .cal .cl { font: 600 6.5px/1 var(--f-latin); letter-spacing: .18em; fill: var(--md-gilt-hi); text-anchor: middle; }
.md5 .kx { font: 700 15px/1 var(--f-ja); fill: var(--text, #e4e0d6); opacity: .55; }
.md5 .em { cursor: help; outline: none; }
.md5 .em .sc { transition: transform var(--t-mid) var(--ease); transform-box: fill-box; transform-origin: center; }
.md5 .em:hover .sc, .md5 .em:focus-visible .sc, .md5 .em.on .sc { transform: scale(1.045); }
.md5 .em:focus-visible .wash, .md5 .em.on .wash { stroke: rgba(232,226,212,.55); stroke-width: 1; }   /* the ring in view: a pale hairline (gilt is the strongest ring's alone) */
.md5 figcaption { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 2px; }
.md5 figcaption .md5dv { font: italic 13px/1.2 var(--f-ital); opacity: .6; }
.md5 .md5rec { all: unset; cursor: pointer; font: italic 13px/1.2 var(--f-ital); opacity: .7; border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: opacity var(--t-fast) var(--ease); } .md5 .md5rec:hover, .md5 .md5rec:focus-visible { opacity: 1; }
.md5.dv .em image { opacity: .92; }
.md5 figcaption .tw { font: italic 15px/1.2 var(--f-ital); letter-spacing: .01em; opacity: .78; }   /* the tier word: a quiet caption */
/* the ring's tooltip (one element, fixed; shown by hover, focus or tap) */
.md5tip { position: fixed; left: 0; top: 0; z-index: 60; width: max-content; max-width: 280px; padding: 10px 13px 11px; border-radius: 6px;
  background: rgba(22,27,26,.96); border: 1px solid rgba(201,168,92,.35); box-shadow: 0 8px 28px rgba(0,0,0,.4); color: #e8e2d4;
  pointer-events: none; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.md5tip.on { opacity: 1; }
.md5tip .t1 { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.md5tip .t1 b { font: 600 12px/1 var(--f-latin); letter-spacing: .16em; text-transform: uppercase; }
.md5tip .t1 span { font: 600 12px/1 var(--f-latin); color: #d4ae55; letter-spacing: .04em; }
.md5tip .t2 { font: italic 14px/1.3 var(--f-ital); opacity: .8; margin-top: 4px; }
.md5tip p { margin: 7px 0 0; font: 13.5px/1.42 var(--f-ital); opacity: .92; }
.md5tip .t3 { margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(232,226,212,.14); font: italic 12.5px/1.38 var(--f-ital); opacity: .66; }
body[data-look=teal] .md5tip { background: rgba(28,36,35,.97); }
/* ink-in: a short, restrained stagger as the medallion opens */
@media (prefers-reduced-motion: no-preference) {
  /* once per person (.ink, set by medallion.js), opacity only: an animated filter re-rasterises every frame */
  .md5.ink .em { animation: md5in .26s var(--ease) backwards; animation-delay: calc(var(--i) * 90ms); }
  /* soft focus to sharp: the blurred twin gives way to the sharp image, by opacity alone (Musashi order, ~0.85 s in all) */
  .md5.ink .gen .shp { animation: md5in .5s var(--ease) backwards; animation-delay: calc(var(--i) * 90ms + 110ms); }
  .md5.ink .gen .blr { animation: md5out .5s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 110ms); }
  .md5.ink .cal, .md5.ink figcaption { animation: md5in .4s var(--ease) backwards; animation-delay: 420ms; }
  @keyframes md5in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes md5out { from { opacity: 1; } to { opacity: 0; } }
}
/* narrow panels (phone): the faces move into a list under the flower, the flower stays clean */
@media (max-width: 560px) {
  .md5 .lb .fc { display: none; }
  .md5 svg, .md5.lg svg { max-width: 100%; }   /* the flower takes the full width; its faces move to the list below */
}
.ov5 { margin: 0 -6px 6px; }

/* Void's art is painted paler than the other four: a gentle density match (no repainting) */
.md5 .em.void .gen image { filter: contrast(1.14) brightness(.94) saturate(1.08) drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
/* ---- person panel: one typographic system (2026-11-05)
   Cinzel names things (the title, section heads); Cormorant italic carries labels and prose; Shippori roman carries
   long data text; tabular numbers in Cinzel. Spacing on 4 / 8 / 12 / 16 / 24. */
#pp .pp-hd { padding-bottom: 16px; gap: 16px; }
#pp .pp-nm h2 { font: 600 21px/1.15 var(--f-latin); letter-spacing: .05em; }
#pp .pp-nm .jas { display: block; margin-top: 4px; font: 400 13px/1.2 var(--f-ja); letter-spacing: .12em; color: #a9b1ad; }
#pp .pp-l { margin-top: 8px; font: 500 11px/1.2 var(--f-latin); letter-spacing: .1em; }
#pp .pp-r { margin-top: 8px; font: italic 14px/1.4 var(--f-ital); color: #d2d8d5; }
#pp .pp-t { margin-top: 4px; font: italic 12.5px/1.4 var(--f-ital); letter-spacing: 0; color: #a9b3af; }
#pp .p5 { margin-top: 0; padding-top: 8px; border-top: 0; }
#pp .p5 h5, #pp > h5, #pp h5 { margin: 24px 0 8px; font: 600 9.5px/1 var(--f-latin); letter-spacing: .22em; color: #93a09c; }
#pp .p5 h5 .dvm { font: italic 12px var(--f-ital); letter-spacing: 0; text-transform: none; opacity: .55; }
#pp .p5 .trk { gap: 8px; }
#pp .p5 .trk > span { grid-template-columns: 64px 18px 1fr; gap: 12px; }
#pp .p5 .trk em { font: italic 13.5px/1 var(--f-ital); opacity: .8; }
#pp .p5 .trk .nv { font: 600 13px/1 var(--f-latin); }
#pp .p5 .trk .rk { align-items: start; }
#pp .p5 .trk .rt { font: italic 13px/1.35 var(--f-ital); color: #c2c0b6; white-space: normal; text-transform: none; letter-spacing: 0; }
#pp .p5 .off5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
#pp .p5 .off5 > span { padding: 4px 0 5px; border-bottom: 1px solid rgba(143,160,156,.12); }
#pp .p5 .off5 .oj { font: italic 13.5px/1.2 var(--f-ital); color: #cfd4d1; text-transform: none; letter-spacing: 0; }
#pp .p5 .off5 b { font: 600 12.5px/1 var(--f-latin); }
#pp .p5 .hvs { gap: 8px 24px; font: italic 13.5px/1.3 var(--f-ital); }
#pp .p5 .hv { text-transform: none; letter-spacing: 0; }
#pp .p5 .hv small { font: italic 12.5px var(--f-ital); opacity: .7; margin-left: 4px; }
#pp .p5 ul.trs { gap: 16px; }
#pp .p5 .trw { gap: 12px; }
#pp .p5 .trw .tn5 { font: 600 12.5px/1.3 var(--f-latin); letter-spacing: .04em; }
#pp .p5 .trw .tf { margin-top: 4px; font: italic 13.5px/1.4 var(--f-ital); }
#pp .p5 .trw .te { margin-top: 4px; font: 11.5px/1.5 var(--f-ja); }
#pp .p5 details.bs { margin: 8px 0 0; }
#pp .md5 { margin: 4px 0 0; }
#pp .md5 svg { max-width: 420px; }
#pp, #pp * { transition-timing-function: var(--ease); }
.md5tip.tsheet { max-width: none; border-radius: 10px; padding: 12px 16px 13px; }
/* the compass faces the map north on a click (N key too) */
#compass:hover { border-color: rgba(230,234,231,.85); }
#compass:focus-visible { outline: 1px solid rgba(230,234,231,.9); outline-offset: 3px; }
