/* tonox2dev dont copyright */
:root {
  --bg: #050a07;
  --panel: #0a160d;
  --panel-strong: #102117;
  --line: #23472b;
  --line-bright: #43854b;
  --text: #dcffe3;
  --text-dim: #b8e8bf;
  --muted: #88ad8d;
  --muted-dim: #64806a;
  --accent: #39ff14;
  --accent-hi: #8bff69;
  --accent-ink: #031006;
  --green: #72ff91;
  --red: #ff7b72;
  --accent-rgb: 57, 255, 20;
  --bg-rgb: 5, 10, 7;
  --theme-glow-rgb: 57, 255, 20;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1e1e;
  --panel: #252526;
  --panel-strong: #333337;
  --line: #45454b;
  --line-bright: #686870;
  --text: #e4e4e4;
  --text-dim: #c5c5c5;
  --muted: #a5a5ad;
  --muted-dim: #85858d;
  --accent: #65d6b0;
  --accent-hi: #a0f1d7;
  --accent-ink: #10231d;
  --green: #83e9bd;
  --red: #ff8585;
  --accent-rgb: 101, 214, 176;
  --bg-rgb: 30, 30, 30;
  --theme-glow-rgb: 101, 214, 176;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f6f1;
  --panel: #ffffff;
  --panel-strong: #e5eee5;
  --line: #b8cdb8;
  --line-bright: #79a879;
  --text: #15251a;
  --text-dim: #314b37;
  --muted: #48654d;
  --muted-dim: #5f7863;
  --accent: #15803d;
  --accent-hi: #166534;
  --accent-ink: #ffffff;
  --green: #168447;
  --red: #b42318;
  --accent-rgb: 21, 128, 61;
  --bg-rgb: 241, 246, 241;
  --theme-glow-rgb: 21, 128, 61;
}

html[data-theme="green"] {
  color-scheme: dark;
}

.home-page,
.tool-page,
.receiver-page {
  background:
    radial-gradient(ellipse at 8% 24%, rgba(var(--theme-glow-rgb), 0.1), transparent 32%),
    radial-gradient(ellipse at 91% 9%, rgba(var(--theme-glow-rgb), 0.09), transparent 30%),
    radial-gradient(ellipse at 72% 84%, rgba(var(--theme-glow-rgb), 0.08), transparent 34%),
    var(--bg);
}

html.theme-transition body,
html.theme-transition body :not(canvas):not(video) {
  transition:
    color 420ms ease,
    background-color 420ms ease,
    border-color 420ms ease,
    box-shadow 420ms ease,
    fill 420ms ease,
    stroke 420ms ease;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.site-header > .brand {
  justify-self: start;
}

.site-header > .mode-nav {
  justify-self: end;
}

.theme-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: center;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #f2d45c;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 0 14px rgb(242 212 92 / 24%);
}

html.theme-user-selected .theme-switcher {
  border-color: var(--line);
  box-shadow: none;
}

.theme-tip {
  position: absolute;
  z-index: 2;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: #1e1e1e;
  background: #f2d45c;
  border: 1px solid #fff1a3;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.theme-tip-message {
  position: absolute;
  z-index: 5;
  top: calc(100% + 10px);
  left: 50%;
  width: max-content;
  max-width: min(260px, calc(100vw - 24px));
  padding: 9px 30px 9px 12px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.22);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  transform: translateX(-50%);
}

.theme-tip-message::before {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--panel-strong);
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  content: "";
  transform: translate(-50%, 4px) rotate(45deg);
}

.theme-tip-dismiss {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 16px;
}

.theme-choice {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.theme-choice:hover,
.theme-choice:focus-visible {
  color: var(--text);
  background: transparent;
  border-color: var(--line-bright);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.26);
  transform: none;
}

.theme-choice[aria-pressed="true"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  border-color: var(--accent);
  box-shadow: 0 0 13px rgba(var(--accent-rgb), 0.38);
}

.theme-choice svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-choice-dark {
  color: #8c8c8c;
}

.theme-choice-dark[aria-pressed="true"] {
  color: #e0e0e0;
  background: #1e1e1e;
}

.theme-choice-light[aria-pressed="true"] {
  color: #f2c94c;
  background: color-mix(in srgb, #f2c94c 12%, var(--panel));
}

.transfer-card,
.metric,
.file-picker,
details.settings {
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.transfer-card:hover,
.transfer-card:focus-within,
.file-picker:hover,
.metric:hover,
details.settings:hover {
  border-color: var(--accent-hi);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.18),
    0 0 26px rgba(var(--accent-rgb), 0.13);
}

.transfer-card:hover {
  transform: translateY(-2px);
}

button,
button:hover,
.file-picker-button,
.action,
.action:hover,
a.download,
a.download:hover {
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    filter 150ms ease,
    transform 150ms ease;
}

button:hover,
.file-picker:hover .file-picker-button,
.action:hover,
a.download:hover {
  color: var(--accent-hi);
  background-color: var(--panel);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.28);
}

button:hover,
.action:hover,
a.download:hover {
  transform: translateY(-1px);
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--accent-hi);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.35);
  filter: none;
}

.no-signal-toast {
  position: static;
  z-index: auto;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 8px;
  transform: none;
  white-space: normal;
}

main > .locale-banner {
  display: none;
}

details.settings .range-setting {
  flex: 1 1 220px;
  min-width: min(100%, 220px);
}

details.settings .range-setting > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

details.settings .range-setting output {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

details.settings .range-setting input[type="range"] {
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
}

.staged-files {
  display: grid;
  gap: 12px;
  width: min(92vw, 640px);
}

.staged-file-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.staged-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.staged-file-icon {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.staged-file-thumbnail {
  border: 1px solid var(--line);
  object-fit: cover;
}

.staged-file-details {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
  text-align: start;
}

.staged-file-name {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staged-file-size,
.staged-file-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.staged-file-remove {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 5px;
  color: #b42318;
  background: #ffffff;
  border: 1px solid #e14747;
  border-radius: 8px;
  box-shadow: 0 0 9px rgb(255 70 70 / 30%);
}

.staged-file-remove:hover,
.staged-file-remove:focus-visible {
  color: #941d1d;
  background: #fff7f7;
  border-color: #e14747;
  box-shadow: 0 0 13px rgb(255 70 70 / 50%);
  transform: none;
}

.staged-file-remove svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transfer-now {
  width: 100%;
}

.transfer-now:disabled {
  color: var(--muted-dim);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.file-picker.staging-busy {
  opacity: 0.65;
  pointer-events: none;
}

#settings .share-site {
  width: 100%;
  margin-top: 12px;
}

.settings-share-link {
  margin-top: 12px;
}

.settings-share-link > button {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--accent);
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: 8px;
}

.status-line .text-button {
  display: inline-flex;
  align-items: center;
  margin-inline: 8px;
  padding: 4px 8px;
  color: var(--accent);
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  font: inherit;
  font-size: 0.82em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-line .text-button:hover,
.status-line .text-button:focus-visible {
  color: var(--accent-hi);
  background: var(--panel-strong);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.24);
}

a:not(.action):not(.download):hover,
a:not(.action):not(.download):focus-visible {
  color: var(--accent-hi);
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.55);
}

.snippet-display-setting {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: start;
}

.snippet-display-setting select {
  width: 100%;
  padding: 5px 8px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 16px;
  letter-spacing: normal;
  text-transform: none;
}

.enhancement-dialog {
  width: min(92vw, 760px);
  max-height: min(85vh, 900px);
}

.enhancement-dialog > .received-note {
  max-height: 65vh;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.enhancement-dialog > button {
  min-width: 88px;
}

.enhancement-dialog::backdrop {
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(4px);
}

.enhancement-dialog-body {
  max-height: 65vh;
  overflow: auto;
  margin: 12px 0;
  text-align: start;
}

.document-preview-word-content {
  max-height: min(72vh, 760px);
  overflow: auto;
  padding: 24px;
  color: #222;
  background: #fff;
  border: 1px solid #c7cbd1;
  border-radius: 8px;
  font: 16px/1.6 Arial, Helvetica, sans-serif;
  overflow-wrap: anywhere;
}

.document-preview-word-content table,
.document-preview-sheet table {
  width: 100%;
  border-collapse: collapse;
}

.document-preview-word-content th,
.document-preview-word-content td,
.document-preview-sheet th,
.document-preview-sheet td {
  padding: 7px 10px;
  border: 1px solid #9aa0a6;
  text-align: start;
  vertical-align: top;
}

.document-preview-sheet {
  max-height: 500px;
  overflow: auto;
  padding: 12px;
  color: #fff;
  background: #222;
  border-radius: 8px;
}

.document-preview-text {
  max-height: 400px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  color: #38ef7d;
  background: #1e1e1e;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.document-preview {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  text-align: start;
}

.document-preview h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
}

.document-preview-content {
  min-width: 0;
}

.document-preview-content.document-preview-fallback-card,
.minecraft-preview.document-preview-fallback-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  text-align: center;
}

.pdf-preview-viewer {
  display: grid;
  gap: 10px;
  width: 100%;
}

.pdf-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pdf-preview-toolbar button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-strong);
  font: inherit;
  cursor: pointer;
}

.pdf-preview-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pdf-preview-page-indicator {
  min-width: 96px;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
}

.pdf-preview-canvas-container {
  max-height: 72vh;
  overflow: auto;
  padding: 12px;
  background: #e8eaed;
  border: 1px solid #c7cbd1;
  border-radius: 8px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pdf-preview-canvas-container canvas {
  display: block;
  margin-inline: auto;
  background: #fff;
  box-shadow: 0 2px 9px rgb(0 0 0 / 24%);
}

.document-preview pre {
  max-height: 65vh;
  overflow: auto;
  margin: 0 0 12px;
  padding: 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.document-preview-fallback {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
}

.document-preview-file {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-dim);
}

.document-preview-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  color: #fff;
  background: #1a73e8;
  border: 1px solid #1a73e8;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.document-preview-download svg,
.minecraft-pack-download svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.document-preview-download:hover,
.document-preview-download:focus-visible {
  color: #fff;
  background: #1558b0;
  border-color: #1558b0;
  box-shadow: 0 2px 8px rgb(26 115 232 / 30%);
}

.minecraft-pack-list {
  display: grid;
  gap: 12px;
}

.minecraft-pack-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgb(0 0 0 / 18%);
}

.minecraft-pack-icon,
.minecraft-pack-icon-fallback {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.minecraft-pack-icon {
  object-fit: cover;
  image-rendering: auto;
}

.minecraft-pack-icon-fallback {
  padding: 6px;
  color: var(--muted);
  background: var(--panel-strong);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.minecraft-pack-content,
.minecraft-pack-details {
  min-width: 0;
}

.minecraft-pack-name {
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 1.1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minecraft-pack-description,
.minecraft-pack-author {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.minecraft-pack-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.minecraft-pack-author {
  color: var(--muted);
}

.minecraft-pack-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.minecraft-pack-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.minecraft-pack-format {
  color: #8be0a4;
  background: rgb(24 128 56 / 16%);
  border: 1px solid rgb(82 196 112 / 48%);
}

.minecraft-pack-version {
  color: #ffdc78;
  background: rgb(251 188 4 / 15%);
  border: 1px solid rgb(251 188 4 / 48%);
}

.minecraft-pack-action {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  margin-inline-start: auto;
  grid-column: 3;
  grid-row: 1;
}

.minecraft-pack-download {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: #1a73e8;
  border: 1px solid #1a73e8;
  border-radius: 9px;
  text-decoration: none;
}

.minecraft-pack-download:hover,
.minecraft-pack-download:focus-visible {
  color: #fff;
  background: #1558b0;
  border-color: #1558b0;
  box-shadow: 0 2px 8px rgb(26 115 232 / 30%);
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .minecraft-pack-card {
    grid-template-columns: 64px minmax(0, 1fr) 44px;
    gap: 12px;
    padding: 12px;
  }

  .minecraft-pack-icon,
  .minecraft-pack-icon-fallback {
    width: 64px;
    height: 64px;
  }

  .minecraft-pack-action {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
  }
}

.tonofastcode-info {
  margin: 22px 0;
  padding: clamp(18px, 4vw, 28px);
  color: var(--text);
  background:
    radial-gradient(ellipse at 100% 0, rgba(var(--accent-rgb), 0.1), transparent 42%),
    var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgb(var(--accent-rgb) / 8%);
}

.tonofastcode-info h2 {
  margin: 0 0 10px;
  color: var(--text);
}

.tonofastcode-info > p {
  max-width: 75ch;
  margin: 0;
  color: var(--text-dim);
  line-height: 1.65;
}

.tonofastcode-info h3 {
  margin: 20px 0 8px;
  color: var(--text);
  font-size: 1rem;
}

.tonofastcode-info ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-inline-start: 1.25rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.snippet-presentation {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 100%;
  margin: 16px auto;
  padding: 20px 12px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgb(var(--accent-rgb) / 14%);
}

.snippet-presentation-title {
  margin: 0;
  font-size: 1.1rem;
}

.snippet-presentation-message {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.gift-box {
  position: relative;
  width: min(240px, 78vw);
  height: 190px;
  margin: 32px auto 0;
  overflow: visible;
  perspective: 700px;
}

.gift-base {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 88px;
  border: 2px solid var(--gift-trim);
  border-radius: 4px 4px 12px 12px;
  background:
    linear-gradient(90deg, transparent 42%, var(--gift-ribbon) 42%, var(--gift-ribbon) 58%, transparent 58%),
    linear-gradient(145deg, var(--gift-wrap-light), var(--gift-wrap-dark));
  box-shadow: 0 12px 18px var(--gift-shadow);
}

.gift-lid {
  position: absolute;
  z-index: 4;
  bottom: 78px;
  left: -5%;
  width: 110%;
  min-height: 48px;
  padding: 10px 8px;
  border: 2px solid var(--gift-trim);
  border-radius: 9px;
  color: var(--gift-ink);
  background:
    linear-gradient(90deg, transparent 42%, var(--gift-ribbon) 42%, var(--gift-ribbon) 58%, transparent 58%),
    linear-gradient(145deg, var(--gift-lid-light), var(--gift-lid-dark));
  box-shadow: 0 6px 12px var(--gift-shadow);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transform-origin: 20% 100%;
  transition:
    transform 650ms cubic-bezier(0.2, 0.8, 0.25, 1),
    opacity 500ms ease;
}

.gift-lid::before,
.gift-lid::after {
  position: absolute;
  top: -17px;
  width: 24px;
  height: 18px;
  border: 2px solid var(--gift-trim);
  border-radius: 80% 20% 80% 20%;
  background: var(--gift-bow);
  content: "";
  pointer-events: none;
}

.gift-lid::before {
  left: calc(50% - 23px);
  transform: rotate(28deg);
}

.gift-lid::after {
  right: calc(50% - 23px);
  transform: scaleX(-1) rotate(28deg);
}

.gift-lid:hover,
.gift-lid:focus-visible {
  color: var(--gift-ink);
  background-color: transparent;
  border-color: var(--gift-trim);
  box-shadow: 0 6px 12px var(--gift-shadow);
  transform: none;
}

.gift-lid:focus-visible,
.greeting-cover:focus-visible,
.scroll-open:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.gift-paper {
  position: absolute;
  z-index: 1;
  right: 12%;
  bottom: 70px;
  left: 12%;
  display: grid;
  min-height: 120px;
  align-items: center;
  padding: 12px;
  border: 2px solid #e7bd65;
  border-radius: 6px;
  color: #352510;
  background: linear-gradient(145deg, #fffdf3, #ffefc6);
  box-shadow: 0 0 14px rgb(0 0 0 / 28%);
  opacity: 0;
  transform: translateY(60%);
  transition:
    transform 750ms cubic-bezier(0.2, 0.8, 0.25, 1),
    opacity 350ms ease;
}

.gift-paper .snippet-presentation-message {
  max-height: 140px;
  overflow: auto;
  font-size: 0.9rem;
}

.gift-box.is-open .gift-lid {
  opacity: 0;
  pointer-events: none;
  transform: translate(70px, -115px) rotate(28deg) scale(0.85);
}

.gift-box.is-open .gift-paper {
  opacity: 1;
  transform: translateY(-55px);
}

.snippet-presentation-birthday {
  --gift-wrap-light: #ff7b8b;
  --gift-wrap-dark: #d7265e;
  --gift-lid-light: #ffd166;
  --gift-lid-dark: #f2a900;
  --gift-ribbon: #fff1a8;
  --gift-bow: #8b1e4b;
  --gift-trim: #fff0c2;
  --gift-ink: #4b1530;
  --gift-shadow: rgb(121 23 54 / 30%);
  border-color: #f4a1af;
  background: linear-gradient(145deg, #fff0f3, #ffe0e7);
}

.snippet-presentation-christmas {
  --gift-wrap-light: #2ca678;
  --gift-wrap-dark: #116149;
  --gift-lid-light: #e54646;
  --gift-lid-dark: #a81e2d;
  --gift-ribbon: #f4cf69;
  --gift-bow: #f4cf69;
  --gift-trim: #ffe6a0;
  --gift-ink: #fff5dd;
  --gift-shadow: rgb(20 63 43 / 36%);
  border-color: #75c9a7;
  background: linear-gradient(145deg, #e8fff4, #c5f1dc);
}

.greeting-card {
  position: relative;
  width: min(260px, 82vw);
  height: 170px;
  perspective: 800px;
}

.greeting-inside,
.greeting-cover {
  position: absolute;
  inset: 0;
  border: 2px solid #ffe09a;
  border-radius: 6px 18px 18px 6px;
}

.greeting-inside {
  display: grid;
  align-items: center;
  padding: 18px;
  color: #4e2849;
  background: linear-gradient(145deg, #fffdf4, #ffecc8);
  box-shadow: inset 8px 0 rgb(103 46 76 / 14%);
}

.greeting-inside .snippet-presentation-message {
  max-height: 125px;
  overflow: auto;
}

.greeting-cover {
  display: grid;
  place-items: center;
  color: #fff5df;
  background:
    radial-gradient(circle at 70% 28%, rgb(255 234 167 / 36%) 0 3px, transparent 4px),
    linear-gradient(145deg, #dc5269, #8246a8 60%, #354e9b);
  font-size: 54px;
  cursor: pointer;
  transform-origin: left center;
  transition: transform 800ms cubic-bezier(0.2, 0.8, 0.25, 1);
  backface-visibility: hidden;
}

.greeting-cover:hover,
.greeting-cover:focus-visible {
  color: #fff5df;
  background-color: transparent;
  border-color: #ffe09a;
  box-shadow: none;
  transform: none;
}

.greeting-card.is-open .greeting-cover {
  transform: rotateY(-155deg);
}

.snippet-presentation-greeting {
  border-color: #d28db0;
  background: linear-gradient(145deg, #f9e8ff, #ffe5e1);
}

.announcement-scroll {
  display: grid;
  justify-items: center;
  width: min(100%, 460px);
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff3c5, #f7d88b);
}

.scroll-open {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  min-height: 42px;
  padding: 9px 16px;
  border: 2px solid #9a642e;
  border-radius: 999px;
  color: #fff5dc;
  background: linear-gradient(180deg, #a86c37, #744421);
  box-shadow: 0 5px 12px rgb(91 52 20 / 30%);
  font: inherit;
  cursor: pointer;
  transition:
    border-radius 650ms ease,
    transform 650ms ease;
}

.scroll-open::before,
.scroll-open::after {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 30px;
  border: 2px solid #d7ab63;
  border-radius: 50%;
  background: linear-gradient(90deg, #a86c37, #744421);
  content: "";
  transform: translateY(-50%);
}

.scroll-open::before {
  left: -8px;
}

.scroll-open::after {
  right: -8px;
}

.scroll-open:hover,
.scroll-open:focus-visible {
  color: #fff5dc;
  background-color: transparent;
  border-color: #9a642e;
  box-shadow: 0 5px 12px rgb(91 52 20 / 30%);
  transform: none;
}

.announcement-scroll.is-open .scroll-open {
  border-radius: 6px 6px 0 0;
  transform: scaleX(0.96);
}

.scroll-paper {
  width: min(94%, 350px);
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  border-inline: 2px solid #e6c67e;
  color: #493119;
  background: repeating-linear-gradient(0deg, #fffdf4 0 28px, #f3e9d1 29px 30px);
  box-shadow: 0 8px 18px rgb(91 52 20 / 22%);
  transition:
    max-height 850ms cubic-bezier(0.2, 0.8, 0.25, 1),
    padding 650ms ease;
}

.scroll-paper .snippet-presentation-message {
  max-height: 280px;
  overflow: auto;
}

.announcement-scroll.is-open .scroll-paper {
  max-height: 320px;
  padding-block: 20px;
}

.snippet-presentation-scroll {
  border-color: #d4a552;
  background: linear-gradient(145deg, #fff5d6, #f8e2aa);
}

.presentation-error {
  margin: 0;
  color: var(--red);
}

@media (prefers-reduced-motion: reduce) {
  .gift-lid,
  .gift-paper,
  .greeting-cover,
  .scroll-open,
  .scroll-paper {
    transition-duration: 0.01ms;
  }
}

.brand-logo,
.action-arrow,
.site-footer svg {
  transition:
    filter 150ms ease,
    transform 150ms ease;
}

.brand:hover .brand-logo,
a:hover .action-arrow,
button:hover svg,
a:hover svg {
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.85));
}

.brand:hover .brand-logo {
  transform: scale(1.08);
}

.mode-nav a:hover,
.mode-nav a:focus-visible,
.footer-lang .lang-select:hover,
.footer-lang .lang-select:focus-visible {
  color: var(--accent-hi);
  border-color: var(--line-bright);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.2);
  text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
}

select:hover,
input:not([type="file"]):hover,
textarea:hover,
summary:hover {
  border-color: var(--accent-hi);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.2);
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline-color: var(--accent-hi);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.28);
}

html[lang="th"] body,
html[lang="th"] body * {
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, ui-monospace, monospace;
}

@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 (max-width: 680px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    padding-inline: 10px;
  }

  .brand {
    gap: 6px;
    font-size: 9px;
    letter-spacing: 0.02em;
  }

  .brand-logo {
    width: 18px;
    height: 18px;
  }

  .theme-switcher {
    gap: 1px;
    padding: 3px;
  }

  .theme-choice {
    width: 24px;
    height: 24px;
    padding: 4px;
  }

  .theme-choice svg {
    width: 16px;
    height: 16px;
  }

  .mode-nav {
    gap: 2px;
    font-size: 10px;
  }

  .mode-nav a {
    padding-inline: 6px;
  }
}
