:root {
  color-scheme: light;
  --ink: #203332;
  --muted: #657b7b;
  --accent: #087cff;
  --accent-soft: #087cff18;
  --glass: rgba(255, 255, 255, .42);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; width: 100%; min-height: 100vh; min-height: 100dvh; color: var(--ink); font-family: inherit; font-size: 16px; -webkit-font-smoothing: antialiased; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 48px 24px; }
body[data-platform=youtube] { --accent: #df3e40; --accent-soft: #df3e4015; }
body[data-platform=tiktok] { --accent: #000; --accent-soft: #00000018; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; transition: background .18s, box-shadow .18s, transform .18s; }
button:disabled { cursor: wait; opacity: .6; }
button:not(:disabled):active, a.extract-button:active { transform: scale(.98); }
button:focus-visible, a:focus-visible { outline: 3px solid #087cff70; outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
img { display: block; object-fit: contain; }
.wallpaper { position: fixed; z-index: -2; inset: 0; background: #77afb0 url('media/wallpaper.jpg') center center / cover no-repeat; }
.wallpaper::after { content: ''; position: absolute; inset: 0; background: #f1ffff18; }
.glass-workspace { position: relative; width: min(100%, 900px); min-width: 0; border-radius: 46px; border: 1px solid #ffffffc7; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); box-shadow: 0 30px 90px #1d464932, 0 5px 18px #28464a14, inset 0 1px 1px #fff, inset 0 -1px 1px #ffffff9c; padding: 30px 32px 22px; }
.glass-workspace::before { content: ''; pointer-events: none; position: absolute; inset: 1px; border-radius: inherit; box-shadow: inset 1px 0 0 #ffffff88, inset -1px 0 0 #ffffff55; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand > div { min-width: 0; }
.brand > img { border-radius: 13px; box-shadow: 0 3px 8px #345c3c15; }
h1 { font-size: 21px; font-weight: 650; line-height: 1.25; margin: 0; }
.brand div > span { display: block; color: #52696b; font-size: 13px; margin-top: 3px; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.glass-icon { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; padding: 9px; border-radius: 50%; border: 1px solid #ffffffa8; background: #ffffff3d; box-shadow: inset 0 1px 0 #ffffffce, 0 2px 5px #365c5b08; backdrop-filter: blur(10px); }
.glass-icon img { width: 17px; height: 17px; }
.glass-icon:hover { background: #ffffff9e; box-shadow: inset 0 1px 0 #fff, 0 2px 10px #365c5b10; }
.platform-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; margin-top: 25px; padding: 5px; border-radius: 100px; border: 1px solid #ffffff86; background: #ffffff23; box-shadow: inset 0 1px 2px #446a6b14, 0 1px 0 #ffffff85; backdrop-filter: blur(16px); }
.tab-highlight { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 100px; background: #ffffff86; border: 1px solid #fff; box-shadow: 0 3px 10px #476b7018, inset 0 1px 0 #fff, inset 0 -1px 1px #ffffffa6; transition: transform .32s cubic-bezier(.2,.8,.2,1); }
body[data-platform=youtube] .tab-highlight { transform: translateX(100%); }
body[data-platform=tiktok] .tab-highlight { transform: translateX(200%); }
.platform-tabs button { min-height: 44px; border: 0; border-radius: 100px; padding: 0 10px; background: transparent; display: flex; justify-content: center; align-items: center; gap: 9px; position: relative; font-size: 15px; color: #395659; font-weight: 450; }
.platform-tabs button.active { color: #243b40; font-weight: 600; }
.platform-tabs button img { width: 18px; height: 18px; }
.platform-tabs button[data-platform=youtube] img { width: 20px; }
.platform-tabs button[data-platform=tiktok] img { border-radius: 4px; }
.workspace-content { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.12fr); gap: 35px; padding-top: 29px; align-items: center; }
.companion { min-width: 0; align-self: stretch; position: relative; display: flex; flex-direction: column; align-items: center; }
.speech-bubble { position: relative; min-width: 0; background: #ffffff76; border: 1px solid #ffffffde; border-radius: 19px; box-shadow: inset 0 1px 0 #fff, 0 4px 16px #234d4d08; padding: 12px 16px; width: min(100%, 274px); min-height: 84px; backdrop-filter: blur(12px); }
.speech-bubble::after { content: ''; position: absolute; width: 12px; height: 12px; bottom: -7px; left: 48%; border-right: 1px solid #ffffffce; border-bottom: 1px solid #ffffffce; background: #ffffff9e; transform: rotate(45deg); border-radius: 0 0 3px 0; }
.speaker { display: flex; gap: 6px; align-items: center; color: #4d7767; font-size: 12px; font-weight: 600; }
.speaker-dot { width: 5px; height: 5px; background: #459b77; border-radius: 50%; }
.speech-bubble p { margin: 6px 0 0; font-size: 16px; font-weight: 550; line-height: 1.45; color: #29483f; overflow-wrap: anywhere; }
.speech-bubble[data-state=working] .speaker-dot { background: var(--accent); animation: status-pulse 1s ease-in-out infinite; }
.speech-bubble[data-state=error] .speaker-dot { background: #b37456; }
.speech-bubble[data-state=success] { background: #eafff183; border-color: #fff; }
.character-stage { width: 260px; max-width: 100%; aspect-ratio: 26 / 33; position: relative; margin-top: 10px; }
.character-stage canvas { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }
.character-shadow { position: absolute; width: 97px; height: 13px; bottom: 12px; left: calc(50% - 48.5px); background: #315e6230; border-radius: 50%; filter: blur(6px); }
.extractor { align-self: start; min-width: 0; padding-top: 5px; }
.platform-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 22px; }
.platform-logo { display: grid; place-items: center; width: 41px; height: 41px; flex-shrink: 0; border: 1px solid #ffffffc7; background: #ffffff50; box-shadow: inset 0 1px 0 #fff; border-radius: 12px; }
.platform-logo img { width: 24px; height: 24px; }
.platform-heading h2 { font-size: 20px; margin: 0; font-weight: 620; }
.platform-heading div > span { font-size: 12px; color: #536d68; display: block; margin-top: 3px; }
.platform-ready { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #3f725c; margin-left: auto; white-space: nowrap; }
.platform-ready > span { width: 5px; height: 5px; background: #369e75; border-radius: 50%; }
.field-label { font-size: 14px; color: #365652; font-weight: 550; display: block; margin-bottom: 9px; }
.url-field { display: flex; align-items: center; gap: 8px; min-height: 49px; padding: 0 10px 0 13px; border: 1px solid #ffffffd4; border-radius: 14px; background: #ffffff72; box-shadow: inset 0 1px 2px #4263630b, 0 1px 0 #ffffff4f; }
.url-field:focus-within { box-shadow: 0 0 0 3px var(--accent-soft), inset 0 1px 0 #fff; border-color: #ffffff; background: #ffffff9c; }
.url-field > img { width: 16px; height: 16px; opacity: .75; }
.url-field input { width: 100%; min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #2d4648; font-size: 14px; padding: 12px 0; }
.url-field input::placeholder { color: #7d9495; }
.field-icon { display: grid; place-items: center; width: 27px; height: 30px; padding: 5px; flex-shrink: 0; border: 0; border-radius: 7px; background: transparent; }
.field-icon img { width: 15px; height: 15px; }
.field-icon:hover { background: #ffffff93; }
.source-tools { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 8px; }
.source-tools button { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 0; color: #4c6965; border: 0; background: transparent; }
.source-tools button:hover { color: var(--accent); }
.source-tools button img { width: 12px; height: 12px; }
#inputError { color: #a35e47; font-size: 12px; }
.extract-button { min-height: 48px; padding: 0 16px; background: var(--accent); color: #fff; border: 1px solid #ffffff54; border-radius: 17px; box-shadow: 0 4px 12px var(--accent-soft), inset 0 1px 0 #ffffff50, inset 0 -1px 0 #0000000a; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 15px; font-weight: 550; width: 100%; }
.extract-button:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 5px 20px var(--accent-soft), inset 0 1px 0 #ffffff75; }
.extract-button img { width: 17px; height: 17px; filter: brightness(0) invert(1); }
.extract-button > span { flex: 1; text-align: left; }
.extract-button > img:last-child { width: 15px; height: 15px; }
.extract-button.loading > img:first-child { animation: spin 1.3s linear infinite; }
.result-section { margin-top: 26px; padding-top: 17px; border-top: 1px solid #ffffff8c; min-height: 184px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; color: #4a6861; font-size: 12px; }
.result-heading > span:first-child { font-weight: 600; }
#resultStatus { font-size: 12px; color: #526f64; }
.result-section[data-state=success] #resultStatus { color: #307755; }
.result-section[data-state=error] #resultStatus { color: #9b6348; }
.result-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 138px; gap: 11px; }
.empty-symbol { width: 35px; height: 35px; display: grid; place-items: center; background: #ffffff3b; border: 1px solid #ffffff6b; border-radius: 11px; box-shadow: inset 0 1px 0 #ffffffab; }
.empty-symbol img { width: 18px; height: 18px; opacity: .6; }
.result-empty p { margin: 0; color: #526f69; font-size: 14px; }
.result-section[data-state=working] .empty-symbol img { animation: spin 2s linear infinite; }
.identity-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.identity-row > div { min-width: 0; }
.result-kind { font-size: 13px; color: #4d6b5e; }
#resultUid { display: block; font: 600 23px/1.4 'SFMono-Regular', Consolas, monospace; color: #24473c; margin-top: 4px; overflow-wrap: anywhere; }
.copy-uid { background: #ffffff78; }
.result-title { font-size: 14px; color: #405f51; line-height: 1.5; margin: 13px 0 0; overflow-wrap: anywhere; }
.canonical-row { display: flex; align-items: center; gap: 6px; margin-top: 12px; min-width: 0; }
.canonical-row > img { width: 12px; height: 12px; opacity: .6; flex-shrink: 0; }
.canonical-row a { font-size: 13px; color: #426257; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.canonical-row a:hover { color: var(--accent); }
.extra-identities { margin-top: 9px; }
.extra-identity { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #4b6c5d; padding: 5px 0; }
.extra-identity > span { white-space: nowrap; }
.extra-identity code { font: 12px/1.4 'SFMono-Regular', Consolas, monospace; min-width: 0; overflow-wrap: anywhere; flex: 1; }
.error-copy { display: flex; gap: 8px; margin-top: 19px; align-items: flex-start; }
.error-copy img { width: 17px; height: 17px; margin-top: 2px; opacity: .8; flex-shrink: 0; }
.error-copy p { color: #885740; font-size: 14px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.text-button { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #365b55; padding: 0; margin: 12px 0 0 25px; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.text-button img { width: 13px; height: 13px; }
.app-footer { margin-top: 18px; border-top: 1px solid #ffffff7d; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #4c6c60; font-size: 11px; }
.app-footer > span:first-child { display: flex; align-items: center; gap: 5px; }
.app-footer img { width: 11px; height: 11px; opacity: .65; }
.footer-dot { padding: 0 3px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 8px; background: #ffffffc9; border: 1px solid #ffffffed; border-radius: 15px; padding: 12px 18px; box-shadow: 0 8px 25px #25494b20; backdrop-filter: blur(20px); font-size: 12px; max-width: calc(100% - 32px); }
.toast img { width: 16px; height: 16px; }
dialog { width: 420px; max-width: calc(100% - 28px); padding: 25px; color: var(--ink); border: 1px solid #fff; border-radius: 32px; background: #ffffffbd; backdrop-filter: blur(30px) saturate(1.5); box-shadow: 0 25px 100px #1f444435, inset 0 1px 0 #fff; }
dialog::backdrop { background: #183d4530; backdrop-filter: blur(5px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.dialog-top > img { border-radius: 11px; }
dialog h2 { font-size: 20px; margin: 0; }
dialog p { font-size: 14px; line-height: 1.6; color: #486a5b; margin: 10px 0 20px; }
dialog ol { padding-left: 20px; margin: 0 0 24px; }
dialog li { padding: 9px 0 9px 4px; color: #5e7c73; font-size: 14px; }
dialog li b { font-weight: 550; color: #36534c; }
dialog li span { display: block; color: #557464; font-size: 13px; margin-top: 3px; }
.dialog-download { justify-content: center; }
dialog > small { display: block; color: #4d7261; font-size: 12px; line-height: 1.5; text-align: center; margin-top: 14px; }
.clipboard-helper { position: fixed; left: -9999px; top: 0; }
html.extension-host { width: 780px; height: 600px; overflow: hidden; border-radius: 48px; background: transparent; }
body.extension { width: 780px; height: 600px; min-height: 0; padding: 10px; overflow: hidden; border-radius: 48px; }
.extension .wallpaper { border-radius: 48px; overflow: hidden; }
.extension .glass-workspace { width: 100%; height: 580px; padding: 20px 22px 16px; border-radius: 40px; display: flex; flex-direction: column; }
.extension .web-only { display: none !important; }
.extension .brand h1 { font-size: 20px; }
.extension .brand > img { width: 40px; height: 40px; }
.extension .brand div > span { font-size: 13px; }
.extension .platform-tabs { margin-top: 13px; flex-shrink: 0; }
.extension .platform-tabs button { min-height: 36px; font-size: 14px; }
.extension .workspace-content { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.12fr); flex: 1; min-height: 0; gap: 28px; padding-top: 14px; align-items: stretch; }
.extension .companion { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 0; width: 100%; min-height: 0; }
.extension .character-stage { width: 238px; height: 302px; flex-shrink: 0; margin: 8px 0 0; }
.extension .character-shadow { width: 90px; height: 12px; left: calc(50% - 45px); bottom: 11px; filter: blur(6px); }
.extension .speech-bubble { width: 100%; height: 84px; min-height: 84px; max-height: 84px; flex-shrink: 0; overflow-y: auto; border-radius: 20px; padding: 10px 15px; }
.extension .speech-bubble::after { top: auto; bottom: -7px; left: 48%; border: 0; border-right: 1px solid #ffffffce; border-bottom: 1px solid #ffffffce; }
.extension .speech-bubble p { font-size: 15px; margin-top: 4px; }
.extension .speaker { font-size: 11px; }
.extension .extractor { width: 100%; height: 100%; min-height: 0; padding-top: 0; display: flex; flex-direction: column; }
.extension .platform-heading { display: flex; padding-bottom: 17px; flex-shrink: 0; }
.extension .platform-heading h2 { font-size: 19px; }
.extension .platform-logo { width: 37px; height: 37px; border-radius: 11px; }
.extension .platform-logo img { width: 22px; height: 22px; }
.extension .platform-heading div > span { font-size: 11px; margin-top: 1px; }
.extension .platform-ready { font-size: 10px; }
.extension .field-label { font-size: 14px; margin-bottom: 9px; }
.extension .url-field { min-height: 46px; border-radius: 14px; }
.extension .url-field input { font-size: 14px; padding-top: 11px; padding-bottom: 11px; }
.extension .source-tools { min-height: 33px; }
.extension .source-tools button { font-size: 12px; }
.extension .extract-button { min-height: 45px; font-size: 15px; border-radius: 16px; }
.extension .result-section { margin-top: 20px; min-height: 0; padding-top: 13px; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4c796138 transparent; }
.extension .result-heading { font-size: 11px; }
.extension #resultStatus { font-size: 11px; }
.extension .result-empty { min-height: 85px; gap: 8px; }
.extension .result-empty p { font-size: 13px; }
.extension .empty-symbol { width: 28px; height: 28px; border-radius: 9px; }
.extension .identity-row { margin-top: 8px; gap: 8px; }
.extension .result-kind { font-size: 12px; }
.extension #resultUid { font-size: 24px; margin-top: 2px; }
.extension .result-title { font-size: 12px; margin-top: 5px; }
.extension .canonical-row { margin-top: 8px; }
.extension .canonical-row a { font-size: 12px; }
.extension .extra-identities { margin-top: 2px; }
.extension .extra-identity { font-size: 11px; padding: 2px 0; }
.extension .extra-identity code { font-size: 11px; }
.extension .error-copy { margin-top: 9px; }
.extension .error-copy p { font-size: 13px; }
.extension .app-footer { margin-top: 10px; flex-shrink: 0; font-size: 10px; padding-top: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes status-pulse { 50% { opacity: .3; } }
@media (max-width: 650px) {
  body:not(.extension) { padding: 20px 15px; }
  .glass-workspace { padding: 25px 24px 20px; border-radius: 40px; }
  .workspace-content { display: flex; flex-direction: column; gap: 13px; padding-top: 19px; }
  .companion { width: 100%; flex-direction: row-reverse; align-items: center; justify-content: center; gap: 15px; }
  .character-stage { width: 124px; height: 160px; flex-shrink: 0; margin: 0; }
  .character-shadow { width: 48px; height: 7px; left: calc(50% - 24px); bottom: 7px; filter: blur(3px); }
  .speech-bubble { width: 220px; min-height: 85px; padding: 12px 14px; }
  .speech-bubble::after { bottom: auto; left: -7px; top: 45%; border: 0; border-left: 1px solid #fff; border-bottom: 1px solid #fff; }
  .speech-bubble p { font-size: 15px; }
  .extractor { width: 100%; padding: 0; }
  .platform-heading { padding-bottom: 18px; }
  .platform-heading h2 { font-size: 19px; }
  .platform-heading div > span { font-size: 11px; }
  .platform-ready { font-size: 10px; }
  .result-section { min-height: 142px; margin-top: 22px; }
  .result-empty { min-height: 115px; }
}
@media (max-width: 370px) {
  body:not(.extension) { padding: 15px 11px; }
  .glass-workspace { padding: 22px 19px 18px; border-radius: 36px; }
  h1 { font-size: 18px; }
  .brand { gap: 8px; }
  .brand > img { width: 37px; height: 37px; }
  .brand div > span { font-size: 12px; }
  .header-actions { gap: 4px; }
  .glass-icon { width: 32px; height: 32px; padding: 8px; }
  .platform-tabs { margin-top: 20px; }
  .platform-tabs button { font-size: 12px; gap: 5px; padding: 0 6px; min-height: 38px; }
  .platform-tabs button img { width: 15px; height: 15px; }
  .platform-tabs button[data-platform=youtube] img { width: 17px; }
  .companion { gap: 10px; }
  .character-stage { width: 100px; height: 139px; }
  .speech-bubble { padding: 11px; }
  .speech-bubble p { font-size: 14px; }
  .platform-ready { display: none; }
  .url-field { gap: 5px; padding-left: 10px; padding-right: 5px; }
  .url-field input { font-size: 13px; }
  .field-icon { width: 25px; }
  #resultUid { font-size: 20px; }
  .app-footer { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
