@font-face {
  font-family: "Manrope";
  src: url("../paper-20261012/assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --box: #F8FAFC;
  --ink: #111827;
  --muted: #4B5563;
  --subtle: #6B7280;
  --line: #E5E7EB;
  --box-line: #CBD5E1;
  --primary: #111827;
  --primary-hover: #1F2937;
  --ok: #059669;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.sheet {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 14px;
}

.wrap {
  width: 100%;
  max-width: 404px;
  margin: 0 auto;
  position: relative;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
  position: relative;
  direction: ltr;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 2px 10px 0;
  border-radius: 8px;
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.lang-picker {
  position: relative;
  direction: ltr;
}

.lang-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 6px;
  color: var(--subtle);
  font: 600 12px/1 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.14s ease-out, background-color 0.14s ease-out;
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  color: var(--ink);
  background: rgba(17, 24, 39, 0.05);
}

.lang-globe {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.lang-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: min(456px, calc(100vw - 24px));
  max-height: min(78vh, 468px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 22, 40, 0.08);
  border-radius: 16px;
  padding: 8px 6px 8px 8px;
  box-shadow: 0 20px 50px rgba(20, 30, 60, 0.14);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 24, 39, 0.22) transparent;
}

.lang-popover::-webkit-scrollbar {
  width: 6px;
}

.lang-popover::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 8px;
}

.lang-popover::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.20);
  border-radius: 999px;
}

.lang-popover::-webkit-scrollbar-thumb:hover {
  background: rgba(17, 24, 39, 0.36);
}

.lang-popover[hidden] {
  display: none;
}

.lang-tile {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 10px;
  min-width: 0;
  height: 35px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 13px/1.2 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.12s ease-out;
}

.lang-tile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-tile:hover {
  background: #F0F2F7;
}

.lang-tile b {
  width: 22px;
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--subtle);
  text-transform: uppercase;
}

.lang-tile[aria-checked="true"] {
  background: #F0F2F7;
  font-weight: 700;
}

.lang-tile[aria-checked="true"] b {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 640px) {
  .lang-popover {
    width: min(332px, calc(100vw - 24px));
    max-height: min(72vh, 396px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 24, 39, 0.24) #F0F2F7;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px 18px;
  box-shadow: 0 10px 30px -10px rgba(17, 24, 39, 0.07);
}

.card-head h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.24;
  font-weight: 760;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.about {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.42;
  color: var(--muted);
}

.prompt-section {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.prompt-box {
  background: var(--box);
  border: 1px solid var(--box-line);
  border-radius: 13px;
  padding: 12px 13px;
  display: grid;
  gap: 9px;
}

.prompt-main {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.42;
  font-weight: 650;
  color: var(--ink);
}

.prompt-tech {
  padding-top: 8px;
  border-top: 1px dashed #CBD5E1;
  display: grid;
  gap: 5px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}

.prompt-tech span {
  font-weight: 650;
  color: var(--subtle);
}

.prompt-tech code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  color: var(--ink);
  word-break: break-all;
}

button {
  font: inherit;
  cursor: pointer;
}

.primary {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #FFFFFF;
  min-height: 46px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 14px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.14s ease-out, transform 0.1s ease-out;
}

.primary:hover {
  background: var(--primary-hover);
}

.primary:active {
  transform: scale(0.99);
}

.primary.is-copied {
  background: var(--ok);
}

.primary svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.manual[hidden] {
  display: none;
}

.manual {
  width: 100%;
  min-height: 82px;
  padding: 8px 10px;
  border: 1px solid var(--box-line);
  border-radius: 9px;
  background: var(--box);
  color: var(--ink);
  font: 11.5px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.sub-bar {
  margin-top: 12px;
  text-align: center;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.footer-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
