:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #17191f;
  --panel-2: #20232b;
  --line: #30343e;
  --text: #f6f3ed;
  --muted: #aaa7a0;
  --dim: #747984;
  --gold: #e7b45f;
  --green: #54c48e;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 320px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 96px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.compact-page {
  padding: 34px 0 48px;
}

.page-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  white-space: nowrap;
}

.page-share-bar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 25, 31, 0.88);
  padding: 8px 10px 8px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.page-share-bar strong {
  color: var(--text);
  font-size: 15px;
  white-space: nowrap;
}

.page-share-bar a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #87d9ae;
  font-weight: 750;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-copy-button {
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid #f3c370;
  border-radius: 7px;
  background: var(--gold);
  color: #17130b;
  padding: 0 13px;
  cursor: pointer;
  font-weight: 850;
}

.page-copy-button:hover {
  filter: brightness(1.06);
}

.page-copy-button:focus-visible,
.page-share-bar a:focus-visible {
  outline: 3px solid rgba(84, 196, 142, 0.45);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.guide {
  display: grid;
  gap: 18px;
}

.step-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 25, 31, 0.88);
  box-shadow: var(--shadow);
  padding: 24px;
}

.step-kicker {
  width: max-content;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.step-card h3 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.25;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.65;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(84, 196, 142, 0.12);
}

.check-list strong {
  color: var(--text);
}

.inline-tip {
  margin: 18px 0 0;
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  background: rgba(231, 180, 95, 0.08);
  color: var(--muted);
  line-height: 1.55;
}

.image-button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 0;
  cursor: zoom-in;
}

.image-button img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.portrait-shot {
  max-width: 760px;
  justify-self: center;
}

.step-media {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.short-link-tool {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 16px;
}

.short-link-tool label {
  color: var(--text);
  font-weight: 800;
}

.short-link-tool textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111318;
  color: var(--text);
  padding: 12px;
  line-height: 1.5;
  outline: none;
}

.short-link-tool textarea:focus {
  border-color: var(--gold);
}

.short-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.primary-tool {
  border: 1px solid #f3c370;
  background: var(--gold);
  color: #17130b;
}

.primary-tool:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-tool {
  border: 1px solid var(--line);
  background: #151820;
  color: var(--text);
}

.short-link-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.short-link-message.is-error {
  color: #ff9b92;
}

.short-link-output {
  display: none;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111318;
  padding: 14px;
}

.short-link-output.is-ready {
  display: grid;
}

.short-link-label {
  color: var(--dim);
  font-size: 13px;
  font-weight: 800;
}

.short-link-result {
  display: flex;
  align-items: center;
  gap: 10px;
}

.short-link-result a {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #87d9ae;
  font-weight: 800;
  line-height: 1.5;
}

.copy-short-link {
  flex: 0 0 auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(8, 9, 12, 0.88);
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(960px, 94vw);
  max-height: 84vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, 680px);
  }

  .compact-page {
    padding-top: 24px;
  }

  .step-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portrait-shot {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: calc(100% - 20px);
  }

  .compact-page {
    padding: 20px 0 34px;
  }

  .page-title {
    margin-bottom: 16px;
    font-size: 32px;
  }

  .page-share-bar {
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px;
  }

  .page-share-bar strong {
    width: 100%;
  }

  .page-share-bar a {
    flex: 1 1 220px;
  }

  .step-card {
    padding: 16px;
  }

  .step-card h3 {
    font-size: 20px;
  }

  .check-list {
    gap: 10px;
  }

  .check-list li,
  .inline-tip {
    font-size: 14px;
  }

  .short-link-tool {
    padding: 14px;
  }

  .tool-btn {
    width: 100%;
  }

  .short-link-result {
    align-items: stretch;
    flex-direction: column;
  }
}
