/* Digital nafuda: tall vertical wooden plates hanging from rails on a plank wall.
   EVERYTHING inside .nf-inner is in em, so the whole board scales as one unit: the wall page sets --nf-em to fill the TV,
   the members page uses a clamp() on the card width. */
@font-face{font-family:"NafudaLetter";src:url(/nafuda-letter.woff2) format("woff2");font-weight:700;font-display:swap}

.nf-board{container-type:inline-size;position:relative;border-radius:.6rem;background:linear-gradient(rgba(0,0,0,.08),rgba(0,0,0,.28)),url(/nafuda-wall.jpg);background-size:auto,34rem;box-shadow:inset 0 0 3rem rgba(0,0,0,.6)}
.nf-inner{font-size:var(--nf-em,clamp(6px,calc(100cqw / 105),10px));padding:1.5em 2em 2.2em;display:flex;flex-direction:column;align-items:center;gap:3.2em}
.nf-top,.nf-ranks{display:flex;justify-content:center;width:100%}
.nf-ranks{flex-wrap:wrap;gap:3.2em 3em;align-items:flex-start}
.nf-group{display:flex;flex-direction:column;align-items:stretch;min-width:15.5em}
.nf-group .nf-plates{justify-content:center}

/* rank label: header plaque above the row */
.nf-rankname{margin:0 0 .8em;text-align:center}
.nf-rankname span{display:block;padding:.55em .7em .6em;border-radius:.45em;background:linear-gradient(rgba(0,0,0,.25),rgba(0,0,0,.45)),url(/nafuda-rail.jpg);background-size:auto,24em 100%;border:1px solid rgba(0,0,0,.7);box-shadow:inset 0 1px 0 rgba(255,220,170,.2),.3em .5em .7em rgba(0,0,0,.55);font:700 2.25em/1.1 "Helvetica Neue",system-ui,sans-serif;letter-spacing:.07em;text-transform:uppercase;color:#f0cf7a;text-shadow:0 -1px 0 rgba(0,0,0,.8);white-space:nowrap}

/* rail the plates hang from (one per group / one for the whole top row) */
.nf-plates{position:relative;display:flex;flex-wrap:nowrap;align-items:flex-start;gap:0 1.2em;padding:0 .9em}
.nf-top .nf-plates{gap:0 3.2em;padding:0 1.6em;flex-wrap:wrap;justify-content:center}
.nf-hang{position:relative;padding-top:3.6em;flex:0 0 auto}
.nf-rail{position:absolute;left:-.7em;right:-.7em;top:0;height:1.25em;background:url(/nafuda-rail.jpg);background-size:40em 100%;box-shadow:0 .4em .7em rgba(0,0,0,.6),inset 0 1px 0 rgba(255,220,170,.22),inset 0 -2px 3px rgba(0,0,0,.5)}
.nf-hang:first-child .nf-rail{left:-1.2em;border-radius:.5em 0 0 .5em}
.nf-hang:last-child .nf-rail{right:-1.2em;border-radius:0 .5em .5em 0}
.nf-hang::before{content:"";position:absolute;top:.1em;left:50%;width:1.1em;height:1.1em;margin-left:-.55em;border-radius:50%;background:radial-gradient(circle at 35% 30%,#d8c08a,#6d5426 70%);box-shadow:0 .2em .3em rgba(0,0,0,.7);z-index:2}
.nf-hang::after{content:"";position:absolute;top:.8em;left:50%;width:.3em;height:1.9em;margin-left:-.15em;background:linear-gradient(90deg,#1b120b,#5b4128,#1b120b);box-shadow:.2em .2em .2em rgba(0,0,0,.5);z-index:1}

/* the plate: top margin (hole) / name area / rank band */
.nf-plate{--h:36em;--band:0em;--step:min(4.8em,calc((var(--h) - 4em - var(--band) - 1.4em) / var(--nf-len,7) / 1.12));
  position:relative;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;width:13.4em;height:var(--h);padding:4em .8em .9em;border-radius:.45em .45em .6em .6em;
  background-color:#cfa66b;
  background-image:linear-gradient(90deg,rgba(50,25,8,.32),rgba(0,0,0,0) 14%,rgba(0,0,0,0) 86%,rgba(50,25,8,.3)),linear-gradient(180deg,rgba(255,240,205,.16),rgba(0,0,0,0) 18%,rgba(50,25,8,.2)),url(/nafuda-plate-v.jpg);
  background-size:auto,auto,100% 100%;
  border:1px solid rgba(60,30,8,.75);
  box-shadow:inset 0 1px 0 rgba(255,245,220,.45),inset 0 -.3em .6em rgba(80,40,10,.3),inset .25em 0 .4em rgba(255,230,190,.1),.55em 1em 1.3em rgba(0,0,0,.62),0 .2em .3em rgba(0,0,0,.5);overflow:hidden}
.nf-w2{background-image:linear-gradient(90deg,rgba(50,25,8,.32),rgba(0,0,0,0) 14%,rgba(0,0,0,0) 86%,rgba(50,25,8,.3)),linear-gradient(180deg,rgba(255,240,205,.16),rgba(0,0,0,0) 18%,rgba(50,25,8,.2)),url(/nafuda-plate2-v.jpg)}
.nf-w3{background-image:linear-gradient(90deg,rgba(50,25,8,.32),rgba(0,0,0,0) 14%,rgba(0,0,0,0) 86%,rgba(50,25,8,.3)),linear-gradient(180deg,rgba(255,240,205,.16),rgba(0,0,0,0) 18%,rgba(50,25,8,.2)),url(/nafuda-plate3-v.jpg)}
.nf-plate::before{content:"";position:absolute;top:.8em;left:50%;width:.95em;height:.95em;margin-left:-.475em;border-radius:50%;background:radial-gradient(circle at 50% 60%,#1a0f07,#3a2412);box-shadow:inset 0 .15em .25em rgba(0,0,0,.8),0 1px 0 rgba(255,235,200,.45)}

/* name: one upright column per word, generous gap between columns, uniform letter pitch (--step) across the row */
.nf-name{display:flex;flex-direction:row;justify-content:center;align-items:flex-start;gap:2.1em;flex:1 1 auto;min-height:0;width:100%}
.nf-col{display:flex;flex-direction:column;align-items:center;font-size:var(--step)}
.nf-ch{display:flex;align-items:center;justify-content:center;min-width:1em;height:1.12em;font:700 .9em/1 "NafudaLetter","Hiragino Mincho ProN",serif;color:#1a0e07;text-shadow:0 1px 0 rgba(255,235,200,.4)}
/* rank text: its own band under the name, separated by a carved line */
.nf-rankband{flex:0 0 auto;width:100%;box-sizing:border-box;margin-top:.8em;padding-top:.5em;border-top:.2em solid rgba(70,35,10,.55);box-shadow:0 -1px 0 rgba(255,235,200,.4);display:flex;flex-direction:column;align-items:center;justify-content:center;height:calc(var(--band) - .8em)}
.nf-rankband span{display:block;white-space:nowrap;max-width:100%;font:700 2.35em/1.2 "Helvetica Neue",system-ui,sans-serif;letter-spacing:.035em;text-transform:uppercase;color:#4a210a;text-align:center}

/* top row: bigger plates, with a rank band */
.nf-p-founder,.nf-p-teacher,.nf-p-seniors{--h:51em;--band:8em;box-shadow:inset 0 0 0 .22em rgba(150,100,25,.0),inset 0 1px 0 rgba(255,245,220,.45),inset 0 -.3em .6em rgba(80,40,10,.3),.55em 1em 1.3em rgba(0,0,0,.62)}
.nf-p-founder{width:30em;box-shadow:inset 0 0 0 .25em rgba(150,100,25,.75),inset 0 0 0 .4em rgba(255,226,150,.4),.6em 1.1em 1.4em rgba(0,0,0,.66)}
.nf-p-teacher{width:30em;box-shadow:inset 0 0 0 .25em rgba(150,100,25,.75),inset 0 0 0 .4em rgba(255,226,150,.4),.6em 1.1em 1.4em rgba(0,0,0,.66)}
.nf-p-seniors{width:30em}
.nf-p-founder .nf-rankband{color:#6b2a10}
.nf-p-student{--h:41em;--band:0em}
.nf-p-student .nf-name{gap:1.9em}
.nf-mine{outline:.35em solid #3d7ea6;outline-offset:.25em}

/* wall screen: fixed design width, scaled by wall.js so it fills the display */
body.nf-wall{margin:0;min-height:100vh;overflow:hidden;color:#f4ead6;background:radial-gradient(ellipse at 50% 40%,rgba(0,0,0,0) 40%,rgba(0,0,0,.55) 100%),linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.3)),url(/nafuda-wall.jpg);background-size:auto,auto,40rem;font-family:"Helvetica Neue",system-ui,sans-serif}
.nf-wall #nf-stage{box-sizing:border-box;height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:0}
.nf-wall header.nf-head{display:flex;align-items:center;justify-content:center;gap:.9rem;padding:.45rem 0 .1rem;flex:0 0 auto}
.nf-wall header.nf-head img{width:2.6rem;height:2.6rem;object-fit:contain;filter:drop-shadow(0 .15rem .2rem rgba(0,0,0,.7))}
.nf-wall .nf-title{font:700 1.3rem/1.05 "Helvetica Neue",system-ui,sans-serif;letter-spacing:.14em;text-transform:uppercase;text-shadow:0 .1rem .2rem rgba(0,0,0,.8)}
.nf-wall .nf-title small{display:block;margin-top:.12rem;font:600 .7rem/1 "Helvetica Neue",system-ui,sans-serif;letter-spacing:.32em;color:#e0b94c}
.nf-wall .nf-rule{display:none}
.nf-wall #nf-root{width:100%;flex:1 1 auto;display:flex;justify-content:center}
.nf-wall .nf-board{background:none;box-shadow:none;border-radius:0;container-type:normal}
.nf-wall .nf-inner{width:172em;padding:.3em 0 0;gap:2.4em}
.nf-wall .nf-ranks{flex-wrap:nowrap;gap:0 2.6em}
.nf-wall .nf-top .nf-plates{flex-wrap:nowrap}
