:root {
  --bg: #f8f5ef;
  --panel: rgba(255, 255, 255, 0.92);
  --surface: #ffffff;
  --surface-soft: #f6fbf9;
  --text: #222222;
  --muted: #5f5f5f;
  --brand: #00695c;
  --brand-strong: #004d43;
  --border: rgba(34, 34, 34, 0.13);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 12px;
  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-3: 0 14px 34px rgba(0, 0, 0, 0.13);
  --focus-ring: 0 0 0 4px rgba(0, 105, 92, 0.16);
  --container-width: 980px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -6%, rgba(0, 105, 92, 0.15), rgba(0, 105, 92, 0) 42%),
    radial-gradient(circle at 94% 106%, rgba(244, 180, 0, 0.16), rgba(244, 180, 0, 0) 40%),
    linear-gradient(160deg, #f7f4ee 0%, #eef7f4 52%, #fffaf2 100%);
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

button,
input,
textarea,
select,
summary {
  font-family: inherit;
}

a,
button {
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.install-hello-bar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(135deg, rgba(0, 105, 92, 0.98), rgba(0, 77, 67, 0.96));
  color: #f4fffb;
}

.update-hello-bar {
  position: sticky;
  top: 0;
  z-index: 69;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, rgba(225, 122, 0, 0.96), rgba(198, 93, 0, 0.95));
  color: #fff7ef;
}

.cookie-consent-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(20, 83, 45, 0.94));
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.2);
  color: #f4f9ff;
}

.install-hello-bar p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
}

.update-hello-bar p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
}

.cookie-consent-bar p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
}

.install-hello-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  flex-wrap: wrap;
}

.update-hello-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-consent-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  flex-wrap: wrap;
}

.install-primary-button,
.install-ghost-button {
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.install-primary-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

#cookie-accept-button,
#install-from-bar-button,
#cookie-reject-button,
#install-hello-dismiss-button {
  font-size: 0.86rem;
  padding: 8px 10px;
}

.install-primary-button:hover,
.install-primary-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.install-primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.install-ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
  color: #f6fffc;
}

.install-ghost-button:hover,
.install-ghost-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.background-shape {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
}

.shape-a {
  width: 360px;
  height: 360px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(0, 105, 92, 0.22), rgba(0, 105, 92, 0));
}

.shape-b {
  width: 460px;
  height: 460px;
  right: -140px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(244, 180, 0, 0.2), rgba(244, 180, 0, 0));
}

.hero {
  max-width: var(--container-width);
  margin: 16px auto 18px;
  padding: 30px 24px 18px;
  animation: fade-slide 420ms ease-out;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.86), rgba(247, 252, 250, 0.88));
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(10px);
}

.hero-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-action-link {
  border: 1px solid rgba(0, 105, 92, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(0, 105, 92, 0.08);
  color: var(--brand-strong);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  padding: 9px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-action-link:hover,
.hero-action-link:focus-visible {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.14);
  box-shadow: 0 6px 16px rgba(0, 105, 92, 0.2);
}

.panel-toggle-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 55;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 105, 92, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.98);
  color: var(--brand-strong);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-2);
}

.panel-toggle-button:hover,
.panel-toggle-button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--shadow-3);
}

.panel-toggle-button[aria-expanded="false"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.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;
}

.eyebrow {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(0, 77, 67, 0.9);
  font-weight: 600;
}

h1 {
  margin: 10px 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(1.8rem, 2.4vw, 2.7rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.home-link {
  color: inherit;
  text-decoration: none;
}

.home-link:hover,
.home-link:focus-visible {
  text-decoration: underline;
}

.search-bar {
  position: relative;
  margin-top: 12px;
  /* max-width: 480px; */
}

.search-bar-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  border: 1px solid rgba(0, 105, 92, 0.2);
  border-radius: var(--radius-md);
  background: var(--surface);
  font: inherit;
  font-size: 0.94rem;
  padding: 12px 44px 12px 40px;
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.search-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.search-input:focus {
  border-color: var(--brand);
  background: #fff;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.search-clear:hover,
.search-clear:focus-visible {
  background: rgba(0, 105, 92, 0.12);
  color: var(--brand-strong);
}

.search-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.search-no-results-button {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--brand-strong);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 14px;
  margin-top: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-no-results-button:hover,
.search-no-results-button:focus-visible {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.08);
  box-shadow: var(--shadow-1);
}

.subtitle,
.gallery-description {
  margin: 0;
  /* max-width: 760px; */
  color: var(--muted);
  margin-bottom: 1rem;
}

.gallery-description {
  margin-top: 4px;
}

.phase-radios {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.phase-select-wrap {
  display: none;
  margin-top: 12px;
}

.search-phase-notice {
  margin-top: 12px;
  border: 1px solid rgba(0, 105, 92, 0.28);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(0, 105, 92, 0.1), rgba(0, 105, 92, 0.05));
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.search-phase-notice p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--brand-strong);
}

.search-phase-notice-button {
  border: 1px solid rgba(0, 105, 92, 0.26);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--brand-strong);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-phase-notice-button:hover,
.search-phase-notice-button:focus-visible {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.08);
  box-shadow: var(--shadow-1);
}

.phase-select-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.phase-select {
  width: 100%;
  border: 1px solid rgba(0, 105, 92, 0.2);
  border-radius: var(--radius-md);
  background: var(--surface);
  font: inherit;
  font-weight: 700;
  padding: 11px 12px;
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.phase-option {
  position: relative;
}

.phase-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.phase-option label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0, 105, 92, 0.18);
  border-radius: var(--radius-pill);
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.2;
  overflow: hidden;
  isolation: isolate;
}

.phase-option label:hover {
  border-color: rgba(0, 105, 92, 0.5);
  box-shadow: var(--shadow-1);
}

.phase-option label::after {
  content: "";
  position: absolute;
  inset: -2px auto -2px -35%;
  width: 34%;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.24) 45%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-125%) skewX(-20deg);
  pointer-events: none;
  opacity: 0;
}

.phase-option label:hover::after,
.phase-option label:focus-visible::after {
  opacity: 1;
  animation: phase-reflect 620ms cubic-bezier(0.2, 0, 0, 1);
}

.phase-option input:checked + label {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.16);
  color: var(--brand-strong);
}

.layout {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 0 26px;
  position: relative;
  transition: padding 260ms ease;
}

.layout.is-empty {
  padding-top: 0;
  padding-bottom: 0;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}

.panel-right {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible;
  position: relative;
  z-index: 5;
  max-height: 2400px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: top center;
  transition:
    max-height 360ms cubic-bezier(0.2, 0, 0, 1),
    opacity 260ms ease,
    transform 300ms cubic-bezier(0.2, 0, 0, 1),
    padding-top 260ms ease,
    padding-bottom 260ms ease,
    gap 260ms ease,
    border-color 220ms ease,
    box-shadow 260ms ease;
}

.panel-right.is-hidden {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  padding-top: 0;
  padding-bottom: 0;
  gap: 0;
  border-width: 0;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.example-view {
  border: 1px solid rgba(0, 105, 92, 0.14);
  border-radius: var(--radius-md);
  padding: 18px;
  background: linear-gradient(170deg, #ffffff 0%, #f8fcfb 100%);
  box-shadow: var(--shadow-1);
  animation: panel-content-enter 260ms cubic-bezier(0.2, 0, 0, 1);
}

.example-view h2 {
  margin: 0 0 8px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
}

.example-view-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.example-view-text {
  min-width: 0;
}

.example-view-text p {
  margin: 0;
}

.example-view-thumb {
  width: 132px;
  flex: 0 0 132px;
  aspect-ratio: 1408 / 768;
  display: block;
  object-fit: cover;
  object-position: center center;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.tabs-wrap {
  border: 1px solid rgba(0, 105, 92, 0.14);
  border-radius: var(--radius-md);
  background: linear-gradient(170deg, #ffffff 0%, #f7fbfa 100%);
  padding: 14px;
  box-shadow: var(--shadow-1);
  animation: fade-slide 280ms ease;
}

.hidden {
  display: none;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tab-button {
  border: 1px solid rgba(0, 105, 92, 0.14);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.84);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-button.active {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.14);
  color: var(--brand-strong);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: tab-panel-enter 220ms cubic-bezier(0.2, 0, 0, 1);
}

.tab-panel h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.tab-panel ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.tab-panel p {
  margin: 6px 0;
}

.summary-block {
  border: 1px solid rgba(0, 105, 92, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.summary-block + .summary-block {
  margin-top: 10px;
}

.summary-block-toggle {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-strong);
}

.summary-block-toggle::-webkit-details-marker {
  display: none;
}

.summary-block-toggle::after {
  content: "▾";
  float: right;
  font-size: 0.78rem;
  margin-top: 2px;
  opacity: 0.8;
  transition: transform 160ms ease;
}

.summary-block[open] .summary-block-toggle::after {
  transform: rotate(180deg);
}

.summary-block-content {
  padding: 0 12px 12px;
}

.summary-template {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 105, 92, 0.16);
}

.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.editor-head h3 {
  margin: 0;
}

.editor-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.chatbot-selector {
  margin-top: 12px;
  border: 1px solid rgba(0, 105, 92, 0.16);
  border-radius: var(--radius-md);
  background: #fcfffe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.chatbot-selector-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
}

.chatbot-selector-summary::-webkit-details-marker {
  display: none;
}

.chatbot-selector-change {
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.chatbot-options {
  padding: 0 12px 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.chatbot-option {
  border: 1px solid rgba(0, 105, 92, 0.15);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface);
}

.chatbot-option-auto {
  border-left: 3px solid #1a8f4f;
}

.chatbot-option-manual {
  border-left: 3px solid #d04f3f;
}

.chatbot-option input {
  margin: 0;
}

.chatbot-manual-help {
  margin: 10px 0 0;
  padding: 9px 11px;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(208, 79, 63, 0.3);
  background: rgba(208, 79, 63, 0.08);
}

.chatbot-manual-help.is-warning {
  border-color: rgba(208, 79, 63, 0.5);
  background: rgba(208, 79, 63, 0.14);
  color: #8a2b20;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.chatbot-manual-help-link {
  margin-left: 4px;
  color: #7a1f17;
  text-decoration: underline;
  font-weight: 700;
}

.chatbot-manual-help-link:hover,
.chatbot-manual-help-link:focus-visible {
  color: #5f1711;
}

button#copy-button {
  margin-top: 12px;
  width: 100%;
  border: 1px solid rgba(0, 77, 67, 0.16);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #00897b 100%);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(0, 105, 92, 0.24);
}

button#copy-button:hover,
button#copy-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 105, 92, 0.28);
  filter: saturate(1.04);
}

#prompt-textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  overflow-y: hidden;
  border: 1px solid rgba(0, 105, 92, 0.18);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.prompt-adjustments {
  margin: 2px 0 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  overflow: hidden;
  max-height: 520px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 240ms ease, opacity 220ms ease, transform 220ms ease, margin-bottom 220ms ease;
}

.prompt-adjustments.is-collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  margin-bottom: 0;
  pointer-events: none;
}

.prompt-adjustments h3 {
  margin: 0 0 6px;
}

.copy-feedback {
  margin: 6px 0 8px;
  color: var(--brand-strong);
  font-weight: 600;
}

.collaboration-bar {
  margin-top: auto;
  border: 1px solid rgba(0, 105, 92, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(170deg, #ffffff 0%, #f5fcf9 100%);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-1);
  animation: panel-content-enter 320ms cubic-bezier(0.2, 0, 0, 1);
}

.collab-button {
  border: 1px solid rgba(0, 105, 92, 0.16);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  padding: 10px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.collab-button:hover,
.collab-button:focus-visible {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.08);
  box-shadow: var(--shadow-1);
}

.collab-button[aria-disabled="true"] {
  opacity: 0.56;
  pointer-events: none;
}

.collab-socials {
  position: relative;
}

.collab-socials summary {
  list-style: none;
}

.collab-socials summary::-webkit-details-marker {
  display: none;
}

.collab-social-links {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  min-width: 220px;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-2);
  display: grid;
  gap: 6px;
}

.collab-social-link {
  border: 1px solid rgba(0, 105, 92, 0.14);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.collab-social-link:hover,
.collab-social-link:focus-visible {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.08);
}

.collab-social-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.icon-inline {
  font-size: 0.95em;
  line-height: 1;
}

.cards {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.card {
  border: 1px solid rgba(0, 105, 92, 0.14);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-1);
  transition:
    transform 220ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 220ms ease,
    border-color 200ms ease,
    filter 180ms ease,
    opacity 180ms ease;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 0 240px;
}

.card-enter {
  animation: card-enter 320ms cubic-bezier(0.2, 0, 0, 1) both;
  animation-delay: calc(var(--card-stagger-index, 0) * 24ms);
}

.card:hover,
.card:focus-visible,
.card.active {
  border-color: var(--brand);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 28px rgba(0, 105, 92, 0.18);
}

.card.is-under-construction {
  opacity: 0.62;
  filter: grayscale(0.95);
  cursor: not-allowed;
}

.card.is-under-construction:hover,
.card.is-under-construction:focus-visible,
.card.is-under-construction.active {
  border-color: var(--border);
  box-shadow: none;
  outline: none;
}

.card-special {
  border-style: dashed;
  border-width: 2px;
  border-color: rgba(0, 105, 92, 0.34);
  background: linear-gradient(180deg, rgba(0, 105, 92, 0.03), rgba(244, 180, 0, 0.04));
}

.card-special:hover,
.card-special:focus-visible,
.card-special.active {
  border-color: rgba(0, 105, 92, 0.62);
  box-shadow: 0 12px 26px rgba(0, 105, 92, 0.16);
}

.card-special .card-body {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 253, 251, 0.96));
}

.card-special .card-title {
  color: var(--brand-strong);
}

.card-special .card-chip {
  border-color: rgba(0, 105, 92, 0.3);
  color: var(--brand-strong);
  background: rgb(255 255 255 / 67%);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4e4e4e;
  background: linear-gradient(135deg, #f0f0f0 0%, #dedede 100%);
  border-bottom: 1px solid rgba(0, 105, 92, 0.12);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

/* Some generated images include internal empty bands; this zooms the image layer only. */
.card-media-tight-image {
  background-size: cover, 100% auto;
  background-position: center center, center center;
}

.card-body {
  padding: 12px 14px;
  flex: 1;
}

.card-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 105, 92, 0.2);
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.85);
}

.card-chip-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #4a4a4a;
}

.card-title {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.004em;
}

.card-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.cards-footer-wrap {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(243, 250, 247, 0.58));
}

.cards-footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 20px;
}

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

#gallery-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.examples-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  padding: 5px 9px;
}

.gallery-description {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.phase-filter-hint {
  line-height: 1.35;
}

.phase-filter-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.phase-filter-tooltip-trigger {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.phase-filter-tooltip-trigger:hover,
.phase-filter-tooltip-trigger:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--shadow-1);
}

.phase-filter-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, -4px);
  min-width: 220px;
  max-width: 300px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.35;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 160ms ease, transform 160ms ease;
}

.phase-filter-tooltip-wrap:hover .phase-filter-tooltip,
.phase-filter-tooltip-wrap:focus-within .phase-filter-tooltip,
.phase-filter-tooltip-wrap.is-open .phase-filter-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

@media (max-width: 640px) {
  .gallery-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .examples-count {
    font-size: 0.74rem;
    padding: 4px 8px;
  }

  .phase-filter-tooltip {
    left: auto;
    right: 0;
    transform: translate(0, -4px);
    min-width: min(260px, calc(100vw - 40px));
    max-width: min(300px, calc(100vw - 40px));
  }

  .phase-filter-tooltip-wrap:hover .phase-filter-tooltip,
  .phase-filter-tooltip-wrap:focus-within .phase-filter-tooltip,
  .phase-filter-tooltip-wrap.is-open .phase-filter-tooltip {
    transform: translate(0, 0);
  }
}

.cards-footer {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#example-cards-footer {
  view-transition-name: cards-grid;
}

.app-about-footer-mobile {
  display: none;
}

.app-about-footer-link {
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-about-footer-link:hover,
.app-about-footer-link:focus-visible {
  color: var(--brand);
  outline: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(22, 27, 30, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 220ms ease;
}

.modal.hidden {
  display: none;
}

.modal.is-open {
  opacity: 1;
}

.modal-dialog {
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid rgba(0, 105, 92, 0.16);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, #ffffff 0%, #f7fbfa 100%);
  box-shadow: var(--shadow-3);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: transform 240ms cubic-bezier(0.2, 0, 0, 1), opacity 220ms ease;
}

.modal.is-open .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 105, 92, 0.12);
}

.modal-head h2 {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  border: 1px solid rgba(0, 105, 92, 0.18);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.08);
}

.modal-body {
  padding: 16px 18px 20px;
}

.modal-body p {
  margin: 0 0 10px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body a {
  color: var(--brand-strong);
}

.modal-body .install-primary-button {
  margin-top: 4px;
}

.install-feedback {
  margin: 10px 0 0;
  color: var(--brand-strong);
  font-weight: 700;
}

.install-feedback.is-error {
  color: #8f2f2f;
}

.modal-cookie-button {
  margin-bottom: 8px;
  border-color: rgba(0, 105, 92, 0.28);
  color: #0b5a50;
}

@media (max-width: 980px) {
  .cards-footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .install-hello-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  .update-hello-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  .cookie-consent-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .install-hello-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .update-hello-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .install-primary-button,
  .install-ghost-button {
    width: 100%;
  }

  .hero-actions {
    display: none;
  }

  .panel-toggle-button {
    top: 10px;
    right: 10px;
  }

  .phase-radios {
    display: none;
  }

  .phase-select-wrap {
    display: block;
  }

  .phase-option label {
    font-size: 0.82rem;
  }

  .cards-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .example-view-head {
    flex-direction: column;
  }

  .example-view-thumb {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }

  .collaboration-bar {
    align-items: stretch;
  }

  .collab-button {
    width: 100%;
    justify-content: center;
  }

  .collab-socials {
    width: 100%;
  }

  .collab-social-links {
    position: static;
    min-width: 0;
    margin-top: 8px;
  }

  .app-about-footer-mobile {
    display: block;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
  }

  .app-about-footer-mobile .app-about-footer-link {
    width: 100%;
    text-align: center;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }
}

@media (hover: none) and (pointer: coarse) {
  .hero-actions {
    display: none;
  }

  .app-about-footer-mobile {
    display: block;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
  }

  .app-about-footer-mobile .app-about-footer-link {
    width: 100%;
    text-align: center;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 460px) {
  .cards-footer {
    grid-template-columns: 1fr;
  }
}

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

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

@keyframes tab-panel-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes phase-reflect {
  from {
    transform: translateX(-125%) skewX(-20deg);
  }
  to {
    transform: translateX(320%) skewX(-20deg);
  }
}

/* ── Wizard ──────────────────────────────────────── */

.wizard-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.wizard-toggle-button:hover {
  background: rgba(0, 105, 92, 0.07);
}

.wizard-toggle-button.is-active {
  background: var(--brand);
  color: #fff;
}

.wizard-toggle-button.is-active:hover {
  background: var(--brand-strong);
}

.wizard-panel {
  margin-bottom: 12px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid rgba(0, 105, 92, 0.18);
  border-radius: var(--radius-md);
  animation: wizard-slide-in 200ms ease;
}

@keyframes wizard-slide-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.wizard-clear-button {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(198, 40, 40, 0.4);
  background: rgba(198, 40, 40, 0.07);
  color: #b71c1c;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.wizard-clear-button:hover,
.wizard-clear-button:focus-visible {
  border-color: #c62828;
  background: rgba(198, 40, 40, 0.12);
  box-shadow: 0 6px 16px rgba(198, 40, 40, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.wizard-field {
  margin-bottom: 14px;
}

.wizard-field:last-child {
  margin-bottom: 0;
}

.wizard-field-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: var(--text);
}

.wizard-hint {
  display: block;
  font-size: 0.775rem;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.wizard-field input[type="text"],
.wizard-field textarea,
.wizard-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.wizard-field input[type="text"]:focus,
.wizard-field textarea:focus,
.wizard-field select:focus {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
  outline: none;
}

.wizard-field textarea {
  resize: vertical;
  min-height: 64px;
}

.wizard-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.wizard-radio-group,
.wizard-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.wizard-option-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 5px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.845rem;
  background: var(--surface);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
  user-select: none;
}

.wizard-option-label:hover {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.05);
}

.wizard-option-label:has(input:checked) {
  border-color: var(--brand);
  background: rgba(0, 105, 92, 0.1);
  color: var(--brand);
  font-weight: 500;
}

.wizard-option-label input[type="radio"],
.wizard-option-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Modal footer */
.modal-footer-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  flex-wrap: wrap;
}

.wizard-skip-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.865rem;
  margin-top: 14px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.wizard-skip-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--brand);
  flex-shrink: 0;
}

/* ── Danger variant for hero-action-link (trash button) ─── */
#clear-data-button {
  padding: 9px 11px;
}

.hero-action-link--danger:hover,
.hero-action-link--danger:focus-visible {
  border-color: #c62828;
  background: rgba(198, 40, 40, 0.09);
  color: #b71c1c;
  box-shadow: 0 6px 16px rgba(198, 40, 40, 0.18);
}

/* ── Saved fields list (clear-data modal) ─────────────── */
.saved-fields-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.875rem;
}

.saved-field-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.saved-field-item:last-child {
  border-bottom: none;
}

.saved-field-key {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.saved-field-value {
  color: var(--text);
  word-break: break-word;
}

.saved-fields-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.875rem;
  font-style: italic;
}

.clear-data-note {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 0 0 10px !important;
  font-size: 0.875rem;
}

.clear-data-note--privacy {
  background: rgba(0, 105, 92, 0.07);
}

.clear-data-note--warning {
  background: rgba(180, 60, 0, 0.07);
  color: #7a2e00;
}

.clear-data-note--scope {
  background: rgba(198, 40, 40, 0.08);
  color: #7a2e00;
}

.clear-data-note--shared {
  background: rgba(239, 108, 0, 0.12);
  color: #7a2e00;
}

.clear-data-confirm-btn {
  background: linear-gradient(135deg, #c62828, #b71c1c) !important;
  box-shadow: 0 4px 14px rgba(198, 40, 40, 0.3) !important;
}

.clear-data-confirm-btn--soft {
  background: linear-gradient(135deg, #ef6c00, #e65100) !important;
  box-shadow: 0 4px 14px rgba(239, 108, 0, 0.28) !important;
}

.clear-data-confirm-btn:hover,
.clear-data-confirm-btn:focus-visible {
  background: linear-gradient(135deg, #b71c1c, #9a1010) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(198, 40, 40, 0.38) !important;
}

.clear-data-confirm-btn--soft:hover,
.clear-data-confirm-btn--soft:focus-visible {
  background: linear-gradient(135deg, #e65100, #bf360c) !important;
  box-shadow: 0 6px 18px rgba(230, 81, 0, 0.34) !important;
}

@media (prefers-reduced-motion: reduce) {
  .layout,
  .panel-right,
  .card,
  .card-enter,
  .tab-panel.active,
  .example-view,
  .collaboration-bar,
  .modal,
  .modal-dialog {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
