/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --spacing: 0.25rem;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}
@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer utilities {
  .fixed {
    position: fixed;
  }
  .relative {
    position: relative;
  }
  .start {
    inset-inline-start: var(--spacing);
  }
  .end {
    inset-inline-end: var(--spacing);
  }
  .contents {
    display: contents;
  }
  .inline {
    display: inline;
  }
}
:root {
  --ink: #241b19;
  --muted: #776b65;
  --paper: #fffdf8;
  --canvas: #f6f1e8;
  --red: #a72a31;
  --red-dark: #811b25;
  --gold: #c69849;
  --line: #e5dcd0;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--canvas);
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Noto Sans Khmer", "Khmer OS Battambang", "Leelawadee UI", system-ui, sans-serif;
}
button, textarea {
  font: inherit;
}
.site-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 64px 24px;
  isolation: isolate;
}
.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .33;
  background-image: radial-gradient(rgba(65, 45, 33, .13) .65px, transparent .65px);
  background-size: 7px 7px;
  z-index: -1;
}
.ambient {
  position: fixed;
  width: 430px;
  height: 430px;
  border-radius: 999px;
  filter: blur(4px);
  opacity: .34;
  z-index: -2;
}
.ambient-one {
  top: -220px;
  right: -130px;
  background: radial-gradient(circle, #e6b6a9, transparent 70%);
}
.ambient-two {
  bottom: -260px;
  left: -180px;
  background: radial-gradient(circle, #ddc696, transparent 70%);
}
.workspace {
  width: min(100%, 760px);
}
.intro {
  text-align: center;
  margin-bottom: 32px;
}
.brand-mark {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 14px;
}
.brand-mark span {
  width: 4px;
  border-radius: 99px;
  background: var(--red);
  box-shadow: 0 4px 12px rgba(167, 42, 49, .18);
}
.brand-mark span:nth-child(1), .brand-mark span:nth-child(5) {
  height: 13px;
  opacity: .55;
}
.brand-mark span:nth-child(2), .brand-mark span:nth-child(4) {
  height: 25px;
  opacity: .78;
}
.brand-mark span:nth-child(3) {
  height: 38px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: .76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.25;
  letter-spacing: -.035em;
  font-weight: 760;
}
.subtitle {
  max-width: 560px;
  margin: 14px auto 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
}
.tool-card {
  padding: clamp(22px, 5vw, 38px);
  background: rgba(255, 253, 248, .93);
  border: 1px solid rgba(211, 198, 184, .84);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(72, 49, 37, .12), 0 3px 10px rgba(72, 49, 37, .05);
  backdrop-filter: blur(18px);
}
.field-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
label {
  font-weight: 700;
  font-size: .95rem;
}
.count {
  color: #958981;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.count-low {
  color: var(--red);
}
textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 19px;
  color: var(--ink);
  background: #fffefa;
  line-height: 1.8;
  font-size: 1.06rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea::placeholder {
  color: #aaa098;
}
textarea:focus {
  border-color: #c27679;
  box-shadow: 0 0 0 4px rgba(167, 42, 49, .1);
}
.generate-button, .download-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.generate-button {
  margin-top: 16px;
  color: white;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 24px rgba(129, 27, 37, .22);
}
.generate-button:hover:not(:disabled), .download-button:hover {
  transform: translateY(-1px);
}
.generate-button:active:not(:disabled), .download-button:active {
  transform: translateY(0);
}
.generate-button:disabled {
  cursor: not-allowed;
  opacity: .5;
  box-shadow: none;
}
.play-glyph {
  font-size: .72rem;
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: white;
  animation: spin .7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.status-region:empty {
  display: none;
}
.error-message {
  margin: 16px 0 0;
  padding: 13px 15px;
  color: #811b25;
  background: #fff0ef;
  border: 1px solid #f0cbc8;
  border-radius: 12px;
  line-height: 1.55;
}
.result-card {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.result-kicker {
  margin: 0 0 2px;
  color: var(--red);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}
h2 {
  margin: 0;
  font-size: 1.12rem;
}
.cache-badge {
  color: #705a2b;
  background: #f6eedb;
  border: 1px solid #e8d5a9;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: .7rem;
  white-space: nowrap;
}
audio {
  width: 100%;
  height: 48px;
  display: block;
  margin: 4px 0 12px;
}
.download-button {
  color: var(--red-dark);
  background: #fff7f5;
  border: 1px solid #e9c9c8;
  box-shadow: none;
}
.download-button:hover {
  background: #fff0ed;
}
.download-button span {
  font-size: 1.35rem;
  line-height: 1;
}
.expiry {
  margin: 11px 0 0;
  text-align: center;
  color: #91857e;
  font-size: .73rem;
}
footer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  padding: 0 14px;
  color: #7f736d;
  text-align: center;
  font-size: .78rem;
  line-height: 1.65;
}
.clock-icon {
  color: var(--gold);
  font-size: 1rem;
}
@media (max-width: 600px) {
  .site-shell {
    align-items: start;
    padding: 36px 14px;
  }
  .intro {
    margin-bottom: 24px;
  }
  h1 {
    font-size: 2.25rem;
  }
  .tool-card {
    border-radius: 20px;
  }
  .result-heading {
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .spinner {
    animation-duration: 1.4s;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
