:root {
  --orange: #ff8a00;
  --orange-dark: #d96f00;
  --ink: #191a1d;
  --muted: #62666f;
  --line: #d9dce1;
  --surface: #f5f6f7;
  --white: #fff;
  --danger: #b42318;
  --green: #159455;
  --shadow: 0 16px 40px rgba(20, 22, 26, .07);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--white); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(255, 138, 0, .28); outline-offset: 2px; }
[hidden] { display: none !important; }

.site-header { min-height: 118px; padding: 22px clamp(24px, 4vw, 58px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand-lockup { display: flex; align-items: center; gap: clamp(22px, 3vw, 46px); min-width: 0; }
.brand-lockup h1 { margin: 0; max-width: 720px; font-size: clamp(23px, 2.4vw, 37px); line-height: 1.08; letter-spacing: -.035em; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 194px; height: 72px; object-fit: contain; object-position: left center; }

.page-shell { width: min(1360px, calc(100% - 64px)); margin: 0 auto; padding: 50px 0 34px; }
.intro p { margin: 0; color: var(--muted); font-size: 19px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(360px, .95fr); gap: 38px; margin-top: 40px; align-items: start; }
.secret-panel { min-width: 0; }
.field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 9px; }
.field-heading label, .settings-panel h2 { font-size: 17px; font-weight: 700; }
.field-heading span { font-size: 13px; color: #858992; }
textarea { width: 100%; min-height: 340px; resize: vertical; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); line-height: 1.55; transition: border-color .2s, box-shadow .2s; }
textarea::placeholder, input::placeholder { color: #999da5; }
textarea:focus, input:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 138, 0, .1); outline: 0; }
.field-note { margin: 12px 0 0; max-width: 680px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.settings-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.settings-panel h2 { margin: 0 0 19px; }
.select-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.field-control { display: grid; gap: 8px; margin-bottom: 17px; color: #44474e; font-size: 14px; font-weight: 600; }
.field-label { color: #44474e; font-weight: 600; }
.field-label small { color: #92969e; font-size: 1em; font-weight: 400; }
.field-control input, .field-control select, .copy-row input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cdd0d6; border-radius: 9px; background: var(--white); color: var(--ink); }
.switch-row { position: relative; display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 12px 0; cursor: pointer; }
.switch-row span { display: grid; gap: 4px; padding-right: 60px; }
.switch-row strong { font-size: 14px; }
.switch-row small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: absolute; right: 0; width: 44px; height: 25px; border-radius: 999px; background: #c9cdd3; transition: .2s; }
.switch-row i::after { content: ""; position: absolute; width: 19px; height: 19px; top: 3px; left: 3px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .2s; }
.switch-row input:checked + i { background: var(--orange); }
.switch-row input:checked + i::after { transform: translateX(19px); }
.switch-row input:focus-visible + i { outline: 3px solid rgba(255, 138, 0, .25); outline-offset: 3px; }

.primary-button, .secondary-button, .outline-button, .danger-button { min-height: 48px; border-radius: 9px; font-weight: 700; transition: transform .16s, background .16s, border-color .16s; }
.primary-button { width: 100%; margin-top: 15px; border: 1px solid var(--orange); background: var(--orange); color: #1f160b; box-shadow: 0 8px 20px rgba(255, 138, 0, .2); }
.primary-button:hover { background: #ff9d26; transform: translateY(-1px); }
.primary-button:disabled { opacity: .62; cursor: wait; transform: none; }
.secondary-button { border: 1px solid #aeb2ba; background: var(--white); color: var(--ink); padding: 0 19px; }
.secondary-button:hover { border-color: var(--ink); }
.outline-button { width: 100%; border: 1px solid var(--orange); color: var(--orange-dark); background: transparent; }
.danger-button { margin-top: 18px; border: 1px solid #f0b4ae; color: var(--danger); background: #fff7f6; padding: 0 18px; }

.alert { margin: 14px 0 0; padding: 11px 13px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.alert-error { border: 1px solid #f3b8b2; background: #fff6f5; color: #8f241b; }
.success-panel { width: min(510px, 100%); margin: 26px 0 0 auto; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: rise .32s ease both; }
.success-title { display: flex; gap: 14px; align-items: flex-start; }
.success-title > span { width: 38px; height: 38px; flex: 0 0 auto; border: 2px solid var(--green); border-radius: 50%; display: grid; place-items: center; color: var(--green); font-size: 20px; }
.success-title h2 { margin: 0; font-size: 19px; }
.success-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.copy-row { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 17px; }
.copy-row input { height: 62px; padding-inline: 18px; color: #41454d; font-size: 15px; font-weight: 600; }
.link-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-meta { display: grid; grid-template-columns: 1.5fr 1fr; margin: 18px 0; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-meta div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.result-meta dt { color: var(--muted); font-size: 12px; }
.result-meta dd { margin: 5px 0 0; font-weight: 600; font-size: 14px; }

.trust-section { margin-top: 72px; }
.trust-section > p { margin: 0 0 28px; font-weight: 700; }
.trust-points { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-points article { padding-right: 36px; }
.trust-points article + article { padding-left: 36px; border-left: 1px solid var(--line); }
.trust-points h2 { margin: 0; font-size: 16px; }
.trust-points p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

footer { min-height: 74px; padding: 0 clamp(24px, 4vw, 58px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
footer button, footer a { border: 0; background: none; color: inherit; text-decoration: none; }
footer button:hover, footer a:hover { color: var(--ink); }
.feedback strong { color: #454950; }
.feedback a { text-decoration: underline; text-underline-offset: 2px; }
.footer-actions { display: flex; align-items: center; gap: 11px; }
.footer-help { width: 25px; height: 25px; padding: 0; border: 1.5px solid #737780; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }

.audit-page { background: #fafafa; }
.audit-shell { width: min(1320px, calc(100% - 64px)); margin: 0 auto; padding: 44px 0 64px; }
.audit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.audit-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.025em; }
.audit-heading p { margin: 7px 0 0; color: var(--muted); }
.audit-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.audit-stats div { padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 8px 24px rgba(20,22,26,.04); }
.audit-stats span { display: block; color: var(--muted); font-size: 13px; }
.audit-stats strong { display: block; margin-top: 7px; font-size: 28px; }
.audit-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.audit-table { width: 100%; border-collapse: collapse; text-align: left; }
.audit-table th { padding: 13px 18px; background: var(--surface); color: #5b5f67; font-size: 12px; text-transform: uppercase; letter-spacing: .045em; }
.audit-table td { padding: 15px 18px; border-top: 1px solid #e7e9ec; color: #3d4148; font-size: 13px; }
.audit-table code { font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; color: #30343a; }
.audit-table th:first-child, .audit-table td:first-child { width: 58px; text-align: center; }
.audit-table th:last-child, .audit-table td:last-child { width: 56px; text-align: center; }
.audit-delete-cell form { margin: 0; }
.audit-delete { width: 30px; height: 30px; padding: 0; border: 1px solid #e1b5b5; border-radius: 50%; background: #fff8f8; color: #a53b3b; font-size: 21px; line-height: 1; cursor: pointer; }
.audit-delete:hover { border-color: #c85d5d; background: #fff0f0; color: #7e2020; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.event-tag { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.event-created { background: #fff1df; color: #a55500; }
.event-opened { background: #eaf7f0; color: #147547; }
.empty-row { padding: 52px !important; text-align: center; color: var(--muted) !important; }
.audit-note { margin: 15px 3px 0; color: var(--muted); font-size: 12px; }
.login-card { width: min(440px, 100%); margin: 60px auto; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.login-card h2 { margin: 0; }
.login-card > p { color: var(--muted); line-height: 1.55; }
.login-card form { margin-top: 22px; }

dialog { width: min(540px, calc(100% - 32px)); padding: 34px; border: 0; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,.22); color: var(--ink); }
dialog::backdrop { background: rgba(18, 20, 23, .52); }
dialog h2 { margin: 0 0 18px; }
dialog ol { padding-left: 21px; color: #474b53; line-height: 1.65; }
dialog p { color: var(--muted); font-size: 14px; }
.dialog-close { position: absolute; top: 13px; right: 15px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 27px; color: #696d75; }

.share-page { display: flex; min-height: 100vh; flex-direction: column; background: #fafafa; }
.share-header { background: var(--white); }
.share-home-title { max-width: 720px; color: #a2a6ad; font-size: clamp(23px, 2.4vw, 37px); font-weight: 700; line-height: 1.08; letter-spacing: -.035em; text-decoration: none; }
.share-home-title:hover { color: #7c8189; }
.share-shell { width: min(680px, calc(100% - 40px)); margin: auto; padding: 64px 0; }
.reveal-card { padding: clamp(28px, 6vw, 52px); background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.lock-mark { width: 50px; height: 50px; margin-bottom: 25px; display: grid; place-items: center; border-radius: 50%; background: #fff3e4; color: var(--orange-dark); font-size: 28px; font-weight: 800; }
.reveal-card h1 { margin: 0; font-size: clamp(29px, 5vw, 40px); line-height: 1.12; letter-spacing: -.035em; }
.reveal-card > p { color: var(--muted); line-height: 1.65; }
.share-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 26px 0 8px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-meta div { min-width: 0; padding-right: 22px; }
.share-meta div + div { padding-left: 26px; border-left: 1px solid var(--line); }
.share-meta dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.share-meta dd { margin: 5px 0 3px; font-size: 20px; font-weight: 750; }
.share-meta small { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; }
.reveal-card .field-control { margin-top: 26px; }
.secret-result { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.secret-result-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.secret-result h2 { margin: 0; font-size: 18px; }
.secret-result pre { min-height: 150px; max-height: 420px; overflow: auto; margin: 14px 0 0; padding: 18px; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 15px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.secret-result > p { font-size: 13px; color: var(--muted); }
.share-note { margin: 20px auto 0; max-width: 560px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.55; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  .site-header { min-height: 96px; padding-inline: 24px; }
  .brand img { width: 150px; height: 60px; }
  .page-shell { width: min(100% - 40px, 720px); padding-top: 38px; }
  .workspace { grid-template-columns: 1fr; gap: 26px; }
  textarea { min-height: 260px; }
  .success-panel { margin-left: 0; width: 100%; }
  .trust-section { margin-top: 52px; }
  footer { flex-wrap: wrap; gap: 14px 24px; padding-block: 18px; }
  .audit-shell { width: min(100% - 40px, 720px); }
  .audit-table-wrap { overflow-x: auto; }
  .audit-table { min-width: 850px; }
}

@media (max-width: 600px) {
  .site-header { min-height: 84px; padding: 14px 18px; }
  .brand-lockup { gap: 15px; }
  .brand-lockup h1 { font-size: 17px; letter-spacing: -.02em; }
  .share-home-title { font-size: 17px; letter-spacing: -.02em; }
  .brand img { width: 127px; height: 52px; }
  .page-shell { width: calc(100% - 28px); padding-top: 31px; }
  .intro h1 { font-size: 34px; }
  .intro p { font-size: 16px; line-height: 1.5; }
  .workspace { margin-top: 30px; }
  .settings-panel { padding: 18px; }
  .select-grid { grid-template-columns: 1fr; gap: 0; }
  .link-actions { grid-template-columns: 1fr 1fr; }
  .result-meta { grid-template-columns: 1fr; gap: 15px; }
  .result-meta div + div { border-left: 0; padding-left: 0; }
  .trust-points { grid-template-columns: 1fr; gap: 22px; }
  .trust-points article { padding: 0; }
  .trust-points article + article { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  footer { padding-inline: 18px; }
  .feedback { order: 3; width: 100%; }
  .audit-shell { width: calc(100% - 28px); padding-top: 28px; }
  .audit-heading h2 { font-size: 25px; }
  .audit-stats { grid-template-columns: 1fr; }
  .audit-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .audit-table, .audit-table tbody, .audit-table tr, .audit-table td { display: block; width: 100%; }
  .audit-table { min-width: 0; }
  .audit-table thead { display: none; }
  .audit-table tr { margin-bottom: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 6px 18px rgba(20,22,26,.04); }
  .audit-table td { display: grid; grid-template-columns: 98px 1fr; gap: 10px; padding: 8px 0; border: 0; overflow-wrap: anywhere; }
  .audit-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
  .audit-table .empty-row { display: block; padding: 34px 16px !important; }
  .audit-table .empty-row::before { content: none; }
  .share-shell { width: calc(100% - 28px); padding: 34px 0; }
  .reveal-card { padding: 25px 20px; }
  .share-meta { grid-template-columns: 1fr; gap: 17px; }
  .share-meta div { padding-right: 0; }
  .share-meta div + div { padding: 17px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
