@font-face { font-family: Roboto; src: url('assets/roboto-classic-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Roboto; src: url('assets/roboto-classic-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Roboto; src: url('assets/roboto-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: Roboto; src: url('assets/roboto-classic-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Oswald; src: url('assets/oswald-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Roboto Condensed'; src: url('assets/roboto-condensed-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
:root { --viewport-height: 100svh; font-family: Roboto, Arial, sans-serif; color: #263336; background: #fff; font-synthesis: none; }
@supports (height: 100dvh) { :root { --viewport-height: 100dvh; } }
:root:fullscreen { background: #fff; overflow: auto; }
:root:-webkit-full-screen { background: #fff; overflow: auto; }
* { box-sizing: border-box; }
body { margin: 0; }
/* Lock mode keeps the card visible but removes the editor. The date gesture
   still works without adding a lock control to the UI. */
body[data-locked="true"] .editor,
html[data-locked="true"] .editor { display: none !important; }
html[data-locked="true"],
body[data-locked="true"] {
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
html[data-locked="true"] .editable:hover,
body[data-locked="true"] .editable:hover { text-decoration: none; }
html[data-locked="true"] .editable:focus-visible,
html[data-locked="true"] .back-button:focus-visible,
html[data-locked="true"] .portrait-button:focus-visible,
html[data-locked="true"] .qr-frame:focus-visible,
body[data-locked="true"] .editable:focus-visible,
body[data-locked="true"] .back-button:focus-visible,
body[data-locked="true"] .portrait-button:focus-visible,
body[data-locked="true"] .qr-frame:focus-visible {
  outline: none;
}
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.workspace { min-height: var(--viewport-height); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; background: #fff; padding: max(12px, env(safe-area-inset-top, 0px)) env(safe-area-inset-right, 0px) max(12px, env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px); }
/* Width stays stable while iOS adjusts viewport height and safe-area insets.
   Clip the unscaled reference canvas so it cannot enlarge the layout viewport. */
.screen-container { width: min(100%, 540px); aspect-ratio: 1012 / 1940; position: relative; overflow: hidden; }
.app-screen { position: absolute; left: 0; top: 0; width: 1012px; height: 1940px; background: #fff; visibility: hidden; transform: scale(var(--screen-scale, .4)); transform-origin: top left; -webkit-font-smoothing: antialiased; }
.app-screen[data-sized] { visibility: visible; }
.validity-bar { position: absolute; left: 32px; top: 0; width: 940px; height: 115px; border-radius: 22px; background: #2b2f33; color: white; }
.back-button { position: absolute; left: 37px; top: 27px; width: 48px; height: 61px; padding: 7px 9px; background: none; border: 0; color: white; }
.back-button svg { display: block; width: 30px; height: 48px; }
.valid-dot { position: absolute; left: 121px; top: 37px; width: 42px; height: 42px; border-radius: 50%; background: #4cbc47; }
.status-value { position: absolute; left: 183px; top: 33px; width: 213px; height: 49px; font-size: 36px; line-height: 49px; font-weight: 500; white-space: nowrap; }
.checked-value { position: absolute; right: 42px; top: 35px; width: 330px; height: 45px; font-size: 31px; line-height: 45px; text-align: right; white-space: nowrap; }
.student-card { position: absolute; left: 36px; top: 158px; width: 935px; height: 1486px; border-radius: 23px; background: #44c1be; overflow: hidden; color: white; }
.card-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.card-flap { position: absolute; left: 0; top: 0; width: 440px; height: 240px; pointer-events: none; }
.hologram { position: absolute; z-index: 1; width: 220px; height: 220px; pointer-events: none; }
.hologram svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* The holograms fade fully in a diagonal wave from bottom-left to top-right. */
.holo-pulse { width: 100%; height: 100%; animation: holo-pulse 3.8s ease-in-out infinite both; will-change: opacity; }
/* Order follows each circle's position along the bottom-left to top-right diagonal. */
.holo-pulse-1 { animation-delay: .70s; }
.holo-pulse-2 { animation-delay: 1.75s; }
.holo-pulse-3 { animation-delay: 2.45s; }
.holo-pulse-4 { animation-delay: .35s; }
.holo-pulse-5 { animation-delay: 1.05s; }
.holo-pulse-6 { animation-delay: 2.10s; }
.holo-pulse-7 { animation-delay: 0s; }
.holo-pulse-8 { animation-delay: 1.40s; }
@keyframes holo-pulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .holo-pulse { animation: none; will-change: auto; }
}
.brand-logo { position: absolute; left: 64px; top: 31px; width: 305px; height: 122px; }
.brand-isic { font: 700 54px Oswald, sans-serif; fill: #fff; }
.unesco-logo { position: absolute; left: 451px; top: 31px; width: 75px; height: 65px; }
.card-number { position: absolute; left: 575px; top: 28px; color: #17575d; }
.number-label { display: block; font-size: 20px; font-weight: 500; line-height: 26px; }
.number-value { display: block; width: 335px; height: 43px; font-size: 34px; line-height: 43px; white-space: nowrap; }
.top-hologram { position: absolute; left: 296px; top: 0; width: 240px; height: 220px; pointer-events: none; }
.portrait-button { position: absolute; left: 322px; top: 334px; width: 290px; height: 290px; overflow: hidden; border: 0; border-radius: 50%; padding: 0; background: white; }
.portrait-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.student-name { position: absolute; left: 46px; top: 624px; width: 842px; height: 68px; color: white; font-size: 57px; line-height: 68px; font-weight: 600; text-align: center; white-space: nowrap; }
.student-school { position: absolute; left: 45px; top: 693px; width: 844px; height: 54px; font-size: 42px; line-height: 54px; font-weight: 400; text-align: center; white-space: nowrap; }
.detail { position: absolute; top: 797px; }
.detail-validity { left: 34px; width: 298px; }
.detail-birth { left: 365px; width: 343px; }
.detail-label { color: #268685; font-size: 30px; line-height: 41px; font-weight: 400; white-space: nowrap; }
.detail-value { font-size: 40px; line-height: 55px; margin-top: 5px; white-space: nowrap; }
.qr-frame { position: absolute; left: 289px; top: 1066px; width: 357px; height: 357px; padding: 40px; border: 0; border-radius: 24px; background: white; }
.qr-frame svg, .qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pager { position: absolute; left: 0; top: 1644px; width: 1012px; height: 296px; color: #a6acb0; }
.dots { position: absolute; left: 402px; top: 152px; display: flex; align-items: center; gap: 21px; height: 44px; }
.dots span { display: block; width: 31px; height: 31px; border-radius: 50%; background: #d9f1f1; }
.dots .selected { width: 43px; height: 43px; background: #40babb; }
.swipe-hint { position: absolute; left: 200px; top: 239px; width: 612px; height: 57px; font-size: 36px; line-height: 57px; text-align: center; white-space: nowrap; }
.editable { cursor: pointer; outline: none; }
.editable:focus-visible, .back-button:focus-visible, .portrait-button:focus-visible, .qr-frame:focus-visible { outline: 3px solid #167779; outline-offset: 5px; border-radius: 4px; }
.editable:hover { text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.editor { position: fixed; inset: 16px 16px 16px auto; margin: 0; max-width: calc(100vw - 32px); width: 380px; max-height: calc(100svh - 32px); padding: 25px 23px; overflow: auto; color: #213d3f; border: 1px solid #dae5e4; border-radius: 18px; background: #fff; box-shadow: 0 12px 50px #0d4d4c26; }
.editor::backdrop { background: #0e343d16; }
.editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.eyebrow { color: #167c7e; font-size: 12px; font-weight: 700; letter-spacing: .14em; margin: 0 0 7px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; font-weight: 600; }
.editor-note { margin: 9px 0 0; font-size: 14px; line-height: 1.4; color: #697c7d; }
.icon-button { background: none; border: 0; font: 28px/30px Arial, sans-serif; color: #557576; padding: 0 3px; }
fieldset { padding: 0; border: 0; margin: 0 0 23px; min-width: 0; }
legend { margin-bottom: 12px; font-size: 14px; font-weight: 600; }
label { display: block; font-size: 14px; color: #52696b; margin: 0 0 11px; }
input:not([type=file]) { display: block; width: 100%; min-width: 0; height: 41px; margin-top: 5px; padding: 0 11px; border: 1px solid #ccdad9; border-radius: 7px; background: #fcfdfd; font-size: 16px; color: #223a3d; }
input:focus-visible { outline: 2px solid #299b9d; outline-offset: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-label { position: relative; padding: 12px 10px; border: 1px dashed #bad2d2; border-radius: 7px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; gap: 10px; }
.upload-label:focus-within { outline: 2px solid #299b9d; outline-offset: 2px; }
.upload-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-label span { color: #167779; font-size: 13px; }
.file-note { margin: 4px 0 0; color: #829294; font-size: 12px; line-height: 1.4; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-actions button { height: 41px; padding: 0 15px; font-size: 14px; font-weight: 500; border-radius: 7px; }
.secondary { color: #395e60; background: #fff; border: 1px solid #c7d8d7; }
.primary { color: #fff; background: #157c7e; border: 1px solid #157c7e; }
.save-status { font-size: 13px; line-height: 1.4; min-height: 18px; color: #6c8587; }
.save-status.error { color: #a53434; }
@media (max-width: 600px) { .editor { inset: 8px; width: auto; max-width: none; max-height: calc(100svh - 16px); padding: 22px 20px; } }
