/* ============================================================================
   RISO ENROLLMENT SHEET
   --------------------------------------------------------------------------
   The admissions folder already carries the illustration's shadows, tabs and
   fox. This sheet only parks the working form on the blank stock, so copy and
   native controls remain as changeable as the school expects them to be.
   ========================================================================== */

:root[data-storybook-art="riso"] .enroll-screen {
  align-items: flex-start;
  justify-content: flex-start;
  padding: max(10px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
}

/* The folder has its own fox and moon stamp; the old cast stickers made the
   title compete with the actual admission form. */
:root[data-storybook-art="riso"] .enroll-screen .title-cutout { display: none; }
:root[data-storybook-art="riso"] .enroll-screen .title-hero {
  width: min(600px, calc(100vw - 24px));
  min-height: 0;
  margin: 0 auto;
  padding: 3px 0 5px !important;
  z-index: 2;
}
:root[data-storybook-art="riso"] .enroll-screen .title-wordmark {
  color: #b95145 !important;
  font-family: var(--han);
  font-size: clamp(31px, 7.5vw, 58px) !important;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(255, 244, 222, 0.9) !important;
  transform: none;
}
:root[data-storybook-art="riso"] .enroll-screen .title-wordmark span {
  color:#b95145; background:none; -webkit-background-clip:initial; background-clip:initial;
  -webkit-text-fill-color:#b95145; -webkit-text-stroke:0; filter:none;
  text-shadow:2px 2px 0 #e3ad66; transform:none;
}
:root[data-storybook-art="riso"] .enroll-screen .title-latin {
  margin-top: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  color: #5f7868 !important;
  font-family: var(--sb-display);
  font-size: clamp(11px, 2.7vw, 15px) !important;
  letter-spacing: 0.14em !important;
  text-shadow: 0 1px 0 rgba(255, 244, 222, 0.85) !important;
  transform: none !important;
}

/* The PNG is deliberately blank through the form's writing surfaces. Its 4:5
   proportions let the paperclip, ticket, field, tabs and coral seal stay
   attached to their respective live controls as the viewport changes. */
:root[data-storybook-art="riso"] .enroll-card {
  --riso-paper: #fbf1db;
  --riso-ink: #4c392c;
  --riso-muted: #786655;
  width: min(600px, calc(100vw - 24px), calc((100dvh - 82px) * 0.8));
  min-width: 0;
  aspect-ratio: 4 / 5;
  box-sizing: border-box;
  display: flex;
  gap: clamp(5px, 0.9cqw, 9px);
  padding: 19.5% 15% 13%;
  overflow: visible;
  color: var(--riso-ink);
  background: url('../art/ui/storybook/riso-enrollment-frame.png') center / 100% 100% no-repeat !important;
  border: 0 !important;
  border-image: none !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 18px rgba(81, 56, 40, 0.15) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
  z-index: 2;
}
:root[data-storybook-art="riso"] .enroll-card::before,
:root[data-storybook-art="riso"] .enroll-card::after { display: none; }

:root[data-storybook-art="riso"] .enroll-card .enroll-head {
  position:absolute; left:18%; top:19%; width:64%; height:19%;
  gap: clamp(2px, 0.55cqw, 5px); min-height:0; padding:0 2%;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-eyebrow {
  color: #a75b4a;
  font-size: clamp(9px, 1.7cqw, 13px);
  letter-spacing: 0.08em;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-title {
  color: var(--riso-ink);
  font-family: var(--sb-display);
  font-size: clamp(18px, 3.8cqw, 29px);
  line-height: 1.08;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-sub {
  max-width: 38ch;
  margin-top: 2px;
  color: var(--riso-muted);
  font-size: clamp(10px, 1.85cqw, 14px);
  line-height: 1.32;
}

/* The coral ticket is already printed in the art. Leaving its pigment exposed
   keeps this an admission ticket instead of adding another rounded web button. */
:root[data-storybook-art="riso"] .enroll-card .daily-entry {
  position:absolute; left:20%; top:40%; width:60%;
  min-height:0; height:10%; margin:0;
  padding: 5px 12%;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #526f5c;
  font-family: var(--sb-display);
  font-size: clamp(13px, 2.6cqw, 19px);
  line-height: 1.1;
  text-shadow:0 1px 0 #fff8e3;
}

:root[data-storybook-art="riso"] .enroll-card .enroll-q {
  gap: clamp(3px, 0.55cqw, 6px);
  min-width: 0;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-q:nth-of-type(2) {
  position:absolute; left:18%; top:54%; width:64%; height:10%;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-q:nth-of-type(3) {
  position:absolute; left:13%; top:66%; width:74%; height:14%;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-label {
  color: #5f7868;
  font-size: clamp(10px, 1.85cqw, 14px);
  line-height: 1.1;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-namewrap { position: relative; gap: 0; }
:root[data-storybook-art="riso"] .enroll-card .enroll-namewrap input {
  min-height: clamp(37px, 7cqw, 53px);
  padding: 6px 8%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--riso-ink);
  caret-color: #b95145;
  font-size: clamp(14px, 2.8cqw, 20px);
}
:root[data-storybook-art="riso"] .enroll-card .enroll-namewrap input::placeholder {
  color: rgba(76, 57, 44, 0.72);
  font-size: clamp(10px, 1.8cqw, 14px);
}
:root[data-storybook-art="riso"] .enroll-card .enroll-namewrap input:focus {
  background: rgba(255, 250, 235, 0.38);
  border: 0;
  box-shadow: none;
}
/* Candidates appear above the lower form while composing, then leave the tabs
   untouched as soon as the player commits a character. */
:root[data-storybook-art="riso"] .enroll-card .imebar.show {
  position: absolute;
  z-index: 5;
  top: calc(100% - 2px);
  left: 2%;
  width: 96%;
  max-height: 76px;
  overflow: auto;
  padding: 5px;
  background: #fff6e3;
  border: 1px solid rgba(129, 99, 75, 0.35);
  border-radius: 3px 6px 4px 5px;
  box-shadow: 0 3px 9px rgba(84, 58, 39, 0.13);
}
:root[data-storybook-art="riso"] .enroll-card .imecand {
  background: #f4e7cf;
  border-color: #b08c70;
  border-radius: 2px 5px 3px 4px;
  color: var(--riso-ink);
}

/* Three printed tabs divide the available lesson choices without asking the
   player to decipher selected state from a thick ink contour. */
:root[data-storybook-art="riso"] .enroll-card .enroll-langrow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(3px, 0.75cqw, 7px);
  align-items:stretch;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-lang {
  min-width: 0;
  height: clamp(52px, 10cqw, 66px);
  min-height:0;
  box-sizing:border-box;
  overflow:hidden;
  padding: 6px 3px;
  background: rgba(247, 232, 204, 0.78);
  border: 1px solid transparent;
  border-radius: 3px 6px 4px 5px;
  box-shadow: none;
  color: var(--riso-ink);
}
:root[data-storybook-art="riso"] .enroll-card .enroll-lang:hover {
  background: rgba(239, 226, 198, 0.5);
  border-color: rgba(94, 120, 104, 0.46);
}
:root[data-storybook-art="riso"] .enroll-card .enroll-lang b {
  color: var(--riso-ink);
  font-size: clamp(11px, 2.05cqw, 15px);
  line-height: 1.05;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-lang span,
:root[data-storybook-art="riso"] .enroll-card .enroll-lang.sel span {
  color: var(--riso-muted);
  font-size: clamp(9px, 1.55cqw, 11px);
  line-height: 1.12;
}
:root[data-storybook-art="riso"] .enroll-card .enroll-lang.sel {
  background: rgba(188, 210, 169, 0.78);
  border-color: #678c71;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 225, 0.58);
}

:root[data-storybook-art="riso"] .enroll-card .enroll-go {
  position:absolute; left:21%; top:82%; width:58%;
  min-height:0; height:9%; margin:0;
  padding: 5px 12%;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #583c32;
  font-family: var(--sb-display);
  font-size: clamp(15px, 3.1cqw, 22px);
  text-shadow: 0 1px 0 rgba(255, 237, 204, 0.42);
}
:root[data-storybook-art="riso"] .enroll-card .daily-entry:hover,
:root[data-storybook-art="riso"] .enroll-card .enroll-go:hover { filter: brightness(1.06); }
:root[data-storybook-art="riso"] .enroll-card .daily-entry:active,
:root[data-storybook-art="riso"] .enroll-card .enroll-go:active { transform: translateY(1px); }
:root[data-storybook-art="riso"] .enroll-card .warn {
  position:absolute; left:17%; bottom:3%; width:66%; margin:0;
  color: #9b5145;
  font-size: clamp(8px, 1.45cqw, 11px);
  line-height: 1.2;
  text-align: center;
}

/* The folder needs an unambiguous keyboard ring even though its painted edges
   stay quiet. This also wins over the older global focus rule in either theme. */
:root[data-storybook-art="riso"] .enroll-card :is(button, input):focus-visible {
  outline: 3px solid #d69b4d;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  :root[data-storybook-art="riso"] .enroll-screen { padding-inline: 12px; }
  :root[data-storybook-art="riso"] .enroll-card {
    width: min(calc(100vw - 24px), calc((100dvh - 72px) * 0.8));
    padding-top: 19%;
  }
}

@media (max-width: 390px) {
  :root[data-storybook-art="riso"] .enroll-card { width: calc(100vw - 18px); }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-storybook-art="riso"] .enroll-card :is(.daily-entry, .enroll-go) { transition: none; }
}
