.gts-ugf-app {
  --gts-ugf-green: #1b7a45;
  --gts-ugf-chili: #dc2626;
  max-width: 960px;
  margin: 0 auto;
  color: #111827;
}

.gts-ugf-mode-tabs {
  display: flex;
  background: #ffab57;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.gts-ugf-mode-btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 800;
  border-radius: 9px;
  cursor: pointer;
}

.gts-ugf-mode-btn.active {
  background: #fff;
  color: #d96b00;
}

.gts-ugf-scenes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.gts-ugf-scene-btn {
  min-height: 84px;
  padding: 20px 14px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.gts-ugf-scene-btn.active {
  background: var(--gts-ugf-green);
  border-color: var(--gts-ugf-green);
  color: #fff;
}

.gts-ugf-rule {
  border: none;
  border-top: 1px solid #d1d5db;
  margin: 16px 0;
}

.gts-ugf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  margin: 12px 0;
}

.gts-ugf-region-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.gts-ugf-reset-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.gts-ugf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4b5563;
}

.gts-ugf-field select {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  font-weight: 700;
  color: #111827;
}

.gts-ugf-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

.gts-ugf-reset {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #f9a8c9;
  background: #fce7f3;
  color: #9d174d;
  cursor: pointer;
  font-weight: 700;
}

.gts-ugf-acc {
  margin-bottom: 16px;
}

.gts-ugf-acc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: 1.5px solid #c5cdd6;
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  color: #1f2937;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.gts-ugf-acc-toggle:hover,
.gts-ugf-acc-toggle:focus-visible {
  background: #f3f6f8;
  border-color: #9aa7b5;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  outline: none;
}

.gts-ugf-acc-toggle[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #b7c0ca;
  background: #f9f9f9;
}

.gts-ugf-acc-label {
  min-width: 0;
}

.gts-ugf-acc-chevron {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  color: #64748b;
  font-size: 0.72em;
  line-height: 1;
  transition: transform 0.2s ease;
}

.gts-ugf-acc-chevron::after {
  content: "▼";
}

.gts-ugf-acc-toggle[aria-expanded="true"] .gts-ugf-acc-chevron {
  transform: rotate(180deg);
}

.gts-ugf-acc-panel {
  border: 1.5px solid #b7c0ca;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 18px 20px 20px;
  background: #f9f9f9;
  box-sizing: border-box;
}

.gts-ugf-acc-panel[hidden] {
  display: none !important;
}

.gts-ugf-ing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
}

.gts-ugf-ing-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 6px 4px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.55;
  color: #334155;
  cursor: pointer;
  border-radius: 6px;
}

.gts-ugf-ing-item:hover {
  background: rgba(255, 255, 255, 0.7);
}

.gts-ugf-ing-item input {
  margin: 0.25em 0 0;
  flex-shrink: 0;
}

.gts-ugf-ing-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gts-ugf-results {
  display: grid;
  gap: 14px;
}

.gts-ugf-results.is-finger {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gts-ugf-card-detail {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-sizing: border-box;
}

.gts-ugf-dname-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.gts-ugf-dname {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.gts-ugf-dname-en {
  font-size: 16px;
  font-weight: 600;
  color: #475569;
}

.gts-ugf-dlocal {
  font-size: 16px;
  font-weight: 600;
  color: #475569;
  margin-top: 4px;
}

.gts-ugf-local-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gts-ugf-local-text {
  min-width: 0;
}

.gts-ugf-speak {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  position: relative;
}

.gts-ugf-speak::after {
  content: "";
  display: block;
  position: absolute;
  left: 11px;
  top: 8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
}

.gts-ugf-speak:hover,
.gts-ugf-speak:focus {
  background: #1d4ed8;
}

.gts-ugf-speak:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.gts-ugf-tag-row {
  margin-top: 10px;
}

.gts-ugf-detail-mid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  margin-top: 12px;
  align-items: start;
}

.gts-ugf-card-nophoto .gts-ugf-detail-mid {
  grid-template-columns: 1fr;
}

.gts-ugf-thumb-wrap {
  width: 240px;
  height: 135px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
}

.gts-ugf-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gts-ugf-thumb-wrap:hover .gts-ugf-thumb {
  transform: scale(1.2);
}

.gts-ugf-detail-desc {
  min-width: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #334155;
}

.gts-ugf-ings {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.gts-ugf-ings-label {
  font-weight: 700;
  color: #64748b;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.gts-ugf-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gts-ugf-pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.gts-ugf-pill--blue {
  background: #dbeafe;
  color: #1e40af;
}

.gts-ugf-pill--red {
  background: #fee2e2;
  color: #991b1b;
}

.gts-ugf-pill--brown {
  background: #efe6dc;
  color: #6b4423;
}

.gts-ugf-pill--green {
  background: #dcfce7;
  color: #166534;
}

.gts-ugf-pill--yellow {
  background: #fef9c3;
  color: #854d0e;
}

.gts-ugf-pill--orange {
  background: #ffedd5;
  color: #9a3412;
}

.gts-ugf-pill--gray {
  background: #f3f4f6;
  color: #374151;
}

.gts-ugf-card-finger {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  padding: 0 0 10px;
  text-align: center;
}

.gts-ugf-finger-photo {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  overflow: hidden;
}

.gts-ugf-finger-photo img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gts-ugf-finger-photo:hover img {
  transform: scale(1.12);
}

.gts-ugf-finger-name {
  margin-top: 8px;
  padding: 0 8px;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.3;
}

.gts-ugf-finger-local {
  justify-content: center;
  margin-top: 4px;
  padding: 0 8px;
}

.gts-ugf-finger-local .gts-ugf-local-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  text-align: left;
}

.gts-ugf-spice {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 2px;
  color: var(--gts-ugf-chili);
  min-height: 1.1em;
}

.gts-ugf-spice.is-none {
  min-height: 0;
}

.gts-ugf-spice-inline {
  margin-top: 0;
  justify-content: flex-start;
  min-height: 0;
  align-self: center;
}

.gts-ugf-chili-wrap {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.gts-ugf-chili {
  width: 18px;
  height: 18px;
  display: block;
  color: var(--gts-ugf-chili);
}

.gts-ugf-empty {
  padding: 24px;
  text-align: center;
  color: #6b7280;
}

.gts-ugf-unavailable {
  color: #4b5563;
}

.gts-ugf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.gts-ugf-lightbox[hidden] {
  display: none !important;
}

.gts-ugf-lightbox-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  max-width: min(600px, 100%);
  max-height: min(90vh, 100%);
  overflow: auto;
  box-sizing: border-box;
}

.gts-ugf-lightbox-img {
  width: 600px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.gts-ugf-lightbox-meta {
  margin-top: 12px;
  text-align: left;
}

.gts-ugf-lightbox-desc {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #334155;
}

.gts-ugf-lightbox-actions {
  margin-top: 12px;
  text-align: right;
}

.gts-ugf-lightbox-close {
  color: #0284c7;
  font-size: 12px;
  background: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}

body.gts-ugf-lightbox-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .gts-ugf-results.is-finger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gts-ugf-ing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gts-ugf-detail-mid {
    grid-template-columns: 1fr;
  }

  .gts-ugf-thumb-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
