/* Scoped to the generator; the Tasks design system remains the shared base. */
.tg-shell { max-width: 1440px; }
.tg-heading, .tg-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tg-heading { margin-bottom: 1rem; }
.tg-heading p { margin-top: .3rem; color: var(--muted); }
.tg-workspace { display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr); align-items: start; gap: 1.25rem; }
.tg-edit-column { display: grid; gap: 1.25rem; min-width: 0; }
.tg-card { padding: 1.25rem; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,253,249,.9); box-shadow: var(--shadow); min-width: 0; }
.tg-card h2 { font-size: 1.13rem; color: var(--forest-deep); }
.tg-section-heading { margin-bottom: .9rem; }
.tg-small, .tg-help { font-size: .875rem; color: var(--muted); font-weight: 400; line-height: 1.5; }
.tg-required { color: var(--muted); font-size: .8rem; font-weight: 400; margin-left: .3rem; }
.tg-field { display: grid; gap: .4rem; font-weight: 650; margin-top: 1rem; }
.tg-field input, .tg-field select, .tg-field textarea { display: block; width: 100%; min-width: 0; min-height: 46px; border: 1px solid rgba(49,93,58,.26); border-radius: 10px; padding: .65rem .75rem; font-size: 1rem; font-weight: 400; color: var(--ink); background: #fffefa; }
.tg-field select { appearance: none; -webkit-appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='m5 7 4 4 4-4' fill='none' stroke='%23315d3a' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; }
.tg-field textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.tg-field input[aria-invalid="true"], .tg-field textarea[aria-invalid="true"] { border-color: #a53c2f; }
.tg-field-error { color: #963629; font-size: .875rem; font-weight: 500; }
.tg-field-error:empty { display: none; }
.tg-help#front-guidance { margin-top: .65rem; }
.tg-dietary { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: 0; margin: 1.2rem 0 0; border: 0; }
.tg-dietary legend { font-weight: 650; margin-bottom: .35rem; }
.tg-dietary label { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; cursor: pointer; }
.tg-dietary input { width: 22px; height: 22px; accent-color: var(--forest); margin: 0; }
.tg-button { display: inline-flex; justify-content: center; align-items: center; gap: .4rem; min-height: 44px; padding: .6rem .9rem; border: 1px solid rgba(49,93,58,.22); border-radius: 11px; color: var(--forest-deep); background: var(--white); cursor: pointer; font-size: .95rem; font-weight: 650; line-height: 1.2; }
.tg-button:hover:not(:disabled) { border-color: var(--forest); background: #f0f3ec; }
.tg-primary { color: #fffdf9; border-color: var(--forest); background: var(--forest); box-shadow: 0 4px 14px rgba(49,93,58,.12); }
.tg-primary:hover:not(:disabled) { background: var(--forest-deep); }
.tg-button:disabled { opacity: .45; cursor: default; box-shadow: none; }
.tg-button:focus-visible, .tg-field input:focus-visible, .tg-field textarea:focus-visible, .tg-field select:focus-visible, .tg-print-check summary:focus-visible { outline: 3px solid var(--cafe); outline-offset: 3px; }
.tg-quiet { background: transparent; box-shadow: none; border-color: transparent; padding-inline: .4rem; }
.tg-form-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.tg-form-actions .tg-primary { flex: 1; }
.tg-form-error { color: #963629; font-size: .95rem; margin-top: 1rem; }
.tg-status { color: var(--muted); min-height: 1.5rem; margin: 0 0 .8rem; font-size: .9rem; }
.tg-notice { padding: .8rem .95rem; border: 1px solid #c7b18b; background: #fff6e4; color: #61491f; border-radius: 10px; margin-bottom: 1rem; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.tg-error-notice { background: #fff0ed; border-color: #deb0a7; color: #84362b; }
.tg-notice ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.tg-count { display: inline-flex; align-items: center; justify-content: center; margin-left: .3rem; min-width: 1.6rem; height: 1.6rem; border-radius: 99px; background: var(--sand); font-size: .85rem; }
.tg-empty { color: var(--muted); padding: 1.2rem 0 .4rem; line-height: 1.55; }
.tg-collection { padding: 0; margin: .8rem 0 0; list-style: none; display: grid; gap: .7rem; }
.tg-collection-item { border: 1px solid var(--border); border-radius: 12px; padding: .8rem; background: rgba(234,224,211,.2); overflow-wrap: anywhere; }
.tg-collection-item.is-editing { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.tg-tag-summary { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.tg-tag-summary strong { font-size: 1rem; }
.tg-tag-price { white-space: nowrap; font-weight: 700; color: var(--forest-deep); }
.tg-tag-type { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; }
.tg-tag-subtitle { font-size: .9rem; margin-top: .15rem; }
.tg-tag-badges { font-size: .8rem; color: var(--forest-deep); margin-top: .25rem; }
.tg-item-actions { display: flex; gap: .2rem; flex-wrap: wrap; margin-top: .65rem; }
.tg-item-actions .tg-button { font-size: .8rem; min-height: 44px; padding: .5rem .55rem; }
.tg-item-actions .tg-delete { color: #934432; }
.tg-item-error { color: #963629; font-size: .85rem; margin-top: .5rem; }
.tg-preview-panel { overflow: hidden; }
.tg-preview-panel > .tg-help { margin: -.2rem 0 1rem; }
.tg-view-switch { display: flex; border: 1px solid var(--border); border-radius: 12px; padding: 3px; background: var(--sand); flex-shrink: 0; }
.tg-view-switch .tg-button { border-color: transparent; background: transparent; min-height: 40px; padding: .5rem .85rem; }
.tg-view-switch .tg-button[aria-pressed="true"] { background: var(--white); box-shadow: 0 2px 5px #362b1712; }
.tg-sheets { display: grid; gap: 1.25rem; }
.tg-sheet { margin: 0; min-width: 0; }
.tg-sheet figcaption { font-size: .875rem; color: var(--muted); margin-bottom: .45rem; }
.tg-sheet-surface { background: white; box-shadow: 0 2px 12px #312c2422; border: 1px solid #d6d5d1; width: 100%; aspect-ratio: 792 / 612; overflow: hidden; }
.tg-sheet-surface > svg { display: block; width: 100%; height: 100%; }
.tg-sheet-portrait { aspect-ratio: 612 / 792; margin-inline: auto; width: 77.27%; }
.tg-empty-sheet { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .65rem; width: 100%; aspect-ratio: 792 / 612; min-height: 190px; padding: 1.5rem; background: #fff; border: 1px dashed #bcbab1; color: var(--muted); }
.tg-empty-sheet span { font-size: .875rem; }
.tg-print-note { border-top: 1px solid var(--border); margin-top: 1.4rem; padding-top: 1rem; }
.tg-print-note h3 { font-size: .95rem; margin-bottom: .35rem; }
.tg-print-note p, .tg-print-check p { font-size: .875rem; color: var(--muted); margin-top: .4rem; line-height: 1.55; }
.tg-print-check { margin-top: .8rem; }
.tg-print-check summary { min-height: 44px; display: list-item; align-content: center; cursor: pointer; color: var(--forest-deep); font-size: .9rem; font-weight: 600; }
.tg-print-check button { margin-top: .8rem; }
[data-page="tag-generator"] [hidden] { display: none !important; }
@media (max-width: 950px) {
  .tg-workspace { grid-template-columns: minmax(290px, .9fr) minmax(0, 1.2fr); gap: .8rem; }
  .tg-card { padding: 1rem; }
  .tg-preview-panel .tg-section-heading { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .tg-workspace { grid-template-columns: minmax(0, 1fr); }
  .tg-heading { align-items: flex-start; flex-direction: column; }
  .tg-heading > button { width: 100%; }
  .tg-edit-column { gap: .8rem; }
  .tg-shell { padding: 1rem .75rem 2rem; }
  .tg-section-heading { gap: .5rem; }
}

/* Informational context is visually distinct from blocking field errors. */
#draft-notice, #project-warnings { background: #f0f4ef; border-color: #cad6c8; color: #34513a; }

.tg-input-wrap { position:relative; }
.tg-input-wrap input, .tg-input-wrap textarea { padding-right:2.5rem; }
.tg-input-wrap .tg-field-clear { right:.4rem; top:23px; }
.tg-input-wrap input[role="combobox"] { padding-right:3rem; }
.tg-input-wrap input[role="combobox"] + .tg-field-clear { width:44px; height:44px; right:.125rem; }
.tg-suggestions {
  position:absolute;
  z-index:2;
  inset:calc(100% + .25rem) 0 auto;
  max-height:min(260px, 32vh);
  overflow-y:auto;
  overscroll-behavior:contain;
  border:1px solid #cad6c8;
  border-radius:10px;
  background:white;
}
.tg-option { padding:12px; min-height:44px; cursor:pointer; }
button.tg-option { display:block; width:100%; border:0; background:transparent; color:inherit; font:inherit; text-align:start; }
.tg-option:hover,.tg-option[aria-selected="true"] { background:#eae0d3; }

.tg-output-actions { display:flex; flex-wrap:wrap; gap:.6rem; }
.tg-duplex-field { max-width:14rem; margin-bottom:.35rem; }

.menu-hint { margin-top: .55rem; }
.menu-row { padding: 0; min-width: 0; margin: .85rem 0 0; border: 0; }
.menu-row + .menu-row { border-top: 1px solid var(--border); }
.menu-row legend { color: var(--forest-deep); font-size: .875rem; font-weight: 650; padding: 0 .4rem 0 0; }
.menu-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(5rem, 25%); gap: .6rem; }
.menu-pair .tg-field, .menu-description { margin-top: .4rem; }
.menu-row .tg-field { font-size: .875rem; }
.menu-price-field { grid-template-columns: minmax(0, 1fr) minmax(5rem, 25%); align-items: center; gap: .6rem; }
.menu-remove { font-size: .84rem; }
#add-menu-row { margin-top: .8rem; }
