:root {
  color-scheme: light;
  --cream: #f4e4bc;
  --cream-light: #fff8e8;
  --sage: #7cb9a8;
  --sage-deep: #477f70;
  --sage-soft: #dceee4;
  --coral: #e8a87c;
  --brown: #5a4a3a;
  --brown-deep: #3a3226;
  --brown-soft: #806e5b;
  --line: rgba(124, 185, 168, 0.55);
  --danger: #985449;
  --danger-soft: #fff0e8;
  --shadow-sage: 0 8px 32px rgba(124, 185, 168, 0.25);
  --shadow-soft: 0 4px 16px rgba(124, 185, 168, 0.2);
  --radius-card: 28px;
  --radius-control: 20px;
  --card-line: #dfe3ea;
  --text-primary: #202124;
  --text-muted: #5f6368;
  --accent-blue: #1967d2;
  --accent-pink: #b3261e;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(255, 248, 232, 0.94) 0 9%, transparent 28%),
    radial-gradient(ellipse at 92% 12%, rgba(133, 205, 202, 0.38) 0 10%, transparent 31%),
    linear-gradient(158deg, #f8eac6 0%, #f4e4bc 42%, #d8eee4 100%);
  color: var(--brown);
  font-family: "Trebuchet MS", "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(rgba(90, 74, 58, 0.16) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  content: "";
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(71, 127, 112, 0.58);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.page-shell {
  position: relative;
  width: min(100% - 32px, 1152px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 26px 0 32px;
}

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 50px;
}

.header-cloud,
.hero-cloud,
.hero-sprig,
.footer-cloud {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.header-cloud svg,
.hero-cloud svg,
.hero-sprig svg,
.footer-cloud svg {
  display: block;
  width: 100%;
  height: 100%;
}

.header-cloud {
  top: -17px;
  right: 116px;
  width: 118px;
  height: 46px;
  opacity: 0.8;
  transform: rotate(-3deg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  transition: transform 600ms ease-in-out;
}

.brand:hover {
  transform: translateY(-2px) rotate(-0.5deg);
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 48% 52% 50% 46%;
  background: var(--cream-light);
  color: var(--sage-deep);
  box-shadow: var(--shadow-soft);
  transform: rotate(-3deg);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  color: var(--brown-deep);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--brown-soft);
  font-size: 11px;
  letter-spacing: 0.05em;
  line-height: 1;
}

.hero {
  position: relative;
  max-width: 730px;
  padding: 94px 0 64px;
}

.hero-cloud {
  top: 55px;
  right: 2px;
  width: 230px;
  height: 94px;
  opacity: 0.72;
  transform: rotate(3deg);
}

.hero-sprig {
  right: -3px;
  bottom: 23px;
  width: 82px;
  height: 58px;
  opacity: 0.84;
  transform: rotate(8deg);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: 0;
}

.panel,
.workspace-card {
  position: relative;
  border: 2px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 253, 245, 0.84);
  box-shadow: var(--shadow-soft);
}

.panel::after,
.workspace-card::after {
  position: absolute;
  z-index: -1;
  inset: 5px -5px -5px 5px;
  border: 1px solid rgba(232, 168, 124, 0.28);
  border-radius: var(--radius-card);
  content: "";
  transform: rotate(0.35deg);
}

.panel {
  min-height: 390px;
  padding: 32px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 2px solid rgba(124, 185, 168, 0.55);
  border-radius: var(--radius-control);
  padding: 17px;
  outline: none;
  background: #faf5eb;
  color: var(--brown-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  letter-spacing: 0.03em;
  line-height: 1.65;
  transition: border-color 600ms ease-in-out, box-shadow 600ms ease-in-out, background-color 600ms ease-in-out;
}

textarea::placeholder {
  color: #ad9c85;
}

textarea:hover {
  border-color: var(--sage-deep);
}

textarea:focus {
  border-color: var(--sage-deep);
  background: var(--cream-light);
  box-shadow: 0 4px 16px rgba(124, 185, 168, 0.25);
}

textarea[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.field-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--brown-soft);
  font-size: 12px;
}

.field-format {
  color: var(--sage-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.field-error {
  margin: 9px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.action-row {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: transform 600ms ease-in-out, background-color 600ms ease-in-out, border-color 600ms ease-in-out, box-shadow 600ms ease-in-out, color 600ms ease-in-out;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px) rotate(-0.5deg) scale(1.02);
}

.button:active:not(:disabled),
.shortcut-button:active:not(:disabled) {
  transform: scale(0.98);
}

.button-primary {
  flex: 1;
  border-color: var(--sage-deep);
  background: var(--sage);
  color: #fffdf5;
  box-shadow: var(--shadow-soft);
}

.button-primary:hover:not(:disabled) {
  background: var(--sage-deep);
  box-shadow: var(--shadow-sage);
}

.button-secondary {
  min-width: 82px;
  border-color: rgba(124, 185, 168, 0.58);
  background: var(--cream-light);
  color: var(--brown);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--coral);
  background: #fff1db;
  color: var(--brown-deep);
}

.button:disabled,
.shortcut-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.shortcut-panel {
  display: flex;
  flex-direction: column;
}

.shortcut-button {
  display: flex;
  width: 100%;
  min-height: 94px;
  align-items: center;
  gap: 15px;
  margin-top: auto;
  border: 2px solid rgba(124, 185, 168, 0.62);
  border-radius: var(--radius-control);
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--sage-soft), #eef5d9);
  color: var(--sage-deep);
  text-align: left;
  transition: transform 600ms ease-in-out, background-color 600ms ease-in-out, border-color 600ms ease-in-out, box-shadow 600ms ease-in-out;
}

.shortcut-button:hover:not(:disabled) {
  border-color: var(--sage-deep);
  background: linear-gradient(135deg, #d1ebdd, #f4efce);
  box-shadow: var(--shadow-sage);
}

.shortcut-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(124, 185, 168, 0.34);
  border-radius: 48% 52% 54% 46%;
  background: rgba(255, 248, 232, 0.74);
  transform: rotate(-4deg);
}

.shortcut-icon svg {
  width: 22px;
  height: 22px;
}

.shortcut-label {
  min-width: 0;
  flex: 1;
}

.shortcut-label strong,
.shortcut-label small {
  display: block;
}

.shortcut-label strong {
  color: var(--brown-deep);
  font-size: 14px;
  line-height: 1.4;
}

.shortcut-label small {
  margin-top: 4px;
  color: var(--sage-deep);
  font-size: 12px;
}

.shortcut-arrow {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--coral);
}

.result-panel {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--card-line);
  border-radius: 24px;
  background: rgba(255, 253, 245, 0.84);
  color: var(--brown-deep);
  box-shadow: var(--shadow-sage);
}

.result-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 0;
}

.code-display {
  display: block;
  min-height: 88px;
  color: var(--accent-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(52px, 7vw, 78px);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-shadow: none;
  white-space: nowrap;
}

.result-panel:not(.has-code) .code-display {
  width: 100%;
  font-size: clamp(36px, 5vw, 52px);
  color: #85858c;
  letter-spacing: 0.1em;
  text-align: center;
}

.result-panel[data-state="normal"] .code-display {
  color: var(--accent-blue);
}

.result-panel[data-state="warning"] .code-display {
  color: var(--accent-pink);
}

.code-caption {
  min-height: 22px;
  margin: 19px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.button-copy {
  position: relative;
  z-index: 1;
  min-width: 140px;
  border-color: var(--card-line);
  background: transparent;
  color: var(--text-primary);
}

.button-copy:hover:not(:disabled) {
  border-color: #77777f;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.button-copy.is-copied {
  border-color: var(--accent-blue);
  background: rgba(169, 197, 255, 0.12);
  color: var(--accent-blue);
}

.status-message {
  position: relative;
  z-index: 1;
  min-height: 22px;
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.status-message[data-state="success"] {
  color: var(--accent-blue);
  font-weight: 700;
}

.status-message[data-state="error"] {
  color: var(--accent-pink);
  font-weight: 700;
}

.status-message[data-state="pending"] {
  color: var(--brown);
}

.noscript-message {
  margin: 24px 0 0;
  border: 2px solid rgba(152, 84, 73, 0.45);
  border-radius: var(--radius-control);
  padding: 13px 16px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
}

.footer-cloud {
  right: 7%;
  bottom: 41px;
  width: 150px;
  height: 55px;
  opacity: 0.6;
  transform: rotate(2deg);
}

.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 0 0;
  color: var(--brown-soft);
  font-size: 12px;
  text-align: center;
}

.footer-lock {
  display: inline-flex;
  color: var(--sage-deep);
}

.footer-lock svg {
  width: 16px;
  height: 16px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 721px) {
  .page-shell {
    height: 100svh;
    min-height: 0;
    padding: 10px 0 12px;
  }

  .site-header {
    min-height: 40px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    max-width: 100%;
    padding: 13px 0 10px;
  }

  .panel {
    min-height: 0;
    padding: 14px 18px;
  }

  textarea {
    min-height: 60px;
    padding: 8px 10px;
  }

  .field-footer {
    margin-top: 4px;
  }

  .action-row {
    gap: 8px;
    margin-top: 8px;
  }

  .button {
    min-height: 44px;
    padding: 0 14px;
  }

  .shortcut-button {
    min-height: 56px;
    gap: 8px;
    padding: 6px 10px;
  }

  .shortcut-icon {
    width: 34px;
    height: 34px;
  }

  .shortcut-label small {
    margin-top: 2px;
  }

  .result-panel {
    padding: 14px 18px;
  }

  .result-content {
    gap: 12px;
  }

  .code-display {
    min-height: 54px;
    font-size: 56px;
  }

  .code-caption {
    margin-top: 5px;
  }

  .status-message {
    min-height: 17px;
    margin-top: 14px;
  }

  .site-footer {
    padding-top: 8px;
  }

  .footer-cloud {
    bottom: 15px;
  }
}

@media (min-width: 721px) and (max-height: 700px) {
  .page-shell {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .hero {
    padding-top: 8px;
    padding-bottom: 6px;
  }

  .panel,
  .result-panel {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  textarea {
    min-height: 52px;
  }

  .code-display {
    min-height: 46px;
    font-size: 48px;
  }

  .site-footer {
    padding-top: 5px;
  }
}

@media (max-width: 720px) {
  html,
  body {
    overflow-x: clip;
    overflow-y: auto;
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
  }

  .page-shell {
    width: min(100% - 24px, 560px);
    min-height: 100svh;
    padding: 8px 0 10px;
    display: flex;
    flex-direction: column;
  }

  .site-header {
    min-height: 38px;
    flex: 0 0 38px;
  }

  .header-cloud,
  .hero-sprig,
  .footer-cloud {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  #main-content {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  .hero {
    flex: 0 0 auto;
    max-width: none;
    padding: 14px 0 10px;
  }

  .hero-cloud {
    top: 3px;
    right: -8px;
    width: 150px;
    height: 61px;
  }

  .workspace-grid {
    flex: 0 0 auto;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel {
    min-height: 0;
    padding: 16px;
  }

  textarea {
    min-height: 78px;
    resize: none;
    padding: 9px 10px;
  }

  .field-footer {
    margin-top: 4px;
    font-size: 10px;
  }

  .field-format {
    font-size: 10px;
  }

  .action-row {
    gap: 8px;
    margin-top: 10px;
  }

  .button {
    min-height: 44px;
    padding: 0 12px;
  }

  .button-secondary {
    min-width: 72px;
    width: auto;
  }

  .shortcut-button {
    min-height: 64px;
    gap: 10px;
    margin-top: 0;
    padding: 8px 10px;
  }

  .shortcut-icon {
    width: 38px;
    height: 38px;
  }

  .shortcut-label strong {
    font-size: 13px;
  }

  .shortcut-label small {
    margin-top: 2px;
    font-size: 11px;
  }

  .result-panel {
    flex: 0 0 auto;
    margin-top: 10px;
    padding: 20px;
    border: 1px solid var(--card-line);
    border-radius: 20px;
  }

  .result-content {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    margin-top: 0;
  }

  .code-area {
    min-width: 0;
    flex: 1;
  }

  .code-display {
    min-height: 56px;
    font-size: 54px;
    letter-spacing: 0.06em;
  }

  .code-caption {
    margin-top: 6px;
    font-size: 12px;
  }

  .button-copy {
    min-width: 116px;
    width: 100%;
  }

  .status-message {
    min-height: 18px;
    margin-top: 10px;
    font-size: 12px;
  }

  .site-footer {
    flex: 0 0 auto;
    padding-top: 10px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .brand-subtitle {
    font-size: 9px;
  }

  .hero {
    padding-top: 10px;
    padding-bottom: 7px;
  }

  .panel {
    padding: 12px;
  }

  textarea {
    min-height: 62px;
    padding: 8px 10px;
  }

  .field-footer {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 3px;
  }

  .action-row {
    flex-direction: row;
    margin-top: 7px;
  }

  .button-secondary {
    width: auto;
  }

  .shortcut-button {
    min-height: 56px;
    padding: 6px 8px;
  }

  .shortcut-icon {
    width: 34px;
    height: 34px;
  }

  .shortcut-label strong {
    font-size: 12px;
  }

  .shortcut-label small {
    display: none;
  }

  .result-panel {
    margin-top: 8px;
    padding: 16px;
    border-radius: 20px;
  }

  .result-content {
    gap: 8px;
    margin-top: 0;
  }

  .code-display {
    min-height: 48px;
    font-size: 40px;
    letter-spacing: 0.025em;
  }

  .code-caption {
    margin-top: 3px;
    font-size: 11px;
  }

  .button-copy {
    min-width: 108px;
    padding: 0 8px;
  }

  .status-message {
    min-height: 17px;
    margin-top: 7px;
    font-size: 11px;
  }

  .site-footer {
    padding-top: 7px;
    font-size: 10px;
  }
}

@media (max-width: 420px) and (max-height: 700px) {
  .site-header {
    min-height: 34px;
    flex-basis: 34px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 14px;
  }

  .brand-subtitle,
  .site-footer {
    display: none;
  }

  .hero {
    padding: 4px 0 4px;
  }

  .panel {
    padding: 9px 10px;
  }

  .field-footer {
    display: none;
  }

  textarea {
    min-height: 46px;
    height: 46px;
  }

  .action-row {
    margin-top: 5px;
  }

  .shortcut-button {
    min-height: 48px;
  }

  .shortcut-icon {
    width: 30px;
    height: 30px;
  }

  .result-panel {
    margin-top: 6px;
    padding: 8px 10px;
  }

  .result-content {
    margin-top: 0;
    gap: 8px;
  }

  .code-display {
    min-height: 38px;
    font-size: 38px;
  }

  .code-caption {
    margin-top: 1px;
    font-size: 9px;
    line-height: 1.15;
  }

  .button-copy {
    min-width: 100px;
  }

  .status-message {
    min-height: 15px;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.15;
  }
}

@media (min-width: 721px) {
  .field-error {
    min-height: 20px;
    margin-top: 0;
  }

  .field-error[hidden] {
    display: block;
    visibility: hidden;
  }
}

@media (max-width: 420px) {
  textarea {
    height: 96px;
    min-height: 96px;
  }

  .code-caption {
    display: none;
  }
}

@media (max-width: 420px) and (max-height: 700px) {
  textarea {
    height: 46px;
    min-height: 46px;
  }
}

.code-area {
  position: relative;
  padding-right: 58px;
}

.countdown-ring {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  color: var(--brown-deep);
  transform: translateY(-50%);
}

.countdown-ring svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform: none;
}

.countdown-ring-track {
  fill: transparent;
  stroke: none;
}

.countdown-ring-progress {
  fill: var(--accent-blue);
  stroke: none;
  transition: none;
}

.countdown-ring[data-state="warning"] .countdown-ring-progress {
  fill: var(--accent-pink);
}

#countdown-text {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .countdown-ring {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
}

@media (max-width: 420px) {
  .countdown-ring {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .countdown-ring-progress {
    transition: none;
  }
}

.workspace-card {
  gap: 0;
}

.workspace-card > .panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-card > .panel::after {
  display: none;
}

@media (min-width: 721px) {
  .workspace-card > .shortcut-panel {
    border-left: 1px solid rgba(124, 185, 168, 0.36);
  }

  .workspace-card > .shortcut-panel .shortcut-button {
    width: 100%;
    height: 100%;
    min-height: 0;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 20px 16px;
    text-align: center;
  }

  .workspace-card > .shortcut-panel .shortcut-label {
    flex: 0 1 auto;
  }

  .workspace-card > .shortcut-panel .shortcut-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 720px) {
  .workspace-card {
    grid-template-columns: 1fr;
  }

  .workspace-card > .shortcut-panel {
    border-top: 1px solid rgba(124, 185, 168, 0.36);
  }
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.content-layout > .workspace-card,
.content-layout > .result-panel {
  min-width: 0;
  width: 100%;
  margin: 0;
}

@media (min-width: 1100px) {
  .content-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(400px, 1fr);
    gap: 24px;
    align-items: stretch;
  }

  .content-layout > .workspace-card {
    grid-column: 1;
    grid-row: 1;
  }

  .content-layout > .result-panel {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    flex-direction: column;
    justify-content: center;
    width: auto;
  }

  .content-layout > .result-panel .result-content {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    margin-top: 0;
  }

  .content-layout > .result-panel .code-area {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-right: 0;
  }

  .content-layout > .result-panel .code-display {
    text-align: left;
    font-size: clamp(56px, 6vw, 76px);
  }

  .content-layout > .result-panel .countdown-ring {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
  }

  .content-layout > .result-panel .button-copy {
    width: 100%;
    min-height: 44px;
  }

  .content-layout > .result-panel .status-message {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .content-layout {
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .content-layout {
    gap: 8px;
  }

  .content-layout > .result-panel .result-content {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
  }

  .content-layout > .result-panel .button-copy {
    width: 100%;
    min-width: 0;
  }
}

.result-panel:not(.has-code) .code-area {
  width: 100%;
  padding-right: 0;
}

.result-panel:not(.has-code) .code-display {
  width: 100%;
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: 0.1em;
  text-align: center;
}

.result-panel:not(.has-code) .countdown-ring {
  display: none;
}

.result-panel[data-state="warning"] .code-display {
  animation: countdown-warning-blink 1s ease-in-out infinite;
}

@keyframes countdown-warning-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

@media (max-width: 720px) {
  .content-layout > .result-panel .code-area {
    display: flex;
    width: 100%;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-right: 0;
  }

  .content-layout > .result-panel.has-code .code-display {
    display: flex;
    width: auto;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: translateY(3px);
  }

  .content-layout > .result-panel .countdown-ring {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
  }
}

@media (min-width: 421px) and (max-width: 720px) {
  .content-layout > .result-panel .result-content {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .content-layout > .result-panel .button-copy {
    width: 100%;
    min-width: 0;
  }
}
