/* ============================================================
   namu.land — cadastral-isometric land registry plate
   Single 2400 px horizontal scroll-snap plate divided into
   seven labelled frames. Eight flat hand-mixed inks on
   mulberry-paper base, no gradients, no parallax.
   ============================================================ */

/* ------------------------------------------------------------
   0. PALETTE — eight flat hand-mixed inks (no gradients)
   --------------------------------------------------------------
   #F2EBD8  mulberry-paper base
   #1B1A14  sumi ink
   #5C4A2E  walnut iron-gall
   #C9A86B  ochre wash (parcel, cartouche borders, date-stamp circles)
   #7A6E58  rule-line grey
   #A93226  vermillion seal-ink
   #3B5066  survey indigo
   #7B8C5A  lichen green
   ------------------------------------------------------------ */
:root {
    --paper:     #F2EBD8;
    --sumi:      #1B1A14;
    --walnut:    #5C4A2E;
    --ochre:     #C9A86B;
    --rule-grey: #7A6E58;
    --vermillion:#A93226;
    --indigo:    #3B5066;
    --lichen:    #7B8C5A;
}

/* ------------------------------------------------------------
   0. RESET (minimal)
   ------------------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    background: #F2EBD8;
    /* ensure font-size baseline */
    font-size: 17px;
}

body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: #F2EBD8;
    /* hand-photographed mulberry paper texture, 3% opacity overlay,
       fibres aligned along the horizontal axis */
    background-image:
        /* horizontal long-fibre direction */
        repeating-linear-gradient(
            90deg,
            rgba(27, 26, 20, 0.012) 0px,
            rgba(27, 26, 20, 0.012) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(27, 26, 20, 0.018) 0px,
            rgba(27, 26, 20, 0.018) 1px,
            transparent 1px,
            transparent 11px
        ),
        /* sparse short fibre cross-hatching */
        repeating-linear-gradient(
            87deg,
            rgba(92, 74, 46, 0.012) 0px,
            rgba(92, 74, 46, 0.012) 1px,
            transparent 1px,
            transparent 23px
        ),
        /* faint horizon shading */
        linear-gradient(
            180deg,
            transparent 0%,
            rgba(122, 110, 88, 0.04) 100%
        );
    color: #1B1A14;
    font-family: "Nanum Myeongjo", "EB Garamond", serif;
    font-size: 17px;
    line-height: 30px;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

/* ------------------------------------------------------------
   1. THE PLATE — horizontal scroll container, 7 frames
   ------------------------------------------------------------ */
.plate {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100vw;
    height: calc(100vh - 32px);  /* leave 32px for the bottom ruler-strip */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* hide scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #7A6E58 transparent;
}
.plate::-webkit-scrollbar {
    height: 6px;
}
.plate::-webkit-scrollbar-track {
    background: transparent;
}
.plate::-webkit-scrollbar-thumb {
    background: #7A6E58;
    border-radius: 0;
}

/* ------------------------------------------------------------
   2. FRAME — common chrome
   ------------------------------------------------------------ */
.frame {
    position: relative;
    flex: 0 0 auto;
    min-width: 100vw;
    width: 100vw;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 60px 80px 80px 80px;
    border-right: 0.5px solid #7A6E58;
}
.frame:last-child {
    border-right: none;
}

/* hairline corner crosshairs */
.frame-corners .cc {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: #7A6E58;
    border-style: solid;
    border-width: 0;
}
.frame-corners .tl {
    top: 18px; left: 18px;
    border-top-width: 0.5px;
    border-left-width: 0.5px;
}
.frame-corners .tr {
    top: 18px; right: 18px;
    border-top-width: 0.5px;
    border-right-width: 0.5px;
}
.frame-corners .bl {
    bottom: 18px; left: 18px;
    border-bottom-width: 0.5px;
    border-left-width: 0.5px;
}
.frame-corners .br {
    bottom: 18px; right: 18px;
    border-bottom-width: 0.5px;
    border-right-width: 0.5px;
}

/* tiny crosshair tick at each corner */
.frame-corners .cc::before,
.frame-corners .cc::after {
    content: "";
    position: absolute;
    background: #7A6E58;
}
.frame-corners .tl::before { top: -3px; left: 0; width: 0.5px; height: 6px; }
.frame-corners .tl::after  { top: 0; left: -3px; width: 6px; height: 0.5px; }
.frame-corners .tr::before { top: -3px; right: 0; width: 0.5px; height: 6px; }
.frame-corners .tr::after  { top: 0; right: -3px; width: 6px; height: 0.5px; }
.frame-corners .bl::before { bottom: -3px; left: 0; width: 0.5px; height: 6px; }
.frame-corners .bl::after  { bottom: 0; left: -3px; width: 6px; height: 0.5px; }
.frame-corners .br::before { bottom: -3px; right: 0; width: 0.5px; height: 6px; }
.frame-corners .br::after  { bottom: 0; right: -3px; width: 6px; height: 0.5px; }

/* ------------------------------------------------------------
   3. FRAME HEAD (heading, numeral, gloss)
   ------------------------------------------------------------ */
.frame-head {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 24px;
    padding-bottom: 10px;
    border-bottom: 0.5px solid #7A6E58;
    margin-bottom: 24px;
}
.frame-numeral {
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #5C4A2E;
    text-transform: uppercase;
}
.frame-title {
    font-family: "Nanum Myeongjo", serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1;
    letter-spacing: 0.04em;
    color: #1B1A14;
}
.frame-gloss {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 14px;
    line-height: 24px;
    color: #5C4A2E;
    margin-left: auto;
    text-align: right;
    max-width: 520px;
}

/* ------------------------------------------------------------
   4. FRAME BODY common
   ------------------------------------------------------------ */
.frame-body {
    position: relative;
    height: calc(100% - 90px);
    display: grid;
    align-content: start;
}

/* page numeral lower-left */
.page-num {
    position: absolute;
    bottom: 30px;
    left: 80px;
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: #7A6E58;
}

/* small in-frame compass */
.frame-compass {
    position: absolute;
    width: 56px;
    height: 56px;
    bottom: 30px;
    right: 80px;
    opacity: 0.85;
}

/* ------------------------------------------------------------
   5. FRAME TRANSITION (closing red italic phrase)
   ------------------------------------------------------------ */
.frame-transition {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #A93226;
    font-style: italic;
    line-height: 1.3;
}
.ko-transition {
    font-family: "Nanum Myeongjo", serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.04em;
}
.en-transition {
    font-family: "EB Garamond", serif;
    font-size: 13px;
    color: #A93226;
    margin-top: 2px;
}

/* ------------------------------------------------------------
   6. MARGINALIA (right-edge red ink)
   ------------------------------------------------------------ */
.marginalia {
    position: absolute;
    right: 80px;
    top: 0;
    max-width: 240px;
    color: #A93226;
    font-family: "EB Garamond", serif;
    font-size: 13px;
    line-height: 18px;
    font-style: italic;
}
.marginalia .margin-tick {
    color: #A93226;
    font-style: normal;
    margin-right: 4px;
}
.marginalia .m-line {
    margin: 6px 0;
    padding-left: 36px;
    position: relative;
}
.marginalia .m-id {
    position: absolute;
    left: 0;
    top: 0;
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #A93226;
    font-style: normal;
}

/* ============================================================
   FRAME I — TITLE PLATE
   ============================================================ */
.title-body {
    grid-template-columns: 360px 1fr;
    grid-template-rows: 540px auto;
    column-gap: 60px;
    row-gap: 40px;
    padding-right: 280px; /* leave room for marginalia */
}

.cartouche {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    width: 360px;
    height: 460px;
    padding: 40px 30px;
}
.cartouche-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.cartouche-inner {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 0;
}
.seal-script {
    font-family: "Nanum Myeongjo", serif;
    font-weight: 800;
    font-size: 34px;
    letter-spacing: 0.18em;
    color: #1B1A14;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.seal-script .korean-num {
    font-size: 56px;
    line-height: 1;
    letter-spacing: 0;
    color: #5C4A2E;
}
.seal-script .num {
    font-size: 30px;
    letter-spacing: 0.05em;
    color: #1B1A14;
}
.seal-script .dash {
    font-size: 24px;
    color: #7A6E58;
}
.seal-script > span:first-child {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 14px;
    color: #5C4A2E;
    letter-spacing: 0.1em;
}
.cartouche-rule {
    width: 220px;
    height: 0.5px;
    background: #7A6E58;
    margin: 18px 0;
    box-shadow: 0 4px 0 -3.5px #C9A86B; /* ochre echo rule */
}
.cartouche-rule.short {
    width: 100px;
}
.cartouche-label {
    font-family: "Nanum Myeongjo", serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.16em;
    color: #1B1A14;
}
.cartouche-label-en {
    font-family: "EB Garamond", serif;
    font-size: 13px;
    color: #5C4A2E;
    margin-top: 2px;
}
.datestamp {
    width: 110px;
    height: 110px;
    margin-top: 20px;
}
.datestamp svg {
    width: 100%;
    height: 100%;
}
.cartouche-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 0.5px dashed #7A6E58;
    width: 220px;
    text-align: center;
}
.cartouche-foot .serial {
    font-family: "Special Elite", monospace;
    font-size: 10px;
    letter-spacing: 0.06em;
    color: #1B1A14;
}
.cartouche-foot .serial span {
    color: #5C4A2E;
}
.tiny-gloss {
    font-family: "EB Garamond", serif;
    font-size: 11px;
    color: #5C4A2E;
    margin-top: 2px;
}

.parcel-iso {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    position: relative;
}
.parcel-iso svg {
    width: 100%;
    max-width: 720px;
    height: auto;
    display: block;
}
.parcel-shape {
    fill-opacity: 0.7;
}
.parcel-caption {
    margin-top: 10px;
    font-family: "Nanum Myeongjo", serif;
    font-size: 14px;
    line-height: 22px;
    color: #1B1A14;
    text-align: left;
}
.parcel-caption .ko {
    display: block;
}
.parcel-caption .en {
    display: block;
    font-family: "EB Garamond", serif;
    font-size: 13px;
    line-height: 20px;
    color: #5C4A2E;
    margin-left: 1.5em;
    margin-top: 2px;
}

.title-prose {
    grid-column: 1 / span 2;
    grid-row: 2;
    max-width: 760px;
    padding-top: 10px;
    border-top: 0.5px solid #7A6E58;
}
.title-prose p.ko {
    font-family: "Nanum Myeongjo", serif;
    font-size: 17px;
    line-height: 30px;
    color: #1B1A14;
    margin-top: 14px;
}
.title-prose p.en {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 14px;
    line-height: 24px;
    color: #5C4A2E;
    margin-left: 1.5em;
    margin-top: 2px;
}

/* ============================================================
   FRAME II — BOUNDARIES
   ============================================================ */
.boundary-body {
    grid-template-columns: 1fr 280px;
    grid-template-rows: auto auto;
    column-gap: 40px;
    row-gap: 20px;
    padding-right: 80px;
}
.boundary-engraving {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 100%;
    max-width: 1200px;
    align-self: start;
}
.boundary-engraving svg {
    width: 100%;
    height: auto;
    display: block;
}

.boundary-key {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding: 16px 20px;
    border: 0.5px solid #7A6E58;
    background: rgba(242, 235, 216, 0.4);
}
.boundary-key h3 {
    font-family: "Nanum Myeongjo", serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.04em;
    color: #1B1A14;
    margin-bottom: 12px;
    border-bottom: 0.5px solid #7A6E58;
    padding-bottom: 6px;
}
.boundary-key h3 .gloss {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 12px;
    color: #5C4A2E;
    margin-left: 6px;
}
.boundary-key ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.boundary-key li {
    display: grid;
    grid-template-columns: 38px auto 1fr;
    column-gap: 10px;
    align-items: center;
    font-family: "Nanum Myeongjo", serif;
    font-size: 13px;
    color: #1B1A14;
}
.boundary-key li i {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    color: #5C4A2E;
}
.boundary-key li .ko {
    font-size: 13px;
}
.boundary-key li > span:first-child {
    display: block;
    width: 38px;
    height: 10px;
}
.key-stone {
    background: repeating-linear-gradient(45deg, #1B1A14 0 1px, transparent 1px 4px);
}
.key-stream {
    background: repeating-linear-gradient(45deg, #3B5066 0 1px, transparent 1px 3px);
    height: 10px;
    border-top: 0.5px solid #3B5066;
    border-bottom: 0.5px solid #3B5066;
}
.key-path {
    border-top: 1px dashed #1B1A14;
    background: none;
    height: 1px;
    margin-top: 4px;
}
.key-dashed {
    border-top: 1px dashed #1B1A14;
    background: none;
    height: 1px;
    margin-top: 4px;
    opacity: 0.7;
}

.stones-notes {
    position: static;
    grid-column: 2;
    grid-row: 2;
    padding-left: 0;
    margin-top: 0;
    max-width: 280px;
}

/* ============================================================
   FRAME III — TREE CENSUS
   ============================================================ */
.census-body {
    grid-template-columns: 1fr 220px;
    grid-template-rows: auto auto 1fr;
    column-gap: 40px;
    row-gap: 12px;
    padding-right: 80px;
}

.census-rule-row {
    grid-column: 1 / span 2;
    grid-row: 1;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 28px;
    padding-bottom: 8px;
    border-bottom: 0.5px solid #3B5066;
    font-family: "Nanum Myeongjo", serif;
    font-size: 14px;
    color: #1B1A14;
}
.census-rule-row .en {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 13px;
    color: #5C4A2E;
}
.census-rule-row .surveyor {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    color: #5C4A2E;
    margin-left: auto;
    letter-spacing: 0.04em;
}

.census-col-header {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(22, 1fr);
    column-gap: 0;
    border-bottom: 0.5px solid #3B5066;
    padding-bottom: 4px;
    font-family: "Special Elite", monospace;
    font-size: 8px;
    letter-spacing: 0.04em;
    color: #3B5066;
}
.census-col-header span {
    text-align: center;
    border-right: 0.5px solid rgba(59, 80, 102, 0.18);
}
.census-col-header span:last-child { border-right: none; }

.census-grid {
    grid-column: 1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(22, 1fr);
    grid-auto-rows: 36px;
    align-self: start;
    padding-top: 4px;
}

.census-cell {
    width: 100%;
    height: 36px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-right: 0.5px solid rgba(59, 80, 102, 0.16);
    border-bottom: 0.5px solid rgba(59, 80, 102, 0.10);
    cursor: crosshair;
    position: relative;
    transition: background-color 200ms ease-out;
}
/* every fifth row darker rule */
.census-grid > .census-cell.row-rule {
    border-bottom-color: rgba(59, 80, 102, 0.45);
}
.census-cell:hover {
    background-color: rgba(201, 168, 107, 0.18);
}
.census-cell svg {
    width: 22px;
    height: 30px;
    display: block;
    pointer-events: none;
}
.census-cell.dead svg {
    opacity: 0.55;
}

.census-legend {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: start;
    padding: 14px 18px;
    border: 0.5px solid #7A6E58;
}
.census-legend h3 {
    font-family: "Nanum Myeongjo", serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.04em;
    color: #1B1A14;
    margin-bottom: 12px;
    border-bottom: 0.5px solid #7A6E58;
    padding-bottom: 6px;
}
.census-legend h3 .gloss {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 12px;
    color: #5C4A2E;
    margin-left: 6px;
}
.census-legend ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.census-legend li {
    display: grid;
    grid-template-columns: 28px auto 1fr;
    column-gap: 10px;
    align-items: center;
    font-family: "Nanum Myeongjo", serif;
    font-size: 13px;
    color: #1B1A14;
}
.census-legend li svg {
    width: 22px;
    height: 30px;
}
.census-legend li i {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    color: #5C4A2E;
}
.census-legend .legend-note {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 0.5px dashed #7A6E58;
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    color: #A93226;
    text-align: center;
}

/* ------------------------------------------------------------
   Hover card (tree census)
   ------------------------------------------------------------ */
.hover-card {
    position: fixed;
    pointer-events: none;
    width: 240px;
    background: #F2EBD8;
    border: 0.5px solid #1B1A14;
    box-shadow: 1px 1px 0 #7A6E58;
    padding: 12px 14px;
    z-index: 60;
    opacity: 0;
    transition: opacity 200ms ease-out;
    font-family: "Nanum Myeongjo", serif;
    color: #1B1A14;
}
.hover-card.visible {
    opacity: 1;
}
.hover-card .hc-id {
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #A93226;
    border-bottom: 0.5px solid #7A6E58;
    padding-bottom: 4px;
    margin-bottom: 6px;
}
.hover-card .hc-species {
    font-family: "Nanum Myeongjo", serif;
    font-weight: 700;
    font-size: 16px;
    color: #1B1A14;
}
.hover-card .hc-binomial {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-variant: small-caps;
    font-size: 12px;
    color: #5C4A2E;
    margin-bottom: 8px;
}
.hover-card .hc-row {
    display: flex;
    justify-content: space-between;
    font-family: "EB Garamond", serif;
    font-size: 12px;
    line-height: 18px;
}
.hover-card .hc-label {
    color: #5C4A2E;
}
.hover-card .hc-value {
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #1B1A14;
}
.hover-card .hc-foot {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 0.5px dashed #7A6E58;
    text-align: right;
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 11px;
    color: #5C4A2E;
}
.hover-card .hc-initials {
    font-family: "Special Elite", monospace;
    font-style: normal;
    color: #A93226;
    letter-spacing: 0.1em;
}

/* ============================================================
   FRAME IV — CROSS SECTION
   ============================================================ */
.section-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 18px;
    padding-right: 80px;
}
.section-engraving {
    width: 100%;
    max-width: 1800px;
    align-self: start;
}
.section-engraving svg {
    width: 100%;
    height: auto;
    display: block;
}
.section-caption {
    max-width: 1100px;
}
.section-caption p.ko {
    font-family: "Nanum Myeongjo", serif;
    font-size: 17px;
    line-height: 30px;
    color: #1B1A14;
}
.section-caption p.en {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 14px;
    line-height: 24px;
    color: #5C4A2E;
    margin-left: 1.5em;
    margin-top: 2px;
}

/* ============================================================
   FRAME V — TITLE-DEED REGISTER
   ============================================================ */
.register-body {
    grid-template-columns: 1fr 280px;
    grid-template-rows: auto;
    column-gap: 40px;
    padding-right: 80px;
}
.reg-stamp {
    position: absolute;
    top: 6px;
    right: 320px;
    width: 110px;
    height: 110px;
    transform: rotate(-7deg);
    z-index: 5;
    pointer-events: none;
}
.reg-stamp svg {
    width: 100%;
    height: 100%;
}

.register {
    grid-column: 1;
    width: 100%;
    border-collapse: collapse;
    font-family: "Nanum Myeongjo", serif;
    font-size: 14px;
    color: #1B1A14;
    table-layout: fixed;
}
.register colgroup .col-no { width: 64px; }
.register colgroup .col-date { width: 200px; }
.register colgroup .col-event { width: auto; }

.register thead th {
    text-align: left;
    padding: 8px 10px 6px 10px;
    border-bottom: 0.8px solid #1B1A14;
    border-top: 0.8px solid #1B1A14;
    font-family: "Nanum Myeongjo", serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #1B1A14;
    background: rgba(122, 110, 88, 0.06);
}
.register thead th i {
    font-family: "EB Garamond", serif;
    font-weight: 400;
    font-size: 11px;
    color: #5C4A2E;
    margin-left: 4px;
}
.register .th-no {
    text-align: center;
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
}

.register tbody tr {
    border-bottom: 0.5px solid #7A6E58;
    height: 22px;
}
.register tbody tr:last-child {
    border-bottom: 0.8px solid #1B1A14;
}

.register tbody td {
    padding: 6px 10px;
    vertical-align: top;
    line-height: 18px;
}
.register .cell-no {
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #1B1A14;
    text-align: center;
    background: rgba(122, 110, 88, 0.04);
}
.register .cell-date {
    font-family: "Nanum Myeongjo", serif;
    font-size: 13px;
    color: #1B1A14;
}
.register .cell-date .ko {
    display: block;
}
.register .cell-date .en {
    display: block;
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 11px;
    color: #5C4A2E;
    margin-top: 1px;
    margin-left: 0.6em;
}
.register .cell-event {
    font-family: "Nanum Myeongjo", serif;
    font-size: 13px;
    line-height: 20px;
    color: #1B1A14;
}
.register .cell-event .ko {
    display: block;
}
.register .cell-event .en {
    display: block;
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    line-height: 18px;
    color: #5C4A2E;
    margin-left: 1.5em;
    margin-top: 1px;
}

/* older entries (pre-1953) walnut tone */
.register tr.r-old td {
    color: #5C4A2E;
}
.register tr.r-old .cell-no {
    color: #5C4A2E;
}

/* current-edition entries with red ink emphasis */
.register tr.r-current .cell-no {
    color: #A93226;
    background: rgba(169, 50, 38, 0.05);
}
.register tr.r-now {
    background: rgba(201, 168, 107, 0.10);
}
.register tr.r-now .cell-event {
    font-weight: 700;
}

.register-margin {
    grid-column: 2;
    position: static;
    align-self: start;
    margin-top: 50px;
    max-width: 280px;
}

/* ============================================================
   FRAME VI — FIELD-DAY LOGBOOK
   ============================================================ */
.logbook-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 16px;
    padding-right: 80px;
}

.stewards-key {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 0.5px solid #7A6E58;
    font-family: "Nanum Myeongjo", serif;
    font-size: 14px;
    color: #1B1A14;
}
.stewards-key i {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    color: #5C4A2E;
    margin-right: 8px;
}
.steward-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    padding: 2px 8px;
    border: 0.5px solid #7A6E58;
}
.steward-chip .mono {
    font-family: "Yeon Sung", "Nanum Myeongjo", serif;
    font-style: normal;
    font-size: 16px;
    line-height: 1;
}
.steward-chip.s-lee  { color: #5C4A2E; border-color: #5C4A2E; }
.steward-chip.s-lee  .mono { color: #5C4A2E; }
.steward-chip.s-park { color: #3B5066; border-color: #3B5066; }
.steward-chip.s-park .mono { color: #3B5066; }
.steward-chip.s-cho  { color: #7B8C5A; border-color: #7B8C5A; }
.steward-chip.s-cho  .mono { color: #7B8C5A; }
.steward-chip.s-kang { color: #A93226; border-color: #A93226; }
.steward-chip.s-kang .mono { color: #A93226; }

.logbook-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(190px, auto);
    column-gap: 22px;
    row-gap: 22px;
    padding-top: 4px;
}

.log-entry {
    position: relative;
    padding: 14px 16px 14px 56px;
    border-left: 0.8px solid;
    background: rgba(242, 235, 216, 0.5);
    font-family: "Nanum Myeongjo", serif;
    font-size: 14px;
    line-height: 22px;
    color: #1B1A14;
}
.log-entry.steward-lee  { border-left-color: #5C4A2E; }
.log-entry.steward-park { border-left-color: #3B5066; }
.log-entry.steward-cho  { border-left-color: #7B8C5A; }
.log-entry.steward-kang { border-left-color: #A93226; }

.log-monogram {
    position: absolute;
    top: 14px;
    left: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid;
    font-family: "Yeon Sung", "Nanum Myeongjo", serif;
    font-size: 28px;
    line-height: 1;
}
.log-entry.steward-lee  .log-monogram { color: #5C4A2E; border-color: #5C4A2E; }
.log-entry.steward-park .log-monogram { color: #3B5066; border-color: #3B5066; }
.log-entry.steward-cho  .log-monogram { color: #7B8C5A; border-color: #7B8C5A; }
.log-entry.steward-kang .log-monogram { color: #A93226; border-color: #A93226; }

.log-date {
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #5C4A2E;
    border-bottom: 0.5px dashed #7A6E58;
    padding-bottom: 4px;
    margin-bottom: 6px;
}
.log-date .ko { display: inline-block; margin-right: 8px; }
.log-date .en { font-family: "EB Garamond", serif; font-style: italic; font-size: 11px; color: #5C4A2E; }

.log-body {
    margin: 4px 0;
}
.log-body.ko {
    font-family: "Nanum Myeongjo", serif;
    font-size: 14px;
    line-height: 22px;
    color: #1B1A14;
}
.log-body.en {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    line-height: 18px;
    color: #5C4A2E;
    margin-left: 1.2em;
}

.log-margin {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 0.5px dashed #7A6E58;
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 11px;
    color: #A93226;
}

.log-leaf {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 28px;
    opacity: 0.85;
}

/* ============================================================
   FRAME VII — SEAL PLATE
   ============================================================ */
.seal-body {
    grid-template-columns: 360px 1fr 200px;
    grid-template-rows: auto auto;
    column-gap: 50px;
    row-gap: 30px;
    padding-right: 80px;
}

.great-seal {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 360px;
    height: 360px;
    align-self: center;
    justify-self: center;
}
.great-seal svg {
    width: 100%;
    height: 100%;
}

.steward-column {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 18px;
    border: 0.5px solid #7A6E58;
}
.steward.vert {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0;
    border-bottom: 0.5px dashed #7A6E58;
}
.steward.vert:last-child { border-bottom: none; }
.steward .mono {
    font-family: "Yeon Sung", "Nanum Myeongjo", serif;
    font-size: 38px;
    line-height: 1;
    margin-bottom: 4px;
}
.steward .full {
    font-family: "Nanum Myeongjo", serif;
    font-size: 14px;
    line-height: 1.4;
    color: #1B1A14;
}
.steward .en {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 11px;
    color: #5C4A2E;
    margin-top: 2px;
}
.steward.s-lee  .mono { color: #5C4A2E; }
.steward.s-park .mono { color: #3B5066; }
.steward.s-cho  .mono { color: #7B8C5A; }
.steward.s-kang .mono { color: #A93226; }

.edition-strip {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 18px;
    border-top: 0.5px solid #7A6E58;
    border-bottom: 0.5px solid #7A6E58;
}
.edition-line {
    font-family: "Nanum Myeongjo", serif;
    font-size: 13px;
    line-height: 22px;
    color: #1B1A14;
    display: grid;
    grid-template-columns: 110px 90px 1fr;
    align-items: baseline;
    gap: 8px;
}
.edition-line i {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 12px;
    color: #5C4A2E;
}
.edition-line .num {
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #1B1A14;
}

.seal-prose {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    max-width: 600px;
    text-align: center;
    padding: 16px;
}
.seal-prose p.ko {
    font-family: "Nanum Myeongjo", serif;
    font-size: 17px;
    line-height: 30px;
    color: #1B1A14;
    margin: 4px 0;
}
.seal-prose p.en {
    font-family: "EB Garamond", serif;
    font-style: italic;
    font-size: 14px;
    line-height: 24px;
    color: #5C4A2E;
    margin: 0 0 18px 0;
}
.seal-prose p.ko:nth-of-type(2) {
    font-style: italic;
    color: #A93226;
    letter-spacing: 0.18em;
    margin-top: 18px;
}
.seal-prose p.en:nth-of-type(2) {
    color: #A93226;
}

.notary-tick {
    position: absolute;
    bottom: 26px;
    right: 26px;
    width: 52px;
    height: 52px;
    opacity: 0.75;
}

/* hide the closing italic transition on the final frame (it has no successor) */
.frame-vii .frame-transition {
    display: none;
}

/* ------------------------------------------------------------
   7. RULER STRIP — bottom fixed engineer's ruler
   ------------------------------------------------------------ */
.ruler-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 32px;
    background: #F2EBD8;
    border-top: 0.5px solid #7A6E58;
    z-index: 50;
    overflow: hidden;
}
.ruler-svg {
    width: 100%;
    height: 32px;
    display: block;
}
.ruler-tick {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 22px;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    pointer-events: none;
    margin-left: -8px;
}
.ruler-tick svg {
    width: 100%;
    height: 100%;
}

.ruler-legend {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Special Elite", monospace;
    font-size: 10px;
    letter-spacing: 0.06em;
    color: #1B1A14;
    background: #F2EBD8;
    padding: 0 4px;
}
.ruler-legend .ko {
    font-family: "Nanum Myeongjo", serif;
    font-weight: 700;
    font-size: 11px;
    color: #1B1A14;
}
.ruler-legend .position-mm {
    font-family: "Special Elite", monospace;
    color: #A93226;
    min-width: 4ch;
    text-align: right;
}
.ruler-legend .of-total {
    color: #7A6E58;
}

/* ------------------------------------------------------------
   8. FRAME INDICATOR — top-left small chip
   ------------------------------------------------------------ */
.frame-indicator {
    position: fixed;
    top: 14px;
    left: 18px;
    z-index: 60;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    border: 0.5px solid #7A6E58;
    background: rgba(242, 235, 216, 0.92);
    font-family: "Nanum Myeongjo", serif;
    font-size: 13px;
    color: #1B1A14;
}
.fi-numeral {
    font-family: "Special Elite", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #A93226;
}
.fi-divider { color: #7A6E58; }
.fi-label {
    font-family: "Nanum Myeongjo", serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
}

/* ------------------------------------------------------------
   9. ANIMATIONS — minimal, per design
   ------------------------------------------------------------ */
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* the only animations: hover-card fade, ruler-tick translate (transform) */
