:root {
    --purple-900: #2d1747;
    --purple-800: #45296b;
    --purple-700: #5d3787;
    --purple-100: #f1ebf7;
    --paper: #fffdfa;
    --ink: #24212a;
    --muted: #6f6877;
    --line: #d8d0df;
    --gold: #c8902d;
    --orange: #d57a00;
    --red: #b4232f;
    --blue: #234d9a;
    --shadow: 0 14px 34px rgba(45, 23, 71, .14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #eee9f1;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "Trebuchet MS", Arial, sans-serif;
    background:
        radial-gradient(circle at 15% 10%, rgba(93, 55, 135, .08), transparent 28rem),
        linear-gradient(180deg, #f8f5fa 0, #eee9f1 100%);
}

button,
input,
select {
    font: inherit;
}

button,
a
.brand-block {
    min-width: 0;
}

.band-account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}

.connected-login {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 9px;
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .10);
    font-size: .82rem;
}

.connected-login span {
    flex: 0 0 auto;
}

.connected-login strong {
    overflow: hidden;
    max-width: min(34vw, 310px);
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.band-button {
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

button:not(:disabled):hover,
a.band-button:hover {
    transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(200, 144, 45, .45);
    outline-offset: 2px;
}

.top-band,
.bottom-band {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #fff;
    background: linear-gradient(115deg, var(--purple-900), var(--purple-700));
    box-shadow: 0 5px 18px rgba(45, 23, 71, .2);
}

.top-band {
    min-height: 86px;
    padding: 14px clamp(18px, 4vw, 48px);
}

.bottom-band {
    min-height: 48px;
    padding: 10px clamp(18px, 4vw, 48px);
    font-size: .88rem;
}

.brand-title {
    font-size: clamp(1.25rem, 2.7vw, 2rem);
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.brand-subtitle {
    margin-top: 4px;
    color: #eadff5;
    font-size: .94rem;
}

.band-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 9px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 22px;
    width: min(1680px, 100%);
    margin: 0 auto;
    padding: 22px;
}

.left-panel {
    position: sticky;
    top: 18px;
    align-self: start;
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 18px;
    border: 1px solid rgba(69, 41, 107, .2);
    border-radius: 18px;
    background: rgba(255, 253, 250, .97);
    box-shadow: var(--shadow);
}

.panel-section + .panel-section {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
}

.panel-section h2,
.summary-card h2,
.practitioner-card h2 {
    margin: 0 0 12px;
    color: var(--purple-800);
    font-size: 1.08rem;
}

label {
    display: block;
    margin: 10px 0 5px;
    color: #4b4352;
    font-size: .9rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #beb4c7;
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
}

.celebrity-panel {
    display: grid;
    gap: 4px;
}

.celebrity-panel #celebrityResults {
    min-height: 168px;
    padding: 5px;
    line-height: 1.35;
}

.celebrity-panel #celebrityResults option {
    padding: 5px 7px;
    white-space: normal;
}

.celebrity-load-button {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(115deg, var(--purple-800), var(--purple-700));
    box-shadow: 0 5px 13px rgba(69, 41, 107, .18);
    font-weight: 800;
    cursor: pointer;
}

.celebrity-load-button:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

#celebrityHelp {
    display: block;
    min-height: 2.8em;
    margin-top: 7px;
    color: var(--muted);
    line-height: 1.35;
}

.modern-date-field {
    position: relative;
}

.modern-date-field::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    width: 18px;
    height: 18px;
    border: 2px solid var(--purple-700);
    border-radius: 4px;
    pointer-events: none;
    transform: translateY(-50%);
}

.modern-date-field::after {
    content: "";
    position: absolute;
    top: calc(50% - 4px);
    left: 12px;
    z-index: 1;
    width: 18px;
    height: 2px;
    background: var(--purple-700);
    pointer-events: none;
}

.modern-date-field input[type="date"] {
    min-height: 48px;
    padding-left: 42px;
    color-scheme: light;
    cursor: pointer;
    background: linear-gradient(180deg, #fff, #faf7fc);
}

.modern-date-field input[type="date"]::-webkit-calendar-picker-indicator {
    width: 26px;
    height: 26px;
    cursor: pointer;
    opacity: .78;
}

small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.35;
}

.year-control {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    gap: 6px;
}

.year-control button,
.action-grid button {
    min-height: 42px;
    border: 1px solid #b7abc2;
    border-radius: 9px;
    color: var(--purple-900);
    background: #f4eff7;
    cursor: pointer;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.uppercase-input {
    text-transform: uppercase;
}

.birth-calculate-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 9px;
    align-items: stretch;
}

.birth-calculate-row .modern-date-field,
.birth-calculate-row .modern-date-field input {
    width: 100%;
    height: 100%;
}

.square-icon-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    padding: 0;
    border: 1px solid #b7abc2;
    border-radius: 11px;
    color: var(--purple-900);
    background: linear-gradient(180deg, #fff, #f1ebf7);
    box-shadow: 0 5px 12px rgba(45, 23, 71, .10);
    cursor: pointer;
}

.square-icon-button svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.square-icon-button:not(:disabled):active {
    transform: translateY(0) scale(.96);
}

.calculate-icon-button {
    border-color: #168a12;
    color: #fff;
    background: linear-gradient(135deg, #28a51d, #168a12);
    box-shadow: 0 7px 15px rgba(22, 138, 18, .24);
}


.calculate-icon-button:hover {
    background: linear-gradient(135deg, #31b725, #17800f);
}


.calculate-icon-button .validation-box {
    opacity: .96;
}

.calculate-icon-button .validation-mark {
    stroke-width: 3.2;
}

.quick-actions-row {
    display: grid;
    grid-template-columns: repeat(3, 52px);
    gap: 10px;
    justify-content: start;
    margin-top: 12px;
}

.zone8-heading-row {
    display: grid;
    grid-template-columns: minmax(112px, .85fr) minmax(0, 1.35fr);
    gap: 8px;
    align-items: center;
    margin-top: 18px;
}

.zone8-heading-row label {
    margin: 0;
    color: var(--purple-800);
    font-size: .88rem;
    letter-spacing: .035em;
}

.zone8-heading-row select {
    min-height: 42px;
    padding: 6px 8px;
    font-size: .82rem;
}

.year-control {
    margin-top: 8px;
}

.year-control button:disabled,
.year-control input:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.primary-button {
    border-color: var(--purple-800) !important;
    color: #fff !important;
    background: linear-gradient(120deg, var(--purple-800), var(--purple-700)) !important;
    box-shadow: 0 6px 14px rgba(69, 41, 107, .2);
}

.primary-button.wide {
    width: 100%;
    min-height: 46px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.alert {
    margin-top: 14px;
    padding: 11px 12px;
    border-radius: 9px;
    background: #f4eff7;
}

.alert.error {
    color: #8f1d2c;
    background: #fff0f2;
    border: 1px solid #e9b3bb;
}

.main-content {
    min-width: 0;
}

.identity-strip {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 13px 18px;
    border: 1px solid rgba(69, 41, 107, .18);
    border-radius: 13px;
    background: rgba(255, 253, 250, .92);
    box-shadow: 0 6px 18px rgba(45, 23, 71, .07);
}

.identity-strip span {
    color: var(--muted);
    text-align: right;
}

.rdn-board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    grid-template-rows: repeat(5, minmax(172px, auto));
    grid-template-areas:
        ". . z12 . ."
        ". z6 z1 z8 ."
        "z9 z2 z5 z4 z13"
        ". z7 z3 z10 ."
        ". . z11 . z14";
    gap: 14px;
    min-height: 1010px;
    padding: 28px 28px 86px;
    overflow: hidden;
    border: 1px solid rgba(69, 41, 107, .24);
    border-radius: 22px;
    background:
        linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.9)),
        radial-gradient(circle at center, rgba(200,144,45,.18), transparent 36%);
    box-shadow: var(--shadow);
}

.cross-lines {
    position: absolute;
    inset: 8% 12%;
    pointer-events: none;
    opacity: .38;
}

.cross-lines::before,
.cross-lines::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 83%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple-700), transparent);
    transform-origin: center;
}

.cross-lines::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.cross-lines::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.rdn-zone {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 2px solid var(--orange);
    border-radius: 15px;
    color: var(--ink);
    background: rgba(255,255,255,.96);
    box-shadow: 0 7px 18px rgba(45, 23, 71, .08);
    cursor: pointer;
    --zone-rotation: 0deg;
    --zone-scale: 1;
    --zone-shift-x: 0px;
    --zone-shift-y: 0px;
    transform: translate(var(--zone-shift-x), var(--zone-shift-y)) rotate(var(--zone-rotation)) scale(var(--zone-scale));
    transform-origin: center;
}

.rdn-zone:disabled {
    cursor: default;
    opacity: .72;
}

.rdn-zone:not(:disabled):hover {
    z-index: 8;
    box-shadow: 0 12px 24px rgba(45, 23, 71, .16);
    transform: translate(var(--zone-shift-x), calc(var(--zone-shift-y) - 2px)) rotate(var(--zone-rotation)) scale(var(--zone-scale));
}

.zone-number {
    position: absolute;
    top: -11px;
    left: -10px;
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    border: 2px solid currentColor;
    border-radius: 999px;
    color: inherit;
    background: #fff;
    font-weight: 800;
}

.zone-title {
    min-height: 34px;
    color: inherit;
    font-size: .82rem;
    font-weight: 800;
    text-align: center;
}

.card-visual {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: min(72px, 68%);
    aspect-ratio: 283 / 543;
    margin: 4px auto 8px;
    overflow: hidden;
    border: 1px solid #b9b0c0;
    border-radius: 6px;
    background: linear-gradient(145deg, #f4eff7, #fff);
}

.card-visual img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff;
}

.card-visual img[hidden] {
    display: none !important;
}

.card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--purple-700);
    font-size: 2rem;
    font-weight: 800;
}

.arcane-label {
    display: -webkit-box;
    min-height: 34px;
    overflow: hidden;
    color: #403646;
    font-size: .77rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.zone-1 { grid-area: z1; }
.zone-2 { grid-area: z2; }
.zone-3 { grid-area: z3; }
.zone-4 { grid-area: z4; }
.zone-5 { grid-area: z5; }
.zone-6 { grid-area: z6; }
.zone-7 { grid-area: z7; }
.zone-8 { grid-area: z8; }
.zone-9 { grid-area: z9; }
.zone-10 { grid-area: z10; }
.zone-11 { grid-area: z11; }
.zone-12 { grid-area: z12; }
.zone-13 { grid-area: z13; }
.zone-14 { grid-area: z14; }

.zone-6,
.zone-7,
.zone-8,
.zone-10 {
    z-index: 4;
    border-color: #7b2c83;
    color: #7b2c83;
    --zone-scale: .76;
}

/* Inclinaison fidèle au schéma historique du RDN :
   zones 6 et 7 vers la gauche, zones 8 et 10 vers la droite. */
.zone-6,
.zone-7 {
    --zone-rotation: -45deg;
    --zone-shift-x: -12px;
}

.zone-8,
.zone-10 {
    --zone-rotation: 45deg;
}

.zone-8 {
    --zone-shift-x: 12px;
}

.zone-10 {
    --zone-shift-x: 12px;
    --zone-scale: .72;
}

.zone-8 {
    background: #fff2ff;
}

.zone-9,
.zone-11,
.zone-12 {
    border-color: var(--red);
    color: var(--red);
}

.zone-13 {
    border-color: var(--blue);
    color: var(--blue);
}

.zone-14 {
    border-color: #88808d;
    color: #534b58;
    background: #f7f5f8;
}

.zone-3 .zone-title,
.zone-6 .zone-title,
.zone-10 .zone-title,
.zone-12 .zone-title,
.zone-14 .zone-title {
    font-size: .75rem;
    line-height: 1.12;
}

.zone-14 {
    align-self: stretch;
    --zone-shift-x: 8px;
    --zone-shift-y: 0px;
}

.board-marker {
    position: absolute;
    z-index: 5;
    min-width: 46px;
    padding: 5px 7px;
    border-radius: 7px;
    color: #5b5360;
    background: rgba(235, 231, 238, .93);
    font-size: .76rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 3px 8px rgba(45,23,71,.12);
}

.marker-north { top: 46.5%; left: 72.2%; }
.marker-dream { top: 51.5%; left: 72.2%; }
.marker-south { top: 56.5%; left: 72.2%; }
.marker-periphery { top: 67.5%; left: 56.5%; }
.marker-fluctuating { top: 71.5%; left: 56.5%; }

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1.65fr;
    gap: 16px;
    margin-top: 16px;
}

.summary-card,
.practitioner-card {
    padding: 18px;
    border: 1px solid rgba(69, 41, 107, .18);
    border-radius: 16px;
    background: rgba(255, 253, 250, .96);
    box-shadow: 0 7px 20px rgba(45, 23, 71, .08);
}

.dominant-result,
#dominantResult {
    line-height: 1.45;
}

.dominant-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.dominant-arcane-button {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid #cfc5d6;
    border-radius: 12px;
    color: var(--ink);
    background: #faf8fb;
    text-align: left;
    cursor: pointer;
}

.dominant-arcane-button:hover {
    border-color: var(--purple-700);
    background: #f4eff7;
    box-shadow: 0 8px 18px rgba(45, 23, 71, .12);
}

.dominant-card-visual,
.summary-card-visual {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #b9b0c0;
    border-radius: 6px;
    background: linear-gradient(145deg, #f4eff7, #fff);
}

.dominant-card-visual {
    width: 68px;
    aspect-ratio: 283 / 543;
}

.dominant-card-visual img,
.summary-card-visual img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff;
}

.dominant-card-visual img[hidden],
.summary-card-visual img[hidden] {
    display: none !important;
}

.dominant-placeholder,
.summary-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--purple-700);
    font-size: 1.6rem;
    font-weight: 800;
}

.dominant-arcane-info,
.dominant-arcane-info strong,
.dominant-arcane-info span,
.dominant-arcane-info small {
    display: block;
}

.dominant-arcane-info strong {
    color: var(--purple-900);
    font-size: .86rem;
    line-height: 1.25;
}

.dominant-arcane-info span {
    margin-top: 5px;
    color: var(--orange);
    font-size: .78rem;
    font-weight: 800;
}

.dominant-arcane-info small {
    margin-top: 6px;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.3;
}

.dominant-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: .84rem;
}

.synthesis-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    gap: 8px;
}

.synthesis-list button {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 270px;
    padding: 9px;
    border: 1px solid #cfc5d6;
    border-radius: 10px;
    color: var(--ink);
    background: #faf8fb;
    cursor: pointer;
}

.synthesis-list button:not(:disabled):hover {
    border-color: var(--purple-700);
    background: #f4eff7;
    box-shadow: 0 8px 18px rgba(45, 23, 71, .12);
}

.synthesis-list button:disabled {
    cursor: default;
    opacity: .72;
}

.synthesis-list strong,
.synthesis-list span {
    display: block;
}

.synthesis-list strong {
    min-height: 34px;
    margin-bottom: 7px;
    color: var(--purple-800);
    font-size: .78rem;
    line-height: 1.15;
    text-align: center;
}

.summary-card-visual {
    width: 72px;
    aspect-ratio: 70 / 130;
    margin-bottom: 8px;
}

.summary-arcane {
    min-height: 32px;
    color: #403646;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.summary-meaning {
    margin-top: 5px;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.25;
    text-align: center;
}

.practitioner-card {
    margin-top: 16px;
    line-height: 1.58;
}

.practitioner-card .content {
    color: #3e3743;
}

.practitioner-card .content > span {
    color: var(--purple-800);
    font-weight: 800;
}

.bg_plum {
    padding: 1px 4px;
    border-radius: 4px;
    color: #6a1476 !important;
    background: plum;
}

.bg_gold {
    padding: 1px 4px;
    border-radius: 4px;
    color: #6e4300 !important;
    background: gold;
}

.bg_pink {
    padding: 1px 4px;
    border-radius: 4px;
    color: #9a1739 !important;
    background: lightpink;
}

.arcane-dialog {
    width: min(980px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 18px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 30px 80px rgba(25, 12, 39, .42);
}

.arcane-dialog::backdrop {
    background: rgba(25, 12, 39, .68);
    backdrop-filter: blur(3px);
}

.dialog-close {
    position: sticky;
    z-index: 4;
    top: 12px;
    float: right;
    width: 42px;
    height: 42px;
    margin: 12px 12px -54px 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--purple-800);
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
}

.dialog-layout {
    display: grid;
    grid-template-columns: minmax(180px, 250px) 1fr;
    gap: 24px;
    padding: 30px;
}

.dialog-image-wrap {
    position: sticky;
    top: 28px;
    align-self: start;
}

.dialog-image-wrap img,
.dialog-placeholder {
    width: 100%;
    aspect-ratio: 70 / 130;
    object-fit: contain;
    border: 1px solid #c7becd;
    border-radius: 10px;
    background: #faf8fb;
}

.dialog-placeholder {
    display: grid;
    place-items: center;
    padding: 18px;
    color: var(--purple-700);
    font-size: clamp(.95rem, 2vw, 1.25rem);
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.dialog-kicker {
    margin: 0 0 4px;
    color: var(--gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.arcane-dialog h2 {
    margin: 0 52px 14px 0;
    color: var(--purple-900);
    font-size: 1.8rem;
}

.arcane-dialog h3 {
    margin: 20px 0 7px;
    color: var(--purple-800);
    font-size: 1.05rem;
}

.arcane-dialog p {
    line-height: 1.62;
}

.formula {
    padding: 9px 11px;
    border-left: 4px solid var(--gold);
    color: #5a505f;
    background: #faf6ed;
}

.login-page {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.login-main {
    display: grid;
    place-items: center;
    padding: 34px 18px;
}

.login-card {
    width: min(460px, 100%);
    padding: 28px;
    border: 1px solid rgba(69, 41, 107, .22);
    border-radius: 20px;
    background: rgba(255,253,250,.98);
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 12px 0 8px;
    color: var(--purple-900);
    text-align: center;
}

.login-card p {
    color: var(--muted);
    text-align: center;
}

.login-symbol {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    margin: 0 auto;
    border: 3px solid var(--gold);
    border-radius: 50%;
    color: var(--purple-800);
    background: var(--purple-100);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: .08em;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 270px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .rdn-board {
        grid-template-columns: repeat(5, minmax(95px, 1fr));
        grid-template-rows: repeat(5, minmax(155px, auto));
        gap: 9px;
        min-height: 840px;
        padding: 22px;
    }

    .synthesis-list {
        grid-template-columns: repeat(3, minmax(118px, 1fr));
    }
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
        padding: 12px;
    }

    .left-panel {
        position: static;
        max-height: none;
        margin-bottom: 14px;
    }

    /* La croix du RDN reste intacte sur tablette :
       mêmes 5 colonnes, mêmes positions et mêmes inclinaisons. */
    .rdn-board {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-template-rows: repeat(5, minmax(128px, 1fr));
        grid-template-areas:
            ". . z12 . ."
            ". z6 z1 z8 ."
            "z9 z2 z5 z4 z13"
            ". z7 z3 z10 ."
            ". . z11 . z14";
        gap: clamp(4px, 1.2vw, 9px);
        min-height: clamp(760px, 105vw, 900px);
        padding: clamp(14px, 2.4vw, 22px);
    }

    .rdn-zone {
        min-height: 0;
        padding: clamp(5px, 1.1vw, 9px);
        touch-action: manipulation;
    }

    .rdn-zone .zone-title {
        min-height: 28px;
        font-size: .74rem;
    }

    .rdn-zone .card-visual {
        width: min(58px, 62%);
        margin-block: 3px 6px;
    }

    .rdn-zone .arcane-label {
        min-height: 28px;
        font-size: .70rem;
    }

    .zone-6,
    .zone-7,
    .zone-8 {
        --zone-scale: .74;
    }

    .zone-10 {
        --zone-scale: .68;
        --zone-shift-x: 12px;
    }

    .zone-14 {
        --zone-shift-x: 5px;
        --zone-shift-y: 0px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .top-band,
    .bottom-band,
    .identity-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-band {
        min-height: auto;
        padding: 12px 14px;
    }

    .band-account {
        width: 100%;
        justify-content: space-between;
    }

    .connected-login {
        max-width: calc(100% - 112px);
        padding: 6px 8px;
    }

    .connected-login strong {
        max-width: 48vw;
    }

    .bottom-band {
        padding: 10px 14px;
    }

    .brand-title {
        font-size: 1.12rem;
    }

    .brand-subtitle {
        font-size: .82rem;
    }

    .app-shell {
        padding: 8px;
    }

    .left-panel {
        padding: 14px;
        border-radius: 14px;
    }

    .identity-strip {
        gap: 6px;
        padding: 11px 13px;
    }

    .identity-strip span {
        text-align: left;
    }

    /* Sur téléphone, le diagramme complet tient dans la largeur.
       Les cartes inclinées restent inclinées et cliquables. */
    .rdn-board {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-template-rows: repeat(5, minmax(118px, 1fr));
        gap: 2px;
        min-height: 650px;
        padding: 14px 7px;
        border-radius: 14px;
    }

    .rdn-zone {
        padding: 3px 2px;
        border-width: 1.5px;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(45, 23, 71, .08);
    }

    .zone-number {
        top: -8px;
        left: -5px;
        min-width: 22px;
        height: 22px;
        padding: 0 4px;
        border-width: 1px;
        font-size: .68rem;
    }

    .zone-title {
        min-height: 25px;
        font-size: clamp(.52rem, 2.35vw, .68rem);
        line-height: 1.08;
    }

    .zone-3 .zone-title,
    .zone-6 .zone-title,
    .zone-10 .zone-title,
    .zone-12 .zone-title,
    .zone-14 .zone-title {
        font-size: clamp(.46rem, 1.95vw, .61rem);
    }

    .card-visual {
        width: min(52px, 76%);
        margin: 2px auto 4px;
        border-radius: 4px;
    }

    .arcane-label {
        min-height: 24px;
        font-size: clamp(.49rem, 2.15vw, .65rem);
        line-height: 1.08;
    }

    .zone-6,
    .zone-7,
    .zone-8,
    .zone-10 {
        --zone-scale: .70;
    }

    .zone-6,
    .zone-7 {
        --zone-shift-x: -2px;
    }

    .zone-8 {
        --zone-shift-x: 2px;
    }

    .zone-10 {
        --zone-shift-x: 2px;
        --zone-scale: .64;
    }

    .zone-14 {
        --zone-shift-x: 2px;
        --zone-shift-y: 0px;
    }

    .cross-lines {
        inset: 9% 8%;
        opacity: .24;
    }

    .board-marker {
        min-width: 28px;
        padding: 3px 4px;
        border-radius: 5px;
        font-size: .55rem;
    }

    .marker-north { top: 46.5%; left: 72%; }
    .marker-dream { top: 51.5%; left: 72%; }
    .marker-south { top: 56.5%; left: 72%; }
    .marker-periphery { top: 67.5%; left: 56%; }
    .marker-fluctuating { top: 71.5%; left: 56%; }

    .synthesis-list {
        grid-template-columns: 1fr 1fr;
    }

    .dominant-list {
        grid-template-columns: 1fr;
    }

    .dialog-layout {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .dialog-image-wrap {
        position: static;
        width: min(210px, 65%);
        margin: 0 auto;
    }
}

@media (max-width: 620px) {
    .birth-calculate-row {
        grid-template-columns: minmax(0, 1fr) 50px;
        gap: 8px;
    }

    .square-icon-button {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
    }

    .quick-actions-row {
        grid-template-columns: repeat(3, 50px);
        gap: 9px;
    }

    .zone8-heading-row {
        grid-template-columns: minmax(102px, .8fr) minmax(0, 1.2fr);
    }
}

@media (max-width: 410px) {
    .connected-login span {
        display: none;
    }

    .connected-login strong {
        max-width: 52vw;
    }

    .rdn-board {
        grid-template-rows: repeat(5, minmax(112px, 1fr));
        min-height: 620px;
        padding-inline: 5px;
    }

    .zone-6,
    .zone-7,
    .zone-8,
    .zone-10 {
        --zone-scale: .66;
    }

    .card-visual {
        width: min(47px, 74%);
    }

    .synthesis-list {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   CONNEXION ET DÉCONNEXION — VERSION 1.0.10
   ========================================================= */

.auth-page.login-page,
.auth-page.logout-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: clamp(12px, 3vw, 28px);
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% 15%, rgba(255,255,255,.92), transparent 32rem),
        linear-gradient(135deg, #f6f2f8 0%, #eee8f2 100%);
}

.auth-main {
    display: grid;
    width: 100%;
    place-items: center;
}

.auth-card {
    position: relative;
    width: min(760px, 100%);
    padding: clamp(26px, 4.4vw, 44px);
    border: 1px solid #d7d0db;
    border-radius: 32px;
    background: #fffdfa;
    box-shadow:
        0 22px 58px rgba(45, 23, 71, .16),
        0 2px 0 rgba(255, 255, 255, .9) inset;
}

.auth-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(235px, .92fr);
    align-items: center;
    gap: 10px 18px;
}

.auth-title {
    margin: 0;
    color: #293f52;
    font-size: clamp(3.1rem, 7vw, 4.35rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.035em;
    text-align: center;
}

.auth-title span {
    display: block;
}

.auth-sun {
    display: block;
    width: min(100%, 315px);
    height: auto;
    justify-self: center;
    object-fit: contain;
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .06));
}

.auth-instruction {
    margin: 7px 0 24px;
    color: #293f52 !important;
    font-size: clamp(1rem, 2.5vw, 1.18rem);
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
}

.auth-form label {
    margin: 13px 0 7px;
    color: #493d50;
    font-size: clamp(1.05rem, 2.5vw, 1.24rem);
    font-weight: 800;
}

.auth-form input {
    min-height: 64px;
    padding: 12px 16px;
    border: 1px solid #b6b4c0;
    border-radius: 14px;
    color: #17151a;
    background: #e9f1ff;
    box-shadow: inset 0 1px 3px rgba(44, 42, 50, .06);
    font-size: 1.16rem;
}

.auth-form input:focus {
    border-color: #c99b45;
    outline: 3px solid rgba(211, 164, 77, .42);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(211, 164, 77, .17);
}

.auth-submit-button {
    display: flex;
    width: 100%;
    min-height: 70px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding: 12px 20px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #4b2b71, #62388c);
    box-shadow: 0 12px 25px rgba(75, 43, 113, .26);
    font-size: clamp(1.15rem, 3vw, 1.38rem);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.auth-submit-button:hover {
    background: linear-gradient(135deg, #58327f, #70439a);
    box-shadow: 0 15px 30px rgba(75, 43, 113, .31);
}

.auth-alert {
    margin: 0 0 15px;
    padding: 12px 14px;
    border: 1px solid #e7a7ad;
    border-radius: 12px;
    color: #8e1723;
    background: #fff0f1;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.auth-fullscreen-button {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid #d2c8dc;
    border-radius: 12px;
    color: #4b2b71;
    background: rgba(255, 253, 250, .88);
    box-shadow: 0 7px 18px rgba(45, 23, 71, .1);
    cursor: pointer;
}

.auth-fullscreen-button svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-version {
    margin: 15px 0 -12px;
    color: #8c8491 !important;
    font-size: .78rem;
    text-align: center;
}

.logout-status {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    margin: 10px 0 18px;
    padding: 18px;
    border: 1px solid #b7d8b3;
    border-radius: 17px;
    color: #245f20;
    background: #f0faee;
}

.logout-status-icon {
    width: 70px;
    height: 70px;
    fill: none;
    stroke: #198b12;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logout-status h2 {
    margin: 0 0 5px;
    color: #245f20;
    font-size: clamp(1.3rem, 3vw, 1.65rem);
}

.logout-status p {
    margin: 0;
    color: #416a3e;
    line-height: 1.45;
}

.auth-link-button {
    margin-top: 4px;
}

@media (max-width: 680px) {
    .auth-page.login-page,
    .auth-page.logout-page {
        align-items: start;
        padding: 10px;
    }

    .auth-card {
        margin-top: 4px;
        padding: 24px 20px 27px;
        border-radius: 25px;
    }

    .auth-hero {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .auth-title {
        padding-top: 12px;
        font-size: clamp(2.65rem, 13vw, 3.65rem);
    }

    .auth-sun {
        width: min(60vw, 225px);
        margin-top: -4px;
    }

    .auth-instruction {
        margin-top: 3px;
    }

    .auth-form input {
        min-height: 58px;
    }

    .auth-submit-button {
        min-height: 62px;
    }

    .logout-status {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 13px;
        padding: 14px;
    }

    .logout-status-icon {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 420px) {
    .auth-card {
        padding-inline: 16px;
    }

    .auth-fullscreen-button {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .auth-title {
        font-size: 2.55rem;
    }

    .auth-sun {
        width: 185px;
    }

    .logout-status {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .logout-status-icon {
        justify-self: center;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    body {
        background: #fff;
    }

    .no-print,
    .top-band .band-button,
    .dialog-close,
    .arcane-dialog {
        display: none !important;
    }

    .top-band,
    .bottom-band {
        color: #fff !important;
        background: #45296b !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        box-shadow: none;
    }

    .top-band {
        min-height: auto;
        padding: 8mm 6mm;
    }

    .bottom-band {
        padding: 4mm 6mm;
    }

    .app-shell {
        display: block;
        padding: 5mm 0;
    }

    .identity-strip,
    .rdn-board,
    .summary-card,
    .practitioner-card {
        box-shadow: none;
    }

    .rdn-board {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(5, 42mm);
        gap: 2.5mm;
        min-height: auto;
        padding: 5mm;
        break-inside: avoid;
    }

    .rdn-zone {
        overflow: visible;
        padding: 2mm;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .zone-6,
    .zone-7,
    .zone-8,
    .zone-10 {
        --zone-scale: .68;
    }

    .card-visual {
        flex: 0 0 auto;
        width: 13mm;
        height: 25mm;
        aspect-ratio: auto;
        margin: 1mm auto;
        overflow: hidden;
    }

    .card-visual img {
        position: absolute !important;
        inset: 0 !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center center !important;
    }

    .card-visual img[hidden] {
        display: none !important;
    }

    .zone-title,
    .arcane-label {
        font-size: 7pt;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        break-before: page;
    }

    .practitioner-card {
        break-inside: avoid;
    }
}


.dialog-placeholder[hidden] {
    display: none !important;
}

/* ================================================================
   Version 1.0.20 — Triangle Énergies de Vie et édition IFRAME
   ================================================================ */

[hidden] {
    display: none !important;
}

/* Version iframe : fenêtre volontairement plus légère que index.php. */
.iframe-page {
    background:
        radial-gradient(circle at 90% 0, rgba(200, 144, 45, .09), transparent 25rem),
        linear-gradient(180deg, #fbfafc 0, #f2eef5 100%);
}

.iframe-account-bar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 8px clamp(12px, 3vw, 28px);
    border-bottom: 1px solid rgba(69, 41, 107, .18);
    background: rgba(255, 253, 250, .96);
    box-shadow: 0 5px 18px rgba(45, 23, 71, .10);
    backdrop-filter: blur(12px);
}

.iframe-account-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.1;
}

.iframe-account-identity strong {
    overflow: hidden;
    max-width: min(55vw, 380px);
    margin-top: 3px;
    color: var(--purple-800);
    font-size: .88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iframe-logout-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #cdbfd8;
    border-radius: 9px;
    color: var(--purple-800);
    background: #fff;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}

.iframe-logout-button:hover {
    background: var(--purple-100);
}

.iframe-logout-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.iframe-version-badge {
    position: fixed;
    right: 9px;
    bottom: 7px;
    z-index: 70;
    padding: 5px 9px;
    border: 1px solid rgba(69, 41, 107, .23);
    border-radius: 8px;
    color: var(--purple-800);
    background: rgba(255, 253, 250, .94);
    box-shadow: 0 4px 13px rgba(45, 23, 71, .12);
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

.iframe-page .app-shell {
    padding-top: 14px;
    padding-bottom: 38px;
}

.iframe-page .left-panel {
    border-color: rgba(69, 41, 107, .14);
    background: rgba(255, 255, 255, .82);
}

.iframe-quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Triangle Énergies de Vie */
.tev-board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(155px, auto));
    grid-template-areas:
        ". . . c . . ."
        ". . . j . . ."
        ". e . . . f ."
        ". . . h . . ."
        ". g . . . i ."
        "a . . d . . b";
    gap: 12px;
    min-height: 1040px;
    padding: 24px 18px 34px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .96), rgba(255, 253, 250, .78) 52%, rgba(241, 235, 247, .72)),
        linear-gradient(180deg, #fff 0, #f7f2fa 100%);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.tev-lines {
    position: absolute;
    inset: 4.5% 2.5% 3.5%;
    z-index: 0;
    width: 95%;
    height: 92%;
    overflow: visible;
    pointer-events: none;
}

.tev-line {
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tev-line-outer,
.tev-line-base {
    stroke: #ed7d16;
    stroke-width: 3.5;
}

.tev-line-inner {
    stroke: #2854a7;
    stroke-width: 3;
}

.tev-point {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: 0;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 7px 5px 8px;
    overflow: hidden;
    border: 3px solid var(--tev-color, var(--purple-700));
    border-radius: 12px;
    color: var(--ink);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 7px 18px rgba(45, 23, 71, .14);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}

.tev-point:not(:disabled):hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 11px 24px rgba(45, 23, 71, .22);
}

.tev-point:disabled {
    cursor: default;
    opacity: .82;
}

.tev-point-A { grid-area: a; }
.tev-point-B { grid-area: b; }
.tev-point-C { grid-area: c; }
.tev-point-D { grid-area: d; }
.tev-point-E { grid-area: e; }
.tev-point-F { grid-area: f; }
.tev-point-G { grid-area: g; }
.tev-point-H { grid-area: h; }
.tev-point-I { grid-area: i; }
.tev-point-J { grid-area: j; }

.tev-code {
    position: absolute;
    top: 5px;
    left: 6px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--tev-color, var(--purple-700));
    font-size: .78rem;
    font-weight: 900;
}

.tev-title {
    min-height: 31px;
    padding: 1px 20px 3px;
    color: #332b3b;
    font-size: clamp(.66rem, .85vw, .78rem);
    font-weight: 900;
    line-height: 1.12;
    text-align: center;
}

.tev-card-visual {
    position: relative;
    display: grid;
    width: min(68px, 70%);
    aspect-ratio: 10 / 18;
    place-items: center;
    margin: 2px auto 4px;
    overflow: hidden;
    border: 1px solid rgba(69, 41, 107, .25);
    border-radius: 4px;
    background: linear-gradient(145deg, #f3edf8, #fff);
}

.tev-card-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tev-card-placeholder {
    color: var(--tev-color, var(--purple-700));
    font-size: 1.35rem;
    font-weight: 900;
}

.tev-arcane-label {
    display: block;
    width: 100%;
    margin-top: auto;
    color: var(--purple-900);
    font-size: clamp(.58rem, .75vw, .70rem);
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.tev-summary-section {
    display: grid;
    gap: 16px;
}

.tev-intro-card p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.55;
}

.tev-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tev-summary-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: var(--paper);
    text-align: left;
}

.tev-summary-item:not(:disabled) {
    cursor: pointer;
}

.tev-summary-item:not(:disabled):hover {
    border-color: var(--purple-700);
    box-shadow: 0 6px 16px rgba(45, 23, 71, .12);
}

.tev-summary-code {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--purple-700);
    font-weight: 900;
}

.tev-summary-item strong,
.tev-summary-item small {
    display: block;
}

.tev-summary-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.25;
}

.tev-summary-value {
    max-width: 155px;
    color: var(--purple-800);
    font-size: .76rem;
    font-weight: 900;
    text-align: right;
}

body[data-reference-type="tev"] .identity-strip {
    border-left: 5px solid #ed7d16;
}

@media (max-width: 1180px) {
    .tev-board {
        grid-template-rows: repeat(6, minmax(130px, auto));
        min-height: 900px;
        gap: 9px;
        padding-inline: 10px;
    }

    .tev-point {
        min-height: 127px;
        padding-inline: 3px;
    }

    .tev-card-visual {
        width: min(56px, 72%);
    }
}

@media (max-width: 820px) {
    .tev-board {
        grid-template-rows: repeat(6, minmax(112px, auto));
        min-height: 780px;
        gap: 6px;
        padding: 16px 5px 24px;
        border-radius: 12px;
    }

    .tev-point {
        min-height: 108px;
        border-width: 2px;
        border-radius: 8px;
    }

    .tev-code {
        top: 3px;
        left: 3px;
        width: 19px;
        height: 19px;
        font-size: .65rem;
    }

    .tev-title {
        min-height: 25px;
        padding-inline: 15px;
        font-size: .57rem;
    }

    .tev-card-visual {
        width: min(45px, 75%);
    }

    .tev-arcane-label {
        font-size: .52rem;
    }

    .tev-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .iframe-account-bar {
        padding-inline: 8px;
    }

    .iframe-logout-button span {
        display: none;
    }

    .iframe-version-badge {
        right: 5px;
        bottom: 4px;
        font-size: .64rem;
    }

    .tev-board {
        grid-template-rows: repeat(6, minmax(94px, auto));
        min-height: 660px;
        gap: 3px;
        padding-inline: 2px;
    }

    .tev-point {
        min-height: 92px;
        padding: 3px 1px 4px;
    }

    .tev-title {
        min-height: 20px;
        padding-inline: 10px;
        font-size: .48rem;
    }

    .tev-card-visual {
        width: min(36px, 80%);
        margin-block: 1px;
    }

    .tev-arcane-label {
        overflow: hidden;
        max-height: 20px;
        font-size: .44rem;
    }

    .tev-summary-item {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .tev-summary-value {
        grid-column: 2;
        max-width: none;
        text-align: left;
    }
}

@media print {
    .iframe-account-bar,
    .iframe-version-badge {
        display: none !important;
    }

    .tev-board {
        grid-template-rows: repeat(6, 34mm);
        min-height: auto;
        padding: 4mm;
        gap: 2mm;
        box-shadow: none;
        break-inside: avoid;
    }

    .tev-point {
        min-height: 32mm;
        padding: 1mm;
        box-shadow: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .tev-card-visual {
        width: 11mm;
        height: 20mm;
        aspect-ratio: auto;
    }

    .tev-title,
    .tev-arcane-label {
        font-size: 5.5pt;
    }

    .tev-summary-section {
        break-before: page;
    }
}
