@font-face {
  font-family: 'Studio UI';
  src: url('assets/fonts/studio-ui.woff') format('woff');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Studio Ticket';
  src: url('assets/fonts/studio-ticket.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f3ede2;
  --paper: #fffcf6;
  --ink: #302b28;
  --muted: #655b52;
  --clay: #a64830;
  --clay-dark: #833620;
  --peach: #f2d3c1;
  --oat: #f0e9de;
  --line: #d8cec0;
  --card-shadow: 0 1px 1px #55402a10, 0 7px 12px -8px #765b3d3d;
  --sans:
    'Studio UI', -apple-system, BlinkMacSystemFont, 'Forest Sans', Arial,
    sans-serif;
  font: 15px/1.55 var(--sans);
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
#main {
  flex: 1;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  touch-action: manipulation;
}
button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
button svg {
  flex: none;
}
a {
  color: var(--clay-dark);
}
:where(button, a, input, textarea, select, summary):focus-visible {
  outline: 3px solid #783c26;
  outline-offset: 3px;
}
h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  line-height: 1.3;
  letter-spacing: -0.05em;
}
p {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  left: 10px;
  top: -90px;
  background: var(--paper);
  border-radius: 8px;
  padding: 10px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
#shell {
  background: #fbf7ef;
  border-bottom: 1px solid var(--line);
}
.shell,
.page,
.foot {
  width: min(1096px, calc(100% - 72px));
  margin-inline: auto;
}
.shell {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.brand {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  min-height: 48px;
}
.brand-mark {
  width: 47px;
  height: 47px;
  object-fit: contain;
}
.brand-wordmark {
  display: grid;
  gap: 3px;
}
.brand strong {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.075em;
  color: #3c3028;
}
.brand small {
  font: 600 9px/1.2 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #805440;
}
.studio-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.nav {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 99px;
  color: #584b40;
  font-size: 14px;
  font-weight: 580;
}
.nav[aria-current] {
  background: #eedccd;
  color: #7e3a23;
  font-weight: 700;
}
.shell-sign {
  display: none;
}
.page {
  padding-block: 35px 44px;
}
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: #746559;
  padding: 17px 0 22px;
  font-size: 12px;
  font-weight: 500;
}
.foot span:first-child,
.shell-sign {
  font:
    italic 700 18px/1 Georgia,
    'Times New Roman',
    serif;
  color: #70503a;
  letter-spacing: -0.035em;
}
.button,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 9px 17px;
  background: var(--paper);
  border: 1px solid #cbbfb0;
  border-radius: 999px;
  color: #493f36;
  font-weight: 620;
  font-size: 14px;
  box-shadow: 0 2px 3px #6140210c;
}
.icon-btn {
  width: 44px;
  padding: 0;
}
.button.primary {
  color: #fffaf4;
  background: var(--clay);
  border-color: #953e28;
  box-shadow:
    inset 0 1px 0 #ffffff20,
    0 3px 5px #77381e2c;
}
.button:disabled,
.icon-btn:disabled {
  color: #83746a;
  background: #ece4d9;
  border-color: #d6cabb;
  box-shadow: none;
}
.button.warning {
  color: #923b27;
}
.link-button {
  color: #79513d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  min-width: 44px;
  padding: 5px 2px;
  font-weight: 620;
  font-size: 13px;
}
.actions,
.recent-actions,
.format-head,
.list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.actions.right {
  justify-content: flex-end;
}
.format-head {
  justify-content: space-between;
}
.small,
.hint {
  font-size: 13px;
  color: var(--muted);
}
.grow {
  flex: 1;
  min-width: 0;
}
.gap {
  margin-top: 16px;
}
.mono {
  font-family: 'Forest Mono', 'Studio UI', monospace;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 4;
}
.record-row {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 11px 0;
}
.record-row:first-child {
  border: 0;
}
.record-title {
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 15px;
  font-weight: 670;
  text-align: left;
  overflow-wrap: anywhere;
}
.record-row p {
  font-size: 12px;
}
.lang {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 56px;
  min-height: 32px;
  border-radius: 8px;
  background: #e6e8d9;
  color: #4b5532;
  font: 700 10px/1 var(--sans);
  letter-spacing: 0.035em;
}
.lang.c {
  background: #e4e8e8;
  color: #405865;
}
.lang.java {
  background: #ede2d0;
  color: #694e32;
}
.empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 36px;
  text-align: center;
}
.empty svg {
  color: #9e7659;
}
.empty strong {
  display: block;
}
.loading {
  padding: 36px;
  text-align: center;
}
.multiline {
  white-space: pre-line;
}
.manual-copy {
  width: 100%;
  min-height: 200px;
}
dialog {
  max-width: min(620px, 94vw);
  width: 100%;
  max-height: 88svh;
  color: var(--ink);
}
dialog h2 {
  font-size: 21px;
}
dialog .format-head {
  margin-bottom: 14px;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #46372d;
  border-radius: 12px;
  color: #fffaf4;
  padding: 10px 16px;
  z-index: 80;
  pointer-events: none;
  width: max-content;
  max-width: 92vw;
  font-size: 13px;
}
#toast:empty {
  display: none;
}
.workspace-head,
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.workspace-head {
  margin-bottom: 17px;
}
.workspace-head h1 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 750;
}
.date-stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 530;
  font-variant-numeric: tabular-nums;
}
.create-card,
.paper-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
}
/* The artwork and details form one ticket. Its single button expands to the card. */
.create-card {
  --stub-width: clamp(160px, 20%, 218px);
  display: grid;
  grid-template-columns: clamp(106px, 15%, 161px) minmax(0, 1fr) var(
      --stub-width
    );
  align-items: stretch;
  background: #fffbf2;
  border-color: #cdbda9;
  border-radius: 15px;
  overflow: hidden;
  isolation: isolate;
}
.ticket-film {
  position: relative;
  align-self: stretch;
  overflow: hidden;
  min-height: 188px;
  margin: 0;
  background: #554337;
  border-inline-end: 1px solid #6a5644;
}
.ticket-film::before,
.ticket-film::after {
  content: '';
  position: absolute;
  z-index: 1;
  width: 5px;
  inset-block: 0;
  background: linear-gradient(
      to bottom,
      transparent 3px,
      #e6d5bd 3px 10px,
      transparent 10px
    )
    0 50% / 100% 18px repeat-y;
}
.ticket-film::before {
  left: 5px;
}
.ticket-film::after {
  right: 5px;
}
.ticket-image {
  position: absolute;
  inset: 7px 14px;
  display: block;
  width: calc(100% - 28px);
  height: calc(100% - 14px);
  object-fit: cover;
  object-position: 50% 59%;
  border-radius: 2px;
}
.ticket-copy {
  min-width: 0;
  align-self: center;
  padding: 25px clamp(22px, 3vw, 43px);
}
.ticket-series {
  color: #89573e;
  font-size: 13px;
  font-weight: 680;
  letter-spacing: 0.025em;
}
.ticket-copy h2 {
  font:
    700 clamp(31px, 3.6vw, 47px) / 1.2 'Studio Ticket',
    'Forest Serif',
    serif;
  color: #3e3027;
  letter-spacing: -0.048em;
  margin: 4px 0 13px;
}
.ticket-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: #665744;
  font-size: 12px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.ticket-meta .ticket-day {
  color: #8a4229;
  letter-spacing: 0.08em;
}
.ticket-meta > * + * {
  border-inline-start: 1px solid #d3c4b2;
  padding-inline-start: 10px;
}
.ticket-topic {
  margin: 5px 0 0;
  font-size: clamp(15px, 1.6vw, 18px);
  color: #43382e;
  font-weight: 630;
  overflow-wrap: anywhere;
}
.ticket-stub {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 13px;
  padding: 16px;
  border-inline-start: 1.5px dashed #bf9c81;
  background: #f4e8d7;
}
.ticket-seal {
  display: block;
  width: 55px;
  height: auto;
  transform: rotate(-6deg);
}
.ticket-start {
  min-height: 46px;
  width: min(100%, 149px);
  padding-inline: 12px;
  gap: 9px;
}
.ticket-start::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 14px;
}
.create-card:has(.ticket-start:focus-visible) {
  outline: 3px solid #783c26;
  outline-offset: 3px;
}
.create-card .ticket-start:active {
  transform: none;
}
.create-card::before,
.create-card::after {
  content: '';
  position: absolute;
  z-index: 1;
  pointer-events: none;
  width: 17px;
  height: 17px;
  right: calc(var(--stub-width) - 8px);
  border: 1px solid #cbb9a5;
  border-radius: 50%;
  background: var(--bg);
}
.create-card::before {
  top: -10px;
}
.create-card::after {
  bottom: -10px;
}
.ticket-resume {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf4e9;
  padding: 7px 14px;
  margin-top: 9px;
}
.resume-glyph {
  display: grid;
  place-items: center;
  color: #85684f;
  flex: none;
}
.resume-details {
  flex: 1;
  min-width: 0;
}
.resume-details small {
  display: block;
  color: #71604f;
  font-size: 12px;
  line-height: 1.35;
}
.resume-details strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ticket-resume .link-button {
  flex: none;
}
@media (max-width: 720px) {
  .create-card {
    grid-template-columns: clamp(69px, 21%, 102px) minmax(0, 1fr);
    border-radius: 14px;
  }
  .create-card::before,
  .create-card::after {
    display: none;
  }
  .ticket-film {
    grid-row: 1;
    min-height: 133px;
  }
  .ticket-film::before,
  .ticket-film::after {
    width: 3px;
    background-size: 100% 15px;
  }
  .ticket-film::before {
    left: 3px;
  }
  .ticket-film::after {
    right: 3px;
  }
  .ticket-image {
    inset: 5px 8px;
    width: calc(100% - 16px);
    height: calc(100% - 10px);
  }
  .ticket-copy {
    padding: 15px clamp(13px, 4vw, 25px) 16px;
  }
  .ticket-series {
    font-size: 12px;
  }
  .ticket-copy h2 {
    font-size: clamp(27px, 7vw, 35px);
    margin: 3px 0 8px;
  }
  .ticket-meta {
    font-size: 11px;
    gap: 3px 6px;
  }
  .ticket-meta > * + * {
    padding-inline-start: 6px;
  }
  .ticket-topic {
    font-size: 14px;
    line-height: 1.45;
  }
  .ticket-stub {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 14px;
    border-inline-start: 0;
    border-top: 1.5px dashed #bf9c81;
  }
  .ticket-seal {
    width: 33px;
    margin-inline: 5px;
  }
  .ticket-start {
    width: auto;
    flex: 1;
    min-height: 44px;
  }
  .ticket-resume {
    padding: 6px 10px;
    gap: 8px;
  }
}
@media (hover: hover) {
  .create-card:has(.ticket-start:hover) {
    border-color: #ab8064;
  }
  .create-card .ticket-start:hover {
    background: #933e29;
  }
}

.workbench {
  margin-top: 17px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  align-items: stretch;
  gap: 17px;
}
.paper-card {
  background: var(--paper);
  padding: 17px 25px 22px;
}
.card-heading {
  min-height: 44px;
}
.card-heading h2 {
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 720;
}
.week-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 13px;
  font-weight: 600;
  color: #625446;
}
.week-nav span {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.week-arrow {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  color: #745745;
  border-radius: 50%;
}
.week-arrow[data-value='-1'] svg {
  transform: rotate(180deg);
}
.week-arrow:disabled {
  color: #b8aa9c;
}
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 12px 0 18px;
  gap: 2px;
}
.study-date {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 1px;
  color: #584d40;
  border-radius: 12px;
}
.weekday {
  font-size: 12px;
  font-weight: 550;
}
.day-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e8e0d4;
  border-radius: 50%;
  background: #f9f4eb;
  box-shadow: 0 2px 4px #674b2b16;
  font-size: 17px;
  font-weight: 570;
  font-variant-numeric: tabular-nums;
}
.study-date[aria-pressed='true'] .day-number {
  background: var(--clay);
  border-color: #944028;
  color: #fffaf5;
  font-weight: 730;
}
.study-date[aria-pressed='true'] .weekday {
  font-weight: 700;
  color: #813e27;
}
.study-date:disabled .day-number {
  color: #b3a696;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.study-date:disabled .weekday {
  color: #a09283;
}
.lesson-summary {
  border-top: 1px solid #e4d9c9;
  padding-top: 14px;
}
.lesson-controls,
.lesson-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.language-rail {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border-radius: 99px;
  background: #eee7db;
  border: 1px solid #ded2c1;
}
.home-lang {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  color: #625647;
  font: 650 11px/1.2 var(--sans);
  letter-spacing: 0.025em;
  border-radius: 99px;
}
.home-lang[aria-pressed='true'] {
  background: var(--paper);
  color: #844025;
  box-shadow: 0 1px 4px #4e321c29;
}
.day-label {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.09em;
  color: #8b432a;
}
.lesson-body {
  margin: 9px 0 0;
  align-items: baseline;
}
.lesson-body h3 {
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 680;
}
.lesson-level {
  color: #64584a;
  font-size: 12px;
  white-space: nowrap;
}
.recent-card {
  display: flex;
  flex-direction: column;
}
.empty-home {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  flex: 1;
  text-align: center;
  min-height: 149px;
}
.empty-icon {
  height: 54px;
  width: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1e7d9;
  color: #8d7259;
  margin: 0 0 7px;
}
.empty-home strong {
  font-size: 15px;
  font-weight: 650;
}
.empty-home p {
  font-size: 13px;
}
@media (hover: hover) {
  :is(.nav, .week-arrow):hover:not(:disabled) {
    background: #f0e5d6;
  }
  :is(.button, .icon-btn):not(:disabled):hover {
    border-color: #997962;
  }
  .button.primary:hover {
    background: #933e29;
  }
  :is(.link-button, .record-title):hover {
    text-decoration: underline;
  }
  .study-date:not(:disabled):hover .day-number {
    border-color: #a8775c;
  }
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
@media (max-width: 899px) {
  .shell,
  .page,
  .foot {
    width: calc(100% - 42px);
  }
  .workbench {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  }
  .paper-card {
    padding-inline: 19px;
  }
}
@media (max-width: 720px) {
  html {
    scroll-padding-bottom: calc(75px + env(safe-area-inset-bottom));
  }
  .shell,
  .page,
  .foot {
    width: calc(100% - 32px);
  }
  .shell {
    min-height: 69px;
    justify-content: space-between;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
  }
  .brand {
    gap: 8px;
  }
  .brand strong {
    font-size: 20px;
  }
  .brand small {
    font-size: 8px;
  }
  .shell-sign {
    display: inline;
    font-size: 16px;
  }
  .studio-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    background: #fffbf4;
    padding: 5px max(10px, env(safe-area-inset-right))
      max(5px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid #dacdbc;
    box-shadow: 0 -2px 12px #7257390b;
  }
  .nav {
    flex-direction: column;
    gap: 2px;
    min-height: 47px;
    line-height: 1.3;
    font-size: 11px;
    border-radius: 13px;
    padding: 5px;
  }
  .nav svg {
    width: 18px;
    height: 18px;
  }
  #footer {
    margin-bottom: calc(62px + env(safe-area-inset-bottom));
  }
  #toast {
    bottom: calc(67px + env(safe-area-inset-bottom));
  }
  .page {
    padding-block: 20px 28px;
  }
  .foot {
    padding-block: 14px 18px;
  }
  .workspace-head {
    margin-bottom: 12px;
  }
  .workspace-head h1 {
    font-size: 25px;
  }
  .date-stamp {
    font-size: 11px;
    gap: 5px;
  }
  .date-stamp svg {
    width: 14px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 12px;
  }
  .paper-card {
    padding: 12px 17px 17px;
    border-radius: 16px;
  }
  .card-heading {
    gap: 5px;
  }
  .card-heading h2 {
    font-size: 18px;
  }
  .week-nav {
    font-size: 12px;
    gap: 0;
  }
  .week-strip {
    margin: 8px 0 13px;
    gap: 1px;
  }
  .week-arrow {
    min-width: 44px;
  }
  .day-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .lesson-summary {
    padding-top: 10px;
  }
  .lesson-body {
    margin-top: 7px;
  }
  .empty-home {
    min-height: 94px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: start;
    align-content: center;
    align-items: center;
    gap: 2px 12px;
    text-align: left;
    border-top: 1px solid #e4d9c9;
    margin-top: 4px;
  }
  .empty-icon {
    grid-row: 1/3;
    width: 43px;
    height: 43px;
    margin: 0;
  }
  .empty-icon svg {
    width: 25px;
  }
  .empty-home strong {
    font-size: 14px;
  }
  .empty-home p {
    font-size: 12px;
  }
}
@media (max-width: 362px) {
  .shell,
  .page,
  .foot {
    width: calc(100% - 24px);
  }
  .day-number {
    height: 34px;
    width: 34px;
  }
  .paper-card {
    padding-inline: 12px;
  }
  .curriculum-card .week-strip {
    grid-template-columns: repeat(4, minmax(44px, 1fr));
    gap: 6px 2px;
  }
  .study-date {
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    gap: 3px;
  }
  .week-nav {
    font-size: 11px;
  }
  .footer-bar .button {
    padding-inline: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media (prefers-contrast: more) {
  :root {
    --muted: #40372f;
    --line: #665747;
  }
  .paper-card,
  .create-card,
  .nav[aria-current],
  .day-number,
  .language-rail {
    border: 1px solid #776453;
  }
}
