@font-face {
  font-family: Inter;
  src: url("/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: Inter;
  src: url("/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Phosphor;
  src: url("/phosphor.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: light;
  --canvas: #e1e1e3;
  --shell: #f3f3f4;
  --surface: #e9e9eb;
  --line: #d9d9de;
  --ink: #18181b;
  --muted: #595961;
  --violet: #6728cb;
  --violet-soft: #eee7fb;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; padding: clamp(18px, 3.7vw, 72px); color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
a { color: var(--violet); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
.icon { display: inline-block; font: normal 1em/1 Phosphor; }
.icon-link::before { content: "\e2e6"; }
.icon-copy::before { content: "\e1ca"; }
#copy-result.is-copied .icon-copy::before { content: "\e182"; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon-scissors::before { content: "\eae0"; }
.icon-trash::before { content: "\e4a6"; }
.icon-arrow-up-right::before { content: "\e092"; }

.site-shell { max-width: 1120px; min-height: calc(100svh - 2 * clamp(18px, 3.7vw, 72px)); margin: auto; display: flex; flex-direction: column; background: var(--shell); border-radius: 26px; }
.home-page .site-shell { display: grid; align-items: center; background: var(--shell) url("/panel-background.jpg") center / cover no-repeat; }
.site-header-inner, .workspace, .site-footer div { width: min(100%, 1000px); margin: auto; padding-inline: clamp(28px, 5vw, 64px); }
.site-header-inner { min-height: 85px; display: flex; align-items: center; justify-content: center; }
.wordmark { display: grid; place-items: center; min-height: 44px; }
.wordmark img { display: block; width: clamp(156px, 18vw, 200px); height: auto; }

.workspace { flex: 1; padding-block: clamp(30px, 5vw, 62px) 34px; }
.home-page .workspace { max-width: 760px; padding-block: 24px; }

.create-card { min-width: 0; padding: 22px; border-radius: 20px; background: var(--surface); }
.url-field { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 11px; border: 1px solid #d7cede; border-radius: 999px; background: #fff; }
.url-field:focus-within { border-color: #7455a4; box-shadow: 0 0 0 3px var(--violet-soft); }
.field-symbol { display: grid; place-items: center; flex: none; width: 31px; height: 31px; border-radius: 50%; background: var(--violet-soft); color: #584078; font-size: 18px; }
.url-field input { flex: 1; min-width: 0; min-height: 44px; padding: 9px 0; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 16px; }
.url-field input::placeholder { color: #686871; }
.url-field .button { flex: none; }
.form-bottom { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms ease; }
.form-bottom:not([inert]) { grid-template-rows: 1fr; }
.form-bottom fieldset { min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; }
.form-bottom .durations { margin: 17px auto 4px; opacity: 0; transform: translateY(-100%); transition: opacity 200ms ease, transform 240ms ease; }
.form-bottom:not([inert]) .durations { opacity: 1; transform: translateY(0); }
.durations { --duration-index: 0; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 273px; max-width: 100%; gap: 3px; padding: 4px; border-radius: 999px; background: #dedee1; }
.durations::before { content: ""; position: absolute; inset: 4px auto 4px 4px; width: calc((100% - 17px) / 4); border-radius: inherit; background: #fff; box-shadow: 0 1px 4px #20202c15; pointer-events: none; transform: translateX(calc(var(--duration-index) * (100% + 3px))); transition: transform 180ms ease; }
.durations:has(:where(label:nth-child(2) input:checked)) { --duration-index: 1; }
.durations:has(:where(label:nth-child(3) input:checked)) { --duration-index: 2; }
.durations:has(:where(label:nth-child(4) input:checked)) { --duration-index: 3; }
.durations label { position: relative; display: flex; align-items: stretch; cursor: pointer; }
.durations input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.durations span { display: grid; place-items: center; width: 100%; min-height: 37px; border-radius: 999px; color: #55555d; font-size: 12px; font-weight: 560; white-space: nowrap; }
.durations input:checked + span { color: var(--ink); }
.durations input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 1px; }

@media (hover: hover) {
  .durations:has(label:nth-child(1):hover) { --duration-index: 0; }
  .durations:has(label:nth-child(2):hover) { --duration-index: 1; }
  .durations:has(label:nth-child(3):hover) { --duration-index: 2; }
  .durations:has(label:nth-child(4):hover) { --duration-index: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .form-bottom, .form-bottom .durations, .durations::before { transition: none; }
}
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 10px; padding: 0 15px; border: 1px solid transparent; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 620; cursor: pointer; white-space: nowrap; }
.button .icon { font-size: 16px; }
.button.icon-button { width: 44px; padding: 0; }
.icon-button .icon { font-size: 20px; }
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { background: #36343e; }
.url-field .button.primary { background: #7455a4; }
.url-field .button.primary:enabled:hover { background: #63478f; }
.url-field .button.primary:disabled { background: var(--violet-soft); color: #736681; opacity: 1; cursor: default; }
.url-field .button.primary[aria-busy="true"] { cursor: wait; }
.button.secondary { background: #fff; color: var(--ink); border-color: #d3d0d9; }
.button.secondary:hover { background: #f4f1fa; }
.button:disabled { opacity: .55; cursor: wait; }
.result { display: flex; align-items: center; gap: 10px; margin-top: 17px; padding: 7px 7px 7px 18px; border: 1px solid #d7cede; border-radius: 29px; background: #ffffffeb; }
.result-actions { display: flex; flex: none; gap: 3px; }
.result-detail { flex: 1; min-width: 0; }
.result time { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.result a { color: #584078; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; text-decoration: none; }
.result a:hover { text-decoration: underline; }
.result .button.secondary, .result .button.quiet { background: var(--violet-soft); border-color: transparent; color: #584078; }
.result .button.secondary:hover, .result .button.quiet:hover { background: #e2d7f5; }
.status { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
.status.error { color: #a12135; }

.site-footer { color: var(--muted); font-size: 12px; text-align: center; }
.site-footer div { padding-block: 0 22px; }

dialog { width: min(calc(100% - 36px), 410px); padding: 22px; border: 1px solid #fff; border-radius: 20px; background: var(--shell); color: var(--ink); box-shadow: 0 18px 45px #12101824; }
dialog::backdrop { background: #18181c70; }
dialog h2 { margin: 0; font-size: 21px; font-weight: 620; letter-spacing: -.04em; }
dialog p { margin: 10px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.redirect-workspace { max-width: 660px; }
.redirect-card { padding: 28px; }
.redirect-card h1 { margin: 0 0 13px; font-size: clamp(30px, 5vw, 45px); font-weight: 560; letter-spacing: -.06em; }
.redirect-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.redirect-host { display: block; margin: 4px 0 0; overflow-wrap: anywhere; }
.redirect-card .button { margin-top: 22px; }

@media (max-width: 640px) {
  body { padding: 10px; }
  .site-shell { min-height: calc(100svh - 20px); border-radius: 20px; }
  .site-header-inner, .workspace, .site-footer div { padding-inline: 17px; }
  .site-header-inner { min-height: 70px; }
  .workspace { padding-block: 18px 26px; }
  .durations span { min-height: 42px; }
}
@media (max-width: 400px) {
  .url-field { gap: 6px; }
  .url-field .field-symbol { display: none; }
}
