:root {
  color-scheme: light;
  --desk: #e5e6fa;
  --ink: #26205d;
  --muted: #5e5b7b;
  --blue: #4338ac;
  --paper: #fffefa;
  --rule: #c7c5df;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--desk);
  background-image: radial-gradient(#c0c1e1 .8px, transparent .9px);
  background-size: 17px 17px;
}
button, textarea, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; color: inherit; background: transparent; padding: 0; }
button:focus-visible, a:focus-visible, textarea:focus-visible {
  outline: 3px solid #5851cc;
  outline-offset: 4px;
}
.sitebar {
  max-width: 1160px; margin: 0 auto; min-height: 90px; padding: 0 36px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: inline-flex; gap: 11px; align-items: center; font-size: 24px; font-family: "DM Sans", Arial, sans-serif;
  font-weight: 760; letter-spacing: -1.5px; line-height: 1;
}
.brand-icon { width: 27px; height: 25px; position: relative; display: inline-block; }
.brand-icon::before, .brand-icon::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--ink); }
.brand-icon::before { left: 1px; top: 1px; transform: rotate(-12deg); background: var(--desk); }
.brand-icon::after { right: 0; bottom: 0; background: var(--ink); clip-path: polygon(0 0,100% 0,100% 68%,69% 100%,0 100%); }
.help { min-height: 44px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.site-actions { display: flex; gap: clamp(10px, 2vw, 24px); }
.question { display: inline-grid; border: 1.5px solid; border-radius: 50%; width: 17px; height: 17px; place-items: center; font: 700 12px Arial, sans-serif; }
main { width: min(710px, calc(100% - 80px)); margin: clamp(54px, 8vh, 98px) auto 68px; }
.stack { position: relative; isolation: isolate; }
.stack::before, .stack::after {
  content: ""; position: absolute; inset: 4px 4px 0; border: 1.5px solid var(--ink); z-index: -1;
}
.stack::before { transform: rotate(-2.3deg) translate(-5px, 6px); background: #b7b5ed; }
.stack::after { transform: rotate(1.1deg) translate(2px, 6px); background: #f5f4ff; }
.paper {
  padding: 51px 54px 38px;
  border: 1.5px solid var(--ink); background: var(--paper);
  position: relative;
}
.turn { position: absolute; top: -1.5px; right: -1.5px; width: 30px; height: 30px; }
.turn::before, .turn::after { position: absolute; inset: 0; content: ""; }
.turn::before { background: var(--desk); clip-path: polygon(0 0,100% 0,100% 100%); }
.turn::after {
  background: linear-gradient(45deg,#ccc9f1 46%,var(--ink) 48%,var(--ink) 50%,transparent 52%);
  clip-path: polygon(0 0,100% 100%,0 100%); border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
}
.clip { position: absolute; top: -29px; right: 71px; width: 48px; height: 96px; pointer-events: none; transform: rotate(16deg); filter: drop-shadow(2px 2px 0 #31286327); }
.clip path { fill: none; stroke: var(--blue); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
h1 { margin: 0; font-size: clamp(48px, 6.4vw, 82px); letter-spacing: -.045em; font-weight: 850; line-height: 1.2; }
.sub { display: block; margin: 13px 0 36px; font-size: 17px; line-height: 1.6; font-weight: 400; letter-spacing: normal; color: var(--muted); }
label { font-size: 14px; font-weight: 700; }
textarea {
  display: block; width: 100%; margin-top: 9px; min-height: 106px; padding: 0; border: 0; border-radius: 0;
  resize: none; overflow-y: auto; color: var(--ink); font-size: 18px; line-height: 34px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, var(--rule) 33px, var(--rule) 34px);
}
textarea::placeholder { color: #74718b; opacity: 1; }
.status { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--blue); }
.status:empty { display: none; }
.status.error { color: #9a2e47; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; }
.clipboard { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 15px; }
.clipboard svg, .sample-button svg { width: 17px; height: 17px; }
.primary, .download {
  border: 1px solid var(--ink); background: var(--blue); color: white; border-radius: 5px;
  min-height: 48px; padding: 9px 31px; font-weight: 650; font-size: 16px;
  box-shadow: 3px 3px 0 var(--ink); transition: background .15s ease;
}
.primary:hover, .download:hover { background: #34298f; }
.help:hover, .clipboard:hover, .under button:hover { text-decoration: underline; text-underline-offset: .3em; }
.under { margin: 30px 5px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.under button { min-height: 44px; display: inline-flex; gap: 7px; align-items: center; font-size: 14px; font-weight: 600; }
.under small { margin-left: 3px; color: var(--muted); font-size: 14px; font-weight: 450; }
.chevron { border: solid currentColor; border-width: 0 1.5px 1.5px 0; width: 7px; height: 7px; transform: rotate(45deg); margin: -3px 1px 0 2px; }
dialog {
  max-width: min(430px,calc(100% - 38px)); width: 430px; max-height: calc(100dvh - 48px);
  background: var(--paper); color: var(--ink); border: 1.5px solid; padding: 27px;
  border-radius: 4px; box-shadow: 6px 6px 0 var(--ink);
}
dialog::backdrop { background: #23204b63; }
dialog h2 { margin: 5px 0 14px; font-size: 25px; }
dialog p { margin: 0 0 15px; font-size: 16px; line-height: 1.7; }
dialog header { display:flex; align-items: flex-start; justify-content: space-between; }
.close { flex: 0 0 44px; min-height: 44px; font-size: 24px; line-height: 1; }
#feedback-count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
#feedback-status { margin-bottom: 0; overflow-wrap: anywhere; }
.platform-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px 10px; list-style: none; padding: 0; margin: 3px 0 0; }
.platform-list li { padding: 4px 0; font-size: 15px; }
.sample { display:block; width:100%; height:auto; border: 1px solid var(--ink); }
.download { display:inline-flex; justify-content:center; align-items:center; text-decoration:none; margin: 16px 0 3px; }
@media(max-width: 650px) {
  .sitebar { min-height: 72px; padding: 0 23px; }
  .brand { font-size: 21px; }
  main { width: calc(100% - 48px); margin: 48px auto 44px; }
  .paper { padding: 44px 25px 29px; }
  .clip { width: 31px; height: 62px; top: -20px; right: 37px; }
  .turn { width: 23px; height: 23px; }
  h1 { font-size: clamp(40px, 10.9vw, 65px); }
  .sub { font-size: 16px; margin: 13px 0 28px; }
  textarea { font-size:16px; min-height: 106px; }
  .under { flex-wrap:wrap; margin: 24px 3px 0; gap: 0 10px; }
  .under small { display: none; }
  .primary { padding: 8px 20px; }
}
@media(max-width: 370px) {
  .sitebar { padding: 0 16px; }
  .site-actions .question { display: none; }
}
@media(prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none !important; } }
[hidden] { display: none !important; }
.field-heading { display: flex; position: relative; align-items: center; }
.clear { position: absolute; right: 0; min-height: 44px; min-width: 44px; font-size: 14px; color: var(--muted); }
.clear:hover, .text-action:hover { text-decoration: underline; }
.primary:disabled, .result-link:disabled { opacity: .65; cursor: progress; }
#platform-status:empty { display: none; }
.text-action { min-height: 44px; font-weight: 650; color: var(--blue); }
.result-paper {
  margin: 26px 0 0; padding: 32px clamp(20px, 4vw, 42px);
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 #b7b5ed;
  scroll-margin-top: 18px; overflow-wrap: anywhere;
}
.result-paper:focus { outline: none; }
.result-paper:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.result-paper h2 { font-size: 16px; margin: 0 0 14px; color: var(--muted); }
.result-title { margin: 0 0 12px; font-size: clamp(23px, 3vw, 30px); line-height: 1.45; }
.result-author { font-size: 15px; color: var(--muted); margin: -4px 0 16px; }
.result-preview { display: block; width: 100%; max-height: 460px; object-fit: contain; background: #eeedf5; }
video.result-preview { aspect-ratio: 16 / 9; background: #211f30; }
.result-actions, .result-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.result-actions { margin: 12px 0 0; }
.result-link {
  display: inline-flex; align-items: center; justify-content: center; padding: 3px 0;
  min-height: 44px; color: var(--blue); font-size: 15px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px;
}
.result-link:hover { color: var(--ink); }
.result-gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--rule); margin-top: 20px; padding-top: 8px; }
.result-gallery-heading h4 { font-size: 17px; margin: 0; }
.result-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(205px, 100%), 1fr)); gap: 16px; margin-top: 8px; }
.result-item { margin: 0; min-width: 0; }
.result-item .result-preview { height: auto; aspect-ratio: 4 / 3; }
.result-status { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.result-status:empty { display: none; }
.share-guide { margin: 24px 5px 0; border-top: 1px solid var(--rule); padding-top: 17px; }
.share-guide h2 { margin: 0 0 6px; font-size: 16px; }
.share-guide p { margin: 4px 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
@media(max-width: 650px) {
  .result-paper { margin-top: 16px; padding: 22px 20px; }
  .result-gallery { gap: 10px; }
}
