/* WCode Web App - Modern, Polish Vanilla CSS */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Color Palette - Light Theme */
  --bg-page: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-input: #ffffff;
  --bg-pill: #f1f5f9;
  --bg-pill-active: #0284c7;
  --bg-elevated: #ffffff;
  --border-light: rgba(148, 163, 184, 0.22);
  --border-focus: #0284c7;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-inverse: #ffffff;

  --brand-primary: #0284c7;
  --brand-hover: #0369a1;
  --brand-light: #e0f2fe;
  --brand-accent: #69b7cf;
  --brand-border-subtle: rgba(2, 132, 199, 0.28);
  --brand-border-subtle-hover: rgba(2, 132, 199, 0.42);

  --success-color: #10b981;
  --success-light: #d1fae5;
  --error-color: #ef4444;
  --error-light: #fee2e2;
  --warning-color: #f59e0b;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(148, 163, 184, 0.16);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-card: rgba(17, 24, 39, 0.82);
  --bg-card-hover: rgba(30, 41, 59, 0.95);
  --bg-input: #111827;
  --bg-pill: #1f293d;
  --bg-pill-active: #38bdf8;
  --bg-elevated: #1e293b;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #0b0f19;

  --brand-primary: #38bdf8;
  --brand-hover: #7dd3fc;
  --brand-light: rgba(56, 189, 248, 0.15);
  --brand-accent: #69b7cf;
  --brand-border-subtle: rgba(56, 189, 248, 0.3);
  --brand-border-subtle-hover: rgba(56, 189, 248, 0.45);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  margin-left: calc(100vw - 100%);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100dvh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  margin: 0 auto;
  background-image: 
    radial-gradient(at 15% 15%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
    radial-gradient(at 85% 85%, rgba(105, 183, 207, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
}

#main-wrapper {
  display: flex;
  flex-direction: column;
  flex: auto;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100%;
  height: auto;
  max-width: 1440px;
  width: 100%;
  box-sizing: border-box;
}

#content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  overflow: visible;
  width: 100%;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

/* Traditional Header matching /about */
#header-wrapper {
  display: flow-root;
  flex: none;
  width: 100%;
  max-width: 1240px;
  height: 142px;
  top: 0;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  position: relative;
  box-sizing: border-box;
}

#header-wrapper::after {
  content: '';
  display: table;
  clear: both;
}

#header-title {
  overflow: hidden;
  padding-top: 2px;
  margin-bottom: -4px;
}

#header-slogan {
  width: 50%;
  float: left;
  margin-top: 49px;
  text-align: right;
  font-size: 1.125em;
  color: #555;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

#header-slogan-text {
  padding-right: 6px;
  color: #a9a9a9 !important;
}

#header-slogan-href {
  text-decoration: none;
}

#header-logo {
  width: 50%;
  float: right;
  margin-top: 32px;
  box-sizing: border-box;
}

#header-logo a {
  text-decoration: none;
  border: none;
}

#header-logo-image {
  height: 50px;
  width: 144px;
  background-size: contain;
  display: inline-block;
}

#header-logo-image svg {
  height: 50px;
  width: 144px;
  display: block;
}

#header-bar {
  margin-top: -10px;
  text-align: center;
  position: relative;
}

#menu-button {
  margin: 13px 0 0 54px;
  display: inline-block;
  float: left;
  background-size: contain;
  width: 36px;
  height: 36px;
  cursor: pointer;
  text-decoration: none;
}

#menu-button svg {
  width: 36px;
  height: 36px;
  display: block;
}

#menu-button path {
  transition: fill ease-out 0.3s;
}

#menu-button:hover path {
  fill: #56b4d1;
}

#header-right-list {
  text-align: center;
  margin: auto;
  padding: 0;
  overflow: visible;
  display: inline-block;
  float: right;
}

#header_buttons_right {
  margin: 0;
  float: right;
  text-align: right;
}

#header_button {
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* Header Profile & Account Settings */
#profile-selector {
  display: inline-block;
  position: relative;
  vertical-align: top;
}

#profile-button {
  appearance: none;
  background: transparent;
  border: 0;
  box-sizing: content-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 30px;
  margin: 12px 5px;
  padding: 0;
  color: #888;
  cursor: pointer;
  position: relative;
  transition: all ease-out 0.3s;
}

#profile-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: fill ease-out 0.3s;
}

#profile-button:hover,
#profile-button:hover svg {
  color: #56b4d1;
  fill: #56b4d1;
}

#profile-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  min-width: 210px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 100;
  animation: fadeIn 0.18s ease-out;
}

html.dark-mode #profile-menu,
[data-theme="dark"] #profile-menu {
  background: #222244;
  border-color: #33335a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

#profile-menu[hidden] {
  display: none;
}

.profile-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 8px;
}

.profile-menu-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-menu-avatar svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.profile-menu-identity {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.profile-menu-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.profile-menu-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 0;
}

html.dark-mode .profile-menu-divider,
[data-theme="dark"] .profile-menu-divider {
  background: #33335a;
}

.profile-menu-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 4px 8px 2px;
  text-align: left;
}

.profile-theme-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

#theme-selector {
  appearance: none;
  background: transparent;
  border: 0;
  box-sizing: content-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 30px;
  margin: 12px 5px;
  padding: 0;
  color: #888;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: all ease-out 0.3s;
}

.header-action-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: fill ease-out 0.3s;
}

.header-action-icon:hover,
.header-action-icon:hover svg {
  color: #56b4d1;
  fill: #56b4d1;
}

#theme-selector {
  display: inline-block;
  position: relative;
  vertical-align: top;
}

#darkmode-button {
  appearance: none;
  background: transparent;
  border: 0;
  box-sizing: content-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 30px;
  margin: 12px 5px;
  padding: 0;
  cursor: pointer;
}

.theme-current-icon {
  display: none;
  height: 22px;
  width: 22px;
}

.theme-current-icon svg {
  width: 22px;
  height: 22px;
  fill: #888;
  transition: fill ease-out 0.3s;
}

html[data-theme-resolved='light'] .theme-current-icon[data-theme-icon='light'],
html[data-theme-resolved='dark'] .theme-current-icon[data-theme-icon='dark'],
html:not([data-theme-resolved]) .theme-current-icon[data-theme-icon='light'] {
  display: inline-block;
}

#darkmode-button:hover .theme-current-icon svg {
  fill: #56b4d1;
}

#theme-menu {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  box-sizing: border-box;
  min-width: 128px;
  padding: 5px;
  position: absolute;
  right: 5px;
  top: 48px;
  z-index: 100;
}

#theme-menu[hidden] {
  display: none;
}

.theme-option {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 4px;
  box-sizing: border-box;
  column-gap: 10px;
  color: #666;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 0.875em;
  grid-template-columns: 18px minmax(0, 1fr);
  padding: 7px 16px 7px 11px;
  text-align: left;
  width: 100%;
}

.theme-option:hover,
.theme-option:focus-visible {
  background: #f2f2f2;
  color: #333;
  outline: none;
}

.theme-option-icon,
.theme-option-icon svg {
  height: 18px;
  width: 18px;
  fill: #999;
}

.theme-option-active {
  color: #56b4d1;
  font-weight: 600;
}

.theme-option-active .theme-option-icon svg {
  fill: #56b4d1;
}

#header-wrapper-divider {
  border-bottom: 1px solid #ddd;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.grow {
  transition: transform 0.3s;
}

.grow:hover {
  transform: scale(1.1);
}

.btn-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--brand-primary);
  color: var(--text-inverse);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

@media (max-width: 1120px) {
  #menu-button {
    margin: 11px 0 0 12px !important;
  }
}

@media (max-width: 540px) {
  #header-wrapper {
    padding: 0 8px;
    height: 130px;
  }
  #header-slogan {
    margin-top: 42px;
  }
  #header-logo {
    margin-top: 26px;
  }
  #header-bar {
    margin-top: 2px;
  }
}

/* Dark mode overrides for traditional header */
html.dark-mode #header-slogan-text,
[data-theme="dark"] #header-slogan-text {
  color: #777 !important;
}

html.dark-mode #header-wrapper-divider,
[data-theme="dark"] #header-wrapper-divider {
  border-bottom-color: #333;
}

html.dark-mode #menu-button path,
[data-theme="dark"] #menu-button path {
  fill: #666;
}

html.dark-mode #menu-button:hover path,
[data-theme="dark"] #menu-button:hover path {
  fill: #56b4d1;
}

html.dark-mode .header-action-icon,
[data-theme="dark"] .header-action-icon {
  color: #888;
}

html.dark-mode .header-action-icon:hover,
[data-theme="dark"] .header-action-icon:hover {
  color: #56b4d1;
}

html.dark-mode #theme-menu,
[data-theme="dark"] #theme-menu {
  background: #222244;
  border-color: #33335a;
}

html.dark-mode .theme-option,
[data-theme="dark"] .theme-option {
  color: #aaa;
}

html.dark-mode .theme-option:hover,
html.dark-mode .theme-option:focus-visible,
[data-theme="dark"] .theme-option:hover,
[data-theme="dark"] .theme-option:focus-visible {
  background: #2a2a4a;
  color: #ddd;
}

html.dark-mode .theme-option-active,
[data-theme="dark"] .theme-option-active {
  color: #69b7cf;
}

html.dark-mode .theme-option-active .theme-option-icon svg,
[data-theme="dark"] .theme-option-active .theme-option-icon svg {
  fill: #69b7cf;
}


.item_block_container {
  width: 160px;
  display: inline-block;
  margin: 5px;
  vertical-align: middle;
  transition: transform 0.75s, border-color 0.3s ease-out, background-color 0.3s ease-out, color 0.3s ease-out;
  font-family: inherit;
  text-decoration: none;
}

.item_block_image {
  width: 160px;
  height: 110px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  display: block;
}

.item_block_image_visible {
  object-fit: cover;
  opacity: 0.85 !important;
  filter: alpha(opacity=85);
  transition: opacity 2s !important;
}

.item_block_image_contain {
  object-fit: contain;
  background: #f8f8f8;
}

.item_block_text {
  width: 160px;
  height: 32px;
  margin-top: -1px;
  overflow: hidden;
  border-style: solid;
  border-width: 1px;
  border-top-color: #fff;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  color: #69b7cf;
  background-color: #f6f6f6;
  border-color: #f4f4f4;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  line-height: 32px;
  transition: all ease-out 0.3s;
  box-sizing: border-box;
}

.item_block_text div {
  margin-left: 28px;
  font-size: 1em;
  vertical-align: middle;
  cursor: pointer;
  color: #69b7cf;
  transition: all ease-out 0.3s;
  display: inline-block;
}

.item_block_container:hover .item_block_image {
  cursor: pointer;
  opacity: 1 !important;
  filter: alpha(opacity=100);
}

.item_block_container:hover .item_block_text {
  cursor: pointer;
  border-color: #69b7cf;
  background-color: #69b7cf;
}

.item_block_container:hover .item_block_text div {
  color: #fff;
}

.grow {
  transition: transform 0.5s;
}

.grow:hover {
  transform: scale(1.05);
}

html.dark-mode .item_block_image_contain,
[data-theme='dark'] .item_block_image_contain {
  background: #1e293b;
}

html.dark-mode .item_block_text,
[data-theme='dark'] .item_block_text {
  background-color: #224;
  border-color: #2a2a4a;
  border-top-color: #1a1a2e;
  color: #69b7cf;
}

html.dark-mode .item_block_text div,
[data-theme='dark'] .item_block_text div {
  color: #69b7cf;
}

/* Main Workspace Container */
.main-content {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 14px 16px 48px;
}

/* Mode Switcher Pill (Encode vs Decode) */
.mode-switch-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.mode-switch {
  display: inline-flex;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.mode-tab svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.mode-tab.active {
  background: var(--brand-primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* Category / Data Types (stacked, no scroll bar) */
.types-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.types-bar-break {
  flex-basis: 100%;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
}

.type-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.type-pill:hover {
  background: var(--bg-pill);
  color: var(--text-main);
  border-color: var(--text-dim);
}

.type-pill.active {
  background: var(--brand-light);
  border-color: var(--brand-border-subtle);
  color: var(--brand-primary);
  font-weight: 600;
}

.type-pill.active:hover {
  background: var(--brand-light);
  border-color: var(--brand-border-subtle-hover);
  color: var(--brand-primary);
}

.type-pill svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Main Studio Card */
.studio-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  position: relative;
  transition: border-color var(--transition-smooth);
}

.studio-card:focus-within {
  border-color: rgba(2, 132, 199, 0.4);
}

/* Studio Card Label Outside */
.studio-label-outside {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.studio-label-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Input Section */
.input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Flat text section header for input */
.input-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
  background: transparent;
  border: none;
  padding: 0;
}

.output-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-primary);
  background: var(--brand-light);
  border: 1px solid var(--brand-border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.input-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-btn {
  background: var(--bg-pill);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.sub-btn.icon-only {
  padding: 6px 8px;
}

.sub-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--text-dim);
}

.sub-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Input Bar Row with Actions Beside (Clear on top, Paste on bottom edge) */
.input-bar-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.input-bar-row .input-viewport {
  flex: 1;
  min-width: 0;
}

.input-actions-flank {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 104px;
  flex-shrink: 0;
}

.clear-bar-btn,
.paste-bar-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  padding: 0;
}

.clear-bar-btn:hover,
.clear-bar-btn:focus-visible,
.paste-bar-btn:hover,
.paste-bar-btn:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  border-color: transparent;
}

html.dark-mode .clear-bar-btn:hover,
html.dark-mode .clear-bar-btn:focus-visible,
html.dark-mode .paste-bar-btn:hover,
html.dark-mode .paste-bar-btn:focus-visible,
[data-theme="dark"] .clear-bar-btn:hover,
[data-theme="dark"] .clear-bar-btn:focus-visible,
[data-theme="dark"] .paste-bar-btn:hover,
[data-theme="dark"] .paste-bar-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: transparent;
}

.clear-bar-btn svg,
.paste-bar-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Input Viewports */
.input-viewport {
  position: relative;
}

.text-input-field {
  width: 100%;
  height: 104px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-main);
  font-size: 1.05rem;
  resize: none;
  outline: none;
  transition: all var(--transition-fast);
  line-height: 1.5;
  box-sizing: border-box;
}

.text-input-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.wcode-input-enclosure {
  display: flex;
  align-items: flex-start;
  height: 104px;
  box-sizing: border-box;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: all var(--transition-fast);
}

.wcode-input-enclosure:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.wcode-slash {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-primary);
  user-select: none;
  padding: 2px 4px 0;
  line-height: 1.2;
}

.wcode-text-field {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1.05rem;
  padding: 2px 4px;
  color: var(--text-main);
  letter-spacing: 0.02em;
  resize: none;
  line-height: 1.5;
  box-sizing: border-box;
}

/* Live Word Suggestions */
.suggestions-container {
  margin-top: 10px;
  min-height: 38px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}

.suggestions-container:empty {
  display: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.suggestion-chip {
  background: var(--bg-pill);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.suggestion-chip:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.suggestion-chip mark {
  background: transparent;
  color: var(--brand-primary);
  font-weight: 700;
}

.suggestion-chip:hover mark {
  color: var(--text-inverse);
}

.suggestions-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Secondary Inputs: Phone prefix, etc. */
.phone-input-group {
  display: flex;
  gap: 8px;
}

.country-code-field {
  width: 100px;
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
}

.country-code-field:focus {
  border-color: var(--border-focus);
}

/* Controls Bar (Options & Execute) */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 12px;
}

/* Card Options inside studio card */
.studio-card-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.controls-bar-outside {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 8px;
  padding: 0 4px;
}

.option-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-pill);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  transition: var(--transition-fast);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
  background-color: var(--text-inverse);
}

.action-btn-main {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border: none;
  padding: 10px 28px;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
  transition: all var(--transition-fast);
}

.action-btn-main:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.action-btn-main:active {
  transform: translateY(0);
}

.action-btn-main svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Location Mode Dedicated App Alternate (Wolo Code) */
.location-alternate-container {
  margin-top: 20px;
  margin-bottom: 8px;
  animation: fadeInDown var(--transition-smooth) ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.location-alternate-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  transition: all var(--transition-smooth);
}

.location-alternate-card:hover {
  border-color: var(--brand-border-subtle);
  box-shadow: var(--shadow-md);
}

.location-alternate-tile-wrap {
  flex-shrink: 0;
}

/* Wolo Code Tile inside Web App */
.location-app-tile.item_block_container {
  width: 160px;
  display: block;
  margin: 0;
  text-decoration: none;
  font-family: 'Roboto condensed', Abel, var(--font-sans);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.location-app-tile.item_block_container:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.location-app-tile .item_block_image {
  width: 160px;
  height: 110px;
  display: block;
  background-color: #f8f8f8;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.location-app-tile:hover .item_block_image {
  opacity: 1;
}

.location-app-tile .item_block_text {
  width: 160px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin: 0;
  box-sizing: border-box;
  background-color: #f6f6f6;
  border: 1px solid #e8e8e8;
  border-top: none;
  color: #69b7cf;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.location-app-tile .item_block_text .external {
  display: inline-flex;
  align-items: center;
  color: inherit;
}

.location-app-tile:hover .item_block_text {
  background-color: #69b7cf;
  border-color: #69b7cf;
  color: #ffffff;
}

.location-app-tile:hover .item_block_text div,
.location-app-tile:hover .item_block_text .external {
  color: #ffffff;
}

/* Dark Mode Tile Styles */
[data-theme="dark"] .location-app-tile .item_block_image {
  background-color: #1a2234;
}

[data-theme="dark"] .location-app-tile .item_block_text {
  background-color: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  color: #38bdf8;
}

[data-theme="dark"] .location-app-tile:hover .item_block_text {
  background-color: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

/* Alternate Body and Description */
.location-alternate-body {
  flex: 1;
  min-width: 0;
}

.location-alternate-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.location-alternate-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--brand-light);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border-subtle);
}

.location-alternate-sublabel {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

.location-alternate-title {
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.location-alternate-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.location-alternate-desc strong {
  color: var(--text-main);
}

.location-alternate-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.location-alternate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.location-alternate-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand-border-subtle);
  color: var(--brand-hover);
  transform: translateX(2px);
}

.location-alternate-btn svg {
  transition: transform var(--transition-fast);
}

.location-alternate-btn:hover svg {
  transform: translateX(2px);
}

@media (max-width: 640px) {
  .location-alternate-card {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    padding: 16px;
  }

  .location-alternate-header {
    justify-content: center;
  }

  .location-alternate-actions {
    justify-content: center;
  }
}

/* Output Showcase Section */
.output-section {
  margin-top: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.output-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-primary);
  background: var(--brand-light);
  border: 1px solid var(--brand-border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.output-hero-box {
  background: var(--bg-pill);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-align: center;
  position: relative;
}

.wcode-hero-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-main);
  padding: 8px 0;
}

.hero-slash {
  color: var(--brand-primary);
  font-size: 1.8rem;
  user-select: none;
}

.wcode-word-pill {
  background: var(--bg-card);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  color: var(--brand-primary);
  display: inline-block;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wcode-word-pill:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
  transform: scale(1.05);
}

.output-stats {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Decoded Content Specific Display */
.decoded-content-box {
  padding: 16px;
  text-align: left;
}

.decoded-text-view {
  font-size: 1.15rem;
  word-break: break-all;
  color: var(--text-main);
  background: var(--bg-card);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.decoded-meta-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-light);
  color: var(--brand-primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.action-link-btn:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
  text-decoration: none;
}

.action-link-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Output Toolbar (Copy, Share, Speak, Save, Swap) */
.output-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.tool-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted); /* Gray accent instead of black */
  padding: 8px 12px;
  height: 38px;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: all var(--transition-fast);
}

.tool-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
}

.tool-btn .tool-btn-label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  transition: max-width 0.22s ease, opacity 0.2s ease, margin-left 0.22s ease;
  margin-left: 0;
}

.tool-btn:hover,
.tool-btn:focus-visible {
  background: var(--bg-pill);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

.tool-btn:hover .tool-btn-label,
.tool-btn:focus-visible .tool-btn-label {
  max-width: 80px;
  opacity: 1;
  margin-left: 6px;
  pointer-events: auto;
}

/* History / Saved Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  z-index: 70;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.drawer-backdrop.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-dim);
}

.saved-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-fast);
}

.saved-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

.saved-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.saved-type-tag {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand-primary);
}

.saved-wcode {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand-primary);
}

.saved-data {
  font-size: 0.85rem;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text-main);
  color: var(--text-inverse);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) 2.75s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(0.95); }
}

/* Modal Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: flex;
  align-items: safe center;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.94);
  transition: transform var(--transition-smooth);
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  line-height: 1.6;
  font-size: 0.95rem;
}

.modal-body p {
  margin-bottom: 12px;
}

/* Wolo-parity Info Dialog Card */
.info-dialog-card {
  position: relative;
  max-width: 430px;
  width: 100%;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 18px 22px 26px;
  font-family: 'Abel', var(--font-sans);
  text-align: left;
  box-sizing: border-box;
  background-color: var(--bg-card);
  color: var(--text-muted);
}

.info-dialog-card::-webkit-scrollbar {
  display: none;
}

/* Info Modal Version Indicator (Wolo Parity) */
#info_version_indicator {
  position: absolute;
  bottom: 8px;
  right: 18px;
  -webkit-appearance: none;
  appearance: none;
  align-items: flex-end;
  background: transparent;
  border: none;
  color: #bbbbbb;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-family: 'Abel', sans-serif;
  font-size: 0.78em;
  line-height: 1;
  margin: 0;
  max-width: calc(100% - 132px);
  overflow: visible;
  padding: 0;
  text-align: right;
  z-index: 2;
}

html.dark-mode #info_version_indicator,
[data-theme="dark"] #info_version_indicator {
  color: #777777;
}

#info_version_indicator .info_version_text {
  display: grid;
  justify-items: end;
}

#info_version_indicator .info_version_width,
#info_version_indicator .info_version_label {
  grid-area: 1 / 1;
}

#info_version_indicator .info_version_width {
  visibility: hidden;
}

#info_version_indicator .info_version_under {
  display: none;
  font-size: 0.86em;
  font-weight: normal;
  justify-items: end;
  line-height: 1.15;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
}

#info_version_indicator:hover .info_version_under,
#info_version_indicator:focus-visible .info_version_under,
#info_version_indicator[aria-expanded='true'] .info_version_under {
  display: grid;
  pointer-events: auto;
}

#info_version_indicator .info_version_stamp_utc,
#info_version_indicator .info_version_stamp_elapsed,
#info_version_indicator .info_version_local {
  grid-area: 1 / 1;
  visibility: hidden;
  white-space: nowrap;
}

#info_version_indicator:hover .info_version_width,
#info_version_indicator:focus-visible .info_version_width,
#info_version_indicator[aria-expanded='true'] .info_version_width {
  visibility: visible;
}

#info_version_indicator:hover .info_version_label,
#info_version_indicator:focus-visible .info_version_label,
#info_version_indicator[aria-expanded='true'] .info_version_label {
  visibility: hidden;
}

#info_version_indicator:hover .info_version_stamp_elapsed,
#info_version_indicator:focus-visible .info_version_stamp_elapsed {
  visibility: visible;
}

#info_version_indicator[aria-expanded='true'] .info_version_stamp_elapsed,
#info_version_indicator[aria-expanded='true']:hover .info_version_stamp_elapsed,
#info_version_indicator[aria-expanded='true']:focus-visible .info_version_stamp_elapsed {
  visibility: hidden;
}

#info_version_indicator[aria-expanded='true'] .info_version_local {
  visibility: visible;
}

#info_version_indicator .info_version_under:hover .info_version_stamp_elapsed,
#info_version_indicator .info_version_under:hover .info_version_local,
#info_version_indicator[aria-expanded='true'] .info_version_under:hover .info_version_local {
  visibility: hidden;
}

#info_version_indicator .info_version_under:hover .info_version_stamp_utc {
  visibility: visible;
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition-fast);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
}

html.dark-mode .icon-btn:hover,
html.dark-mode .icon-btn:focus-visible,
[data-theme="dark"] .icon-btn:hover,
[data-theme="dark"] .icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-close-wrapper {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}

.info-dialog-header {
  text-align: center;
  margin-top: 2px;
  margin-bottom: 8px;
}

.info-logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
}

.info-logo-link {
  display: inline-block;
  text-decoration: none;
}

.info-logo-link img {
  height: 32px;
  width: auto;
  display: block;
}

.info-slogan {
  font-size: 1.18rem;
  color: #69b7cf;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* Intro Mode (First Visit/Login) */
.info-intro-text {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-main);
  text-align: justify;
  margin: 16px 4px 20px;
}

.info-intro-action {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.button_highlight {
  background-color: #69b7cf;
  border: 0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(105, 183, 207, 0.45);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.button_highlight:hover {
  transform: scale(1.08);
  background-color: #56a3bb;
}

.button_highlight svg {
  width: 24px;
  height: 24px;
}

/* Full Info View (Wolo Details & Moved Footer) */
.info-format-badge {
  text-align: center;
  margin: 6px 0 2px;
  font-family: monospace;
  font-size: 0.92rem;
}

.info-format-badge span {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  padding: 2px 6px;
  margin: 0 2px;
  color: #69b7cf;
  font-weight: 600;
}

html.dark-mode .info-format-badge span {
  background: rgba(255, 255, 255, 0.08);
}

.info-format-badge span:first-child,
.info-format-badge span:last-child {
  background: transparent;
  color: #999;
}

.info-format-example {
  text-align: center;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: #888;
}

.info-summary-block {
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.info-feature-list {
  margin: 4px 0 0 16px;
  padding: 0;
}

.info-feature-list li {
  margin-bottom: 3px;
}

.info-steps-block {
  margin: 8px 0 6px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.info-steps-block h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.info-steps-block ul {
  margin: 0 0 0 16px;
  padding: 0;
}

.info-steps-block li {
  margin-bottom: 3px;
}

.message_dialog_control_container {
  display: flex;
  justify-content: center;
  margin: 10px 0 6px;
}

.message_dialog_control {
  font-size: smaller;
}

#info_full_close_button {
  width: 44px;
  height: 44px;
}

#info_full_close_button svg {
  width: 22px;
  height: 22px;
}

.info-about-link {
  text-align: center;
  margin-top: 6px;
  font-size: 0.9rem;
}

/* Links & Credits Modal Card */
.links-dialog-card {
  max-width: 430px;
}

.info-links-table {
  width: 100%;
  margin: 8px 0 6px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.info-links-table td {
  padding: 2px 4px;
}

.info-links-table td:first-child {
  text-align: right;
  width: 38%;
  color: var(--text-muted);
  font-weight: 500;
}

.info-links-table td:last-child {
  text-align: left;
}

.info-social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0;
  gap: 8px;
}

#download-unified-url {
  text-align: center;
  font-size: 0.88rem;
  margin: 6px 0 4px;
}

#download-unified-url span {
  color: var(--text-muted);
  margin-right: 4px;
}

#download-android-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0 8px;
}

#download-android-bottom a {
  display: inline-block;
  line-height: 0;
  transition: transform var(--transition-fast);
}

#download-android-bottom a:hover {
  transform: scale(1.05);
}

.info-credits-block {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: center;
  margin: 8px 0;
}

.info-credits-block .center {
  margin-top: 2px;
}

.info-disclaimer-note {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 6px;
  margin-top: 6px;
}

.info-footer-attribution {
  font-size: 0.78rem;
  text-align: center;
  margin-top: 6px;
  color: var(--text-muted);
}

.info-agency {
  margin-top: 2px;
  font-size: 0.85rem;
}

/* Bottom Utility Actions (Footer Removed From Root) */
#footer-wrapper {
  margin-top: auto;
  text-align: center;
  font-size: 0.875em;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  width: 100%;
  padding-bottom: 14px;
}

#footer-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 4px 0;
}

#footer-actions-left {
  display: inline-flex;
  align-items: center;
}

.footer-root-copyright {
  font-size: 0.82rem;
  color: var(--text-muted);
  user-select: none;
  text-align: center;
}

.footer-root-copyright a {
  text-decoration: none;
}

.footer-author-link {
  cursor: pointer;
  margin-left: 5px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-author-link:hover,
.footer-author-link:focus-visible {
  color: #69b7cf;
  outline: none;
  text-decoration: underline;
}

#footer-actions-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#footer-actions-bar .header-action-icon {
  margin: 6px 0;
}

@media (max-width: 540px) {
  #footer-actions-bar {
    padding: 0 8px;
  }
}


#social-links {
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.social {
  display: inline-block;
  margin: 8px 12px;
}

.social .image {
  width: 28px;
  height: 28px;
  display: block;
}

.social .image svg {
  width: 100%;
  height: 100%;
}

.social .image svg path {
  fill: #bbb;
  transition: all ease-out 0.3s;
}

.social:hover .image svg path {
  fill: #69b7cf;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 12px 0 10px;
  flex-wrap: wrap;
}

.content-link-gray {
  text-decoration: none;
  color: #bbb !important;
  font-size: 0.88rem;
  transition: all ease-out 0.3s;
}

.content-link-gray:hover {
  text-decoration: none;
  color: #69b7cf !important;
}

.footer-content {
  color: #bbb;
  font-size: 0.85rem;
}

.footer-note {
  max-width: 680px;
  margin: 14px auto;
  line-height: 1.5;
  padding: 0 16px;
  color: #888;
}

.footer-note-label strong {
  color: #69b7cf;
  font-weight: 700;
}

.footer-note-body {
  color: #888;
}

#footer-rights {
  margin: 10px 0 6px;
}

/* Dark mode footer overrides */
html.dark-mode #footer-wrapper-divider {
  border-bottom-color: #333;
}

html.dark-mode .footer-content,
html.dark-mode .footer-note-body {
  color: #666;
}

html.dark-mode .content-link-gray {
  color: #666 !important;
}

html.dark-mode .content-link-gray:hover {
  color: #69b7cf !important;
}

html.dark-mode .social .image svg path {
  fill: #555;
}

html.dark-mode .social:hover .image svg path {
  fill: #69b7cf;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .header-container {
    padding: 0;
  }
  .main-content {
    padding: 16px 12px 20px;
  }
  .studio-card {
    padding: 16px;
  }
  .mode-tab {
    padding: 6px 16px;
    font-size: 0.88rem;
  }
  .wcode-hero-display {
    font-size: 1.15rem;
  }
}

/* Match Wolo decode utility surfaces and align the right-hand controls. */
#profile-button,
#footer-actions-bar .header-action-icon {
  appearance: none;
  align-items: center;
  background: rgb(255 255 255 / 50%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 0;
  border-radius: 50%;
  box-shadow: rgb(0 0 0 / 6%) 0 1px 4px -1px;
  box-sizing: border-box;
  color: #888;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 39px;
  height: 39px;
  justify-content: center;
  padding: 5px;
  position: relative;
  width: 39px;
}
#profile-button { margin: 12px 0; }
#profile-button svg,
#footer-actions-bar .header-action-icon svg {
  display: block;
  height: 29px;
  width: 29px;
}
html.dark-mode #profile-button,
html.dark-mode #footer-actions-bar .header-action-icon {
  background: rgb(34 34 68 / 70%);
}