@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Roboto+Slab:wght@600;700&display=swap');

:root {
  --cream: #ead9ad;
  --cream-2: #c8ad74;
  --rust: #a84228;
  --rust-dark: #5f2115;
  --ink: #22170f;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background: #17110b;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--cream);
  font-family: "Roboto Slab", Georgia, serif;
  background-color: #17110b;
  background-image: url("gregs-playhouse-bg.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      transparent 0 66%,
      rgba(10, 6, 3, .13) 78%,
      rgba(10, 6, 3, .34) 100%
    );
}

.overlay-shell {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 5;
  width: min(1120px, calc(100% - 28px));
  transform: translateX(-50%);
}

.builder-bar {
  display: grid;
  grid-template-columns: 155px minmax(280px, 1fr) 130px 92px 150px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 2px solid rgba(35, 20, 12, .95);
  border-radius: 8px;
  background: rgba(24, 20, 15, .84);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, .45),
    inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.brand {
  align-self: center;
  min-width: 0;
  padding: 1px 8px 1px 4px;
  border-right: 1px solid rgba(234, 217, 173, .23);
  line-height: 1;
}

.brand span {
  display: block;
  margin-bottom: 5px;
  color: #d9bd80;
  font: 700 .59rem "Roboto Slab", serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  color: #f1dfb4;
  font: .98rem "Archivo Black", sans-serif;
  text-transform: uppercase;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field > span {
  color: #dec792;
  font: .57rem "Archivo Black", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #2f241a;
  border-radius: 4px;
  outline: none;
  padding: 0 11px;
  color: var(--ink);
  background: linear-gradient(#eee0bd, #cdb27a);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .55),
    0 2px 0 #100d09;
  font: 700 .76rem "Roboto Slab", serif;
}

input::placeholder {
  color: #716146;
  opacity: .85;
}

input:focus {
  border-color: #b44a2f;
  box-shadow:
    0 0 0 3px rgba(180, 74, 47, .24),
    0 2px 0 #100d09;
}

button {
  height: 42px;
  border: 1px solid #42170f;
  border-radius: 4px;
  color: #f2dfb2;
  background: linear-gradient(#b84a2d, #742416);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .17),
    0 3px 0 #28100a;
  font: .7rem "Archivo Black", sans-serif;
  letter-spacing: .035em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

button:disabled {
  opacity: .7;
  cursor: progress;
}

.toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100% - 32px));
  min-height: 48px;
  padding: 10px 13px;
  border: 2px solid #33251a;
  border-radius: 6px;
  color: #24170f;
  background: linear-gradient(#eadbb7, #c4aa73);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .38);
  font-size: .75rem;
}

.toast.hidden {
  display: none;
}

.toast.error {
  border-color: #7d281a;
}

.toast.success {
  border-color: #4b5d32;
}

.toast small {
  display: block;
  margin-top: 2px;
  color: #655438;
}

.download-link {
  margin-left: auto;
  padding: 10px 12px;
  border-radius: 4px;
  color: #f5e4b9;
  background: #7d291b;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
  touch-action: manipulation;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 3px solid rgba(38, 29, 18, .25);
  border-top-color: #8d2d1d;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Phone layout */
@media (max-width: 760px) {
  body {
    min-height: 100svh;
    background-image: url("gregs-playhouse-2.png");
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }

  body::after {
    background:
      linear-gradient(
        to bottom,
        transparent 0 69%,
        rgba(8, 5, 3, .15) 77%,
        rgba(8, 5, 3, .56) 100%
      );
  }

  .overlay-shell {
    bottom: calc(8px + var(--safe-bottom));
    width: calc(100% - 14px);
  }

  .builder-bar {
    grid-template-columns: minmax(0, 1fr) 84px 96px;
    gap: 6px;
    padding: 8px;
    border-width: 1px;
    border-radius: 7px;
    background: rgba(20, 16, 12, .84);
    box-shadow:
      0 6px 22px rgba(0, 0, 0, .52),
      inset 0 1px rgba(255, 255, 255, .06);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }

  .brand {
    display: none;
  }

  .field {
    gap: 3px;
  }

  .field > span {
    font-size: .48rem;
    letter-spacing: .045em;
  }

  .field-url {
    grid-column: 1 / -1;
  }

  .field-season {
    grid-column: 1;
  }

  .field-year {
    grid-column: 2;
  }

  button {
    grid-column: 3;
  }

  input,
  button {
    height: 36px;
    min-height: 36px;
  }

  input {
    padding: 0 9px;
    font-size: .72rem;
  }

  button {
    padding: 0 8px;
    font-size: .61rem;
    line-height: 1.05;
  }

  .toast {
    top: max(8px, env(safe-area-inset-top, 0px));
    left: 7px;
    right: 7px;
    width: auto;
    max-width: none;
    min-height: 46px;
    padding: 9px 10px;
  }

  .download-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
  }
}

/* Very narrow phones */
@media (max-width: 390px) {
  .builder-bar {
    grid-template-columns: minmax(0, 1fr) 72px 84px;
    gap: 5px;
    padding: 7px;
  }

  .field > span {
    font-size: .44rem;
  }

  input {
    font-size: .67rem;
  }

  button {
    font-size: .55rem;
    letter-spacing: .01em;
  }
}

/* Landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
  body {
    background-image: url("gregs-playhouse-bg.png");
    background-position: center center;
  }

  .overlay-shell {
    bottom: calc(5px + var(--safe-bottom));
  }

  .builder-bar {
    grid-template-columns: minmax(0, 1fr) 100px 78px 106px;
  }

  .field-url {
    grid-column: 1;
  }

  .field-season {
    grid-column: 2;
  }

  .field-year {
    grid-column: 3;
  }

  button {
    grid-column: 4;
  }

  .field > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation-duration: .001ms !important;
  }
}@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Roboto+Slab:wght@600;700&display=swap');

:root {
  --cream: #ead9ad;
  --cream-2: #c8ad74;
  --rust: #a84228;
  --rust-dark: #5f2115;
  --ink: #22170f;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background: #17110b;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--cream);
  font-family: "Roboto Slab", Georgia, serif;
  background-color: #17110b;
  background-image: url("gregs-playhouse-bg.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      transparent 0 66%,
      rgba(10, 6, 3, .13) 78%,
      rgba(10, 6, 3, .34) 100%
    );
}

.overlay-shell {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 5;
  width: min(1120px, calc(100% - 28px));
  transform: translateX(-50%);
}

.builder-bar {
  display: grid;
  grid-template-columns: 155px minmax(280px, 1fr) 130px 92px 150px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 2px solid rgba(35, 20, 12, .95);
  border-radius: 8px;
  background: rgba(24, 20, 15, .84);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, .45),
    inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.brand {
  align-self: center;
  min-width: 0;
  padding: 1px 8px 1px 4px;
  border-right: 1px solid rgba(234, 217, 173, .23);
  line-height: 1;
}

.brand span {
  display: block;
  margin-bottom: 5px;
  color: #d9bd80;
  font: 700 .59rem "Roboto Slab", serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  color: #f1dfb4;
  font: .98rem "Archivo Black", sans-serif;
  text-transform: uppercase;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field > span {
  color: #dec792;
  font: .57rem "Archivo Black", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #2f241a;
  border-radius: 4px;
  outline: none;
  padding: 0 11px;
  color: var(--ink);
  background: linear-gradient(#eee0bd, #cdb27a);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .55),
    0 2px 0 #100d09;
  font: 700 .76rem "Roboto Slab", serif;
}

input::placeholder {
  color: #716146;
  opacity: .85;
}

input:focus {
  border-color: #b44a2f;
  box-shadow:
    0 0 0 3px rgba(180, 74, 47, .24),
    0 2px 0 #100d09;
}

button {
  height: 42px;
  border: 1px solid #42170f;
  border-radius: 4px;
  color: #f2dfb2;
  background: linear-gradient(#b84a2d, #742416);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .17),
    0 3px 0 #28100a;
  font: .7rem "Archivo Black", sans-serif;
  letter-spacing: .035em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

button:disabled {
  opacity: .7;
  cursor: progress;
}

.toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100% - 32px));
  min-height: 48px;
  padding: 10px 13px;
  border: 2px solid #33251a;
  border-radius: 6px;
  color: #24170f;
  background: linear-gradient(#eadbb7, #c4aa73);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .38);
  font-size: .75rem;
}

.toast.hidden {
  display: none;
}

.toast.error {
  border-color: #7d281a;
}

.toast.success {
  border-color: #4b5d32;
}

.toast small {
  display: block;
  margin-top: 2px;
  color: #655438;
}

.download-link {
  margin-left: auto;
  padding: 10px 12px;
  border-radius: 4px;
  color: #f5e4b9;
  background: #7d291b;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
  touch-action: manipulation;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 3px solid rgba(38, 29, 18, .25);
  border-top-color: #8d2d1d;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Phone layout */
@media (max-width: 760px) {
  body {
    min-height: 100svh;
    background-image: url("gregs-playhouse-2.png");
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }

  body::after {
    background:
      linear-gradient(
        to bottom,
        transparent 0 69%,
        rgba(8, 5, 3, .15) 77%,
        rgba(8, 5, 3, .56) 100%
      );
  }

  .overlay-shell {
    bottom: calc(8px + var(--safe-bottom));
    width: calc(100% - 14px);
  }

  .builder-bar {
    grid-template-columns: minmax(0, 1fr) 84px 96px;
    gap: 6px;
    padding: 8px;
    border-width: 1px;
    border-radius: 7px;
    background: rgba(20, 16, 12, .84);
    box-shadow:
      0 6px 22px rgba(0, 0, 0, .52),
      inset 0 1px rgba(255, 255, 255, .06);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }

  .brand {
    display: none;
  }

  .field {
    gap: 3px;
  }

  .field > span {
    font-size: .48rem;
    letter-spacing: .045em;
  }

  .field-url {
    grid-column: 1 / -1;
  }

  .field-season {
    grid-column: 1;
  }

  .field-year {
    grid-column: 2;
  }

  button {
    grid-column: 3;
  }

  input,
  button {
    height: 36px;
    min-height: 36px;
  }

  input {
    padding: 0 9px;
    font-size: .72rem;
  }

  button {
    padding: 0 8px;
    font-size: .61rem;
    line-height: 1.05;
  }

  .toast {
    top: max(8px, env(safe-area-inset-top, 0px));
    left: 7px;
    right: 7px;
    width: auto;
    max-width: none;
    min-height: 46px;
    padding: 9px 10px;
  }

  .download-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
  }
}

/* Very narrow phones */
@media (max-width: 390px) {
  .builder-bar {
    grid-template-columns: minmax(0, 1fr) 72px 84px;
    gap: 5px;
    padding: 7px;
  }

  .field > span {
    font-size: .44rem;
  }

  input {
    font-size: .67rem;
  }

  button {
    font-size: .55rem;
    letter-spacing: .01em;
  }
}

/* Landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
  body {
    background-image: url("gregs-playhouse-bg.png");
    background-position: center center;
  }

  .overlay-shell {
    bottom: calc(5px + var(--safe-bottom));
  }

  .builder-bar {
    grid-template-columns: minmax(0, 1fr) 100px 78px 106px;
  }

  .field-url {
    grid-column: 1;
  }

  .field-season {
    grid-column: 2;
  }

  .field-year {
    grid-column: 3;
  }

  button {
    grid-column: 4;
  }

  .field > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation-duration: .001ms !important;
  }
}

.progress-toast {
  width: min(460px, calc(100% - 32px));
  align-items: stretch;
}

.progress-content {
  width: 100%;
  min-width: 0;
}

.progress-heading,
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-heading span {
  font-weight: 800;
}

.progress-track {
  width: 100%;
  height: 12px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid rgba(36, 23, 15, .55);
  border-radius: 999px;
  background: rgba(36, 23, 15, .2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}

.progress-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(#b84a2d, #742416);
  transition: width .35s ease;
}

.progress-meta {
  margin-top: 6px;
  color: #655438;
  font-size: .66rem;
}

@media (max-width: 760px) {
  .progress-toast {
    width: auto;
  }

  .progress-meta {
    font-size: .61rem;
  }
}

/* Progress UI override: keep the active job clearly visible on desktop and mobile. */
.progress-toast {
  top: 18px;
  left: 50%;
  right: auto;
  width: min(620px, calc(100% - 28px));
  max-width: none;
  transform: translateX(-50%);
  z-index: 9999;
}
.progress-content { width: 100%; }
.progress-track {
  overflow: hidden;
  width: 100%;
  height: 16px;
  margin-top: 10px;
  border: 2px solid #33251a;
  border-radius: 999px;
  background: rgba(30, 20, 12, .25);
}
.progress-fill {
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d291b, #d16a35);
  transition: width .35s ease;
}
@media (max-width: 760px) {
  .progress-toast { top: 10px; width: calc(100% - 18px); }
}
