/* Review Generator - Frontend Styles (minimal, theme-inheriting) */

.rg-form-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.rg-form-title {
    margin-bottom: 0.5em;
}

.rg-form-lead {
    margin-bottom: 1.5em;
}

/* ---- Progress bar ---- */
.rg-progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 0.5em;
    overflow: hidden;
}

.rg-progress-fill {
    height: 100%;
    background: #4285f4;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.rg-step-counter {
    text-align: right;
    font-size: 0.85em;
    color: #888;
    margin-bottom: 1.5em;
}

/* ---- Step layout ---- */
.rg-step {
    min-height: 120px;
}

.rg-step-content {
    margin-bottom: 2em;
    padding: 1.5em;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fafafa;
    transition: border-color 0.3s ease;
}

.rg-step-content.rg-step-error {
    border-color: #e74c3c;
    animation: rg-shake 0.4s ease;
}

@keyframes rg-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.rg-step-label {
    display: block;
    margin-bottom: 1em;
    font-weight: bold;
    font-size: 1.1em;
    line-height: 1.5;
}

.rg-required-mark {
    color: #e74c3c;
    margin-left: 0.2em;
}

.rg-step-description {
    margin: -0.3em 0 0.8em;
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
    font-weight: normal;
}

/* ---- Form fields ---- */
.rg-field-input {
    margin-top: 0.5em;
}

.rg-input,
.rg-textarea,
.rg-select {
    width: 100%;
    padding: 0.6em;
    box-sizing: border-box;
    font-size: 16px !important; /* 16px+ prevents iOS auto-zoom */
}

.rg-textarea {
    min-height: 100px;
    resize: vertical;
}

.rg-radio-group,
.rg-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

.rg-radio-label,
.rg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: normal;
    cursor: pointer;
    padding: 0.4em 0;
}

/* ---- "Other" text input ---- */
.rg-other-text {
    width: 100%;
    padding: 0.5em;
    box-sizing: border-box;
}

.rg-input-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* ---- Navigation buttons ---- */
.rg-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
}

.rg-btn {
    display: inline-block;
    padding: 0.75em 2em;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1em;
    line-height: 1.4;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.rg-btn:active {
    transform: scale(0.97);
}

.rg-btn-primary {
    background-color: #4285f4;
    color: #fff;
    padding: 15px 50px !important;
}

.rg-btn-primary:hover {
    background-color: #3367d6;
    color: #fff;
}

.rg-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rg-btn-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ccc;
}

.rg-btn-secondary:hover {
    background-color: #e0e0e0;
}

.rg-btn-back {
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
    padding: 0.75em 1.5em;
}

.rg-btn-back:hover {
    background: #f5f5f5;
    color: #333;
}

.rg-btn-next,
.rg-btn-submit {
    margin-left: auto;
    padding: 15px 50px !important;
}

/* ---- Loading ---- */
.rg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3em 1em;
    font-style: italic;
    color: #666;
    gap: 1em;
}

/* Logo placeholder — replace inner content with <img> when ready */
.rg-loading-logo-placeholder {
    min-height: 48px;
    width: 120px;
    /* Uncomment below during development to see the area:
    border: 2px dashed #ccc;
    border-radius: 6px; */
}

/* Puzzle pieces born animation */
.rg-loading-puzzle-anim {
    display: flex;
    gap: 0.4em;
    align-items: center;
}

.rg-puzzle-piece {
    width: 40px;
    height: 40px;
    opacity: 0;
    transform: scale(0.1) rotate(-200deg);
    animation: rg-piece-born 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rg-puzzle-piece:nth-child(1) { animation-delay: 0.2s; }
.rg-puzzle-piece:nth-child(2) { animation-delay: 0.6s; }
.rg-puzzle-piece:nth-child(3) { animation-delay: 1.0s; }

@keyframes rg-piece-born {
    0%   { opacity: 0; transform: scale(0.1) rotate(-200deg); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.rg-loading-text {
    font-size: 0.95em;
    animation: rg-text-fade 1.4s ease-in-out 1.8s both;
}

@keyframes rg-text-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rg-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: rg-spin 0.8s linear infinite;
}

@keyframes rg-spin {
    to { transform: rotate(360deg); }
}

/* ---- Result area ---- */
.rg-result-area {
    margin-top: 2em;
    padding: 1.5em;
    border: 2px solid #4285f4;
    border-radius: 8px;
    background: #f8f9ff;
}

.rg-completion-title {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-size: 1.3em;
}

.rg-completion-message {
    margin-bottom: 1.2em;
    line-height: 1.7;
    color: #444;
}

.rg-completion-image {
    margin-bottom: 1.2em;
    text-align: center;
}

.rg-completion-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.rg-result h4 {
    margin-top: 0;
    margin-bottom: 0.75em;
}

textarea.rg-generated-text {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 1em;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1em;
    line-height: 1.7;
    font-family: inherit;
    font-size: 1em;
    color: #333;
    resize: vertical;
    min-height: 150px;
}

textarea.rg-generated-text:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
}

.rg-result-actions {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}

/* ---- Disclaimer ---- */
.rg-disclaimer {
    margin-top: 1.5em;
    padding: 1em 1.2em;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.82em;
    line-height: 1.7;
    color: #666;
}

.rg-disclaimer a {
    color: #4285f4;
}

/* ---- Regenerate button ---- */
.rg-btn-regenerate {
    background: transparent;
    color: #888;
    border: 1px dashed #ccc;
    font-size: 0.9em;
    padding: 0.6em 1.5em;
}

.rg-btn-regenerate:hover {
    color: #555;
    border-color: #999;
    background: #f9f9f9;
}

.rg-btn-regenerate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Star rating ---- */
.rg-rating-group {
    display: flex;
    gap: 0.25em;
    font-size: 2em;
    cursor: pointer;
}

.rg-star {
    color: #ccc;
    transition: color 0.15s ease, transform 0.1s ease;
    user-select: none;
    line-height: 1;
}

.rg-star:hover,
.rg-star.rg-star-hover {
    color: #f5a623;
    transform: scale(1.15);
}

.rg-star.rg-star-active {
    color: #f5a623;
}

/* ---- Review display: cards ---- */
.rg-reviews {
    margin: 2em 0;
}

.rg-reviews-summary {
    text-align: center;
    margin-bottom: 1.5em;
}

.rg-reviews-summary .rg-summary-stars {
    font-size: 1.5em;
    color: #f5a623;
    letter-spacing: 0.1em;
}

.rg-reviews-summary .rg-summary-text {
    color: #666;
    font-size: 0.95em;
    margin-top: 0.3em;
}

.rg-reviews-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5em;
}

.rg-review-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.5em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.rg-review-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rg-review-card .rg-review-stars {
    color: #f5a623;
    font-size: 1.2em;
    margin-bottom: 0.75em;
    letter-spacing: 0.05em;
}

.rg-review-card .rg-review-text {
    line-height: 1.7;
    color: #333;
    margin-bottom: 1em;
    font-size: 0.95em;
}

.rg-review-card .rg-review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.85em;
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75em;
}

.rg-review-card .rg-review-author {
    font-weight: bold;
    color: #555;
}

.rg-review-card .rg-review-reply {
    margin-top: 1em;
    padding: 1em;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #4285f4;
    font-size: 0.9em;
}

.rg-review-card .rg-review-reply-label {
    font-weight: bold;
    color: #4285f4;
    margin-bottom: 0.3em;
    font-size: 0.85em;
}

/* ---- Review display: list ---- */
.rg-reviews-list .rg-review-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: none;
    padding: 1.5em 0;
}

.rg-reviews-list .rg-review-card:first-child {
    border-top: 1px solid #e8e8e8;
}

.rg-reviews-list .rg-review-card:hover {
    box-shadow: none;
}

/* ---- Review display: slider ---- */
.rg-reviews-slider {
    position: relative;
    overflow: hidden;
}

.rg-reviews-slider .rg-slider-track {
    display: flex;
    transition: transform 0.4s ease;
}

.rg-reviews-slider .rg-review-card {
    min-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

.rg-slider-nav {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-top: 1em;
}

.rg-slider-btn {
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.2s ease;
}

.rg-slider-btn:hover {
    background: #e0e0e0;
}

.rg-slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-top: 0.5em;
}

.rg-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rg-slider-dot.active {
    background: #4285f4;
}

/* ---- File upload ---- */
.rg-file-upload-group {
    position: relative;
}

.rg-file-input {
    width: 100%;
    padding: 0.6em;
    box-sizing: border-box;
    font-size: 16px !important; /* 16px+ prevents iOS auto-zoom */
}

.rg-file-hint-text {
    margin: 0.3em 0 0;
    font-size: 0.85em;
    color: #888;
}

.rg-file-preview {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}

.rg-file-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
}

.rg-file-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    border: 2px solid #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: background 0.2s ease;
}

.rg-file-remove:hover {
    background: #c0392b;
}

.rg-file-heic-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 90px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #888;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 0.05em;
}

/* ---- Conditional option groups ---- */
.rg-option-group-field {
    margin-top: 0.5em;
}

/* ============================================================
   Voice Piece (ボイピ) — Piece selection & review composition
   ============================================================ */

.rg-voipi-screen {
    text-align: center;
    padding: 1em 0;
}

.rg-voipi-icon {
    font-size: 2.8em;
    line-height: 1;
    margin-bottom: 0.3em;
}

.rg-voipi-svg-icon {
    width: 60px;
    height: 60px;
    display: block;
    margin: 0 auto !important;
    animation: rg-puzzle-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes rg-puzzle-pop {
    from { transform: scale(0.4) rotate(-15deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.rg-voipi-thanks {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 0.8em;
}

.rg-voipi-title {
    font-size: 1.3em;
    margin-bottom: 0.3em;
}

.rg-voipi-subtitle {
    color: #777;
    font-size: 0.95em;
    margin-bottom: 1.5em;
}

/* ---- Piece cards ---- */
.rg-pieces-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7em;
    justify-content: center;
    margin-bottom: 1.5em;
}

.rg-piece-card {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.7em 1em;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
    max-width: 100%;
}

.rg-piece-card:hover {
    border-color: #a0c4ff;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.12);
}

.rg-piece-card.rg-piece-selected {
    border-color: #4285f4;
    background: #eef4ff;
    box-shadow: 0 2px 12px rgba(66, 133, 244, 0.2);
}

.rg-piece-checkbox {
    display: none;
}

.rg-piece-puzzle {
    font-size: 20px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.rg-piece-selected .rg-piece-puzzle {
    opacity: 1;
}

.rg-piece-text {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    color: #333;
    text-align: left;
}

.rg-piece-check-icon {
    display: none;
    color: #4285f4;
    font-weight: bold;
    font-size: 1.1em;
    flex-shrink: 0;
}

.rg-piece-selected .rg-piece-check-icon {
    display: inline;
}

/* ---- Custom piece input ---- */
.rg-custom-piece {
    max-width: 500px;
    margin: 0 auto 1.5em;
    text-align: left;
}

.rg-custom-piece-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.4em;
}

/* ---- Tone selection ---- */
.rg-tone-selection {
    margin-bottom: 1.5em;
}

.rg-tone-label {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 0.7em;
    font-weight: bold;
}

.rg-tone-options {
    display: flex;
    justify-content: center;
    gap: 1em;
}

.rg-tone-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3em;
    padding: 0.8em 1.5em;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.rg-tone-option:hover {
    border-color: #a0c4ff;
}

.rg-tone-option.rg-tone-selected {
    border-color: #4285f4;
    background: #eef4ff;
}

.rg-tone-option input[type="radio"] {
    display: none;
}

.rg-tone-icon {
    font-size: 1.5em;
    line-height: 1;
}

.rg-tone-name {
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
}

/* ---- Piece counter & compose button ---- */
.rg-voipi-action {
    margin-top: 0.5em;
}

.rg-piece-counter {
    font-size: 0.85em;
    color: #888;
    margin-top: 0.5em;
    transition: color 0.2s ease;
}

.rg-piece-counter.rg-counter-ready {
    color: #4285f4;
    font-weight: bold;
}

/* ---- Selected piece chips ---- */

.rg-selected-piece-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.35em 0.9em;
    background: #eef4ff;
    border: 1.5px solid #4285f4;
    border-radius: 20px;
    font-size: 0.85em;
    color: #2c5fa8;
    font-weight: 600;
}

/* ---- Loading spinner (inline) ---- */
.rg-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rg-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.4em;
}

@keyframes rg-spin {
    to { transform: rotate(360deg); }
}

/* ---- Selected pieces static display ---- */

.rg-selected-pieces-display {
    margin: 0 0 1.2em;
    text-align: left;
}

.rg-selected-pieces-label {
    font-size: 0.8em;
    color: #999;
    margin: 0 0 0.5em;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.rg-selected-pieces-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

/* ---- Single variant (first generation) ---- */

.rg-single-variant {
    margin: 0 0 1em;
}

/* ---- Multi-variant horizontal scroll cards ---- */

.rg-variants-scroll-row {
    display: flex;
    gap: 0.8em;
    overflow-x: auto;
    /* right padding reveals edge of next card as peek */
    padding: 0 15% 0.5em 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 0.4em;
}

.rg-variants-scroll-row::-webkit-scrollbar {
    height: 4px;
}

.rg-variants-scroll-row::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.rg-scroll-hint {
    font-size: 0.78em;
    color: #bbb;
    text-align: center;
    margin: 0 0 1em;
    letter-spacing: 0.05em;
}

.rg-variant-card {
    /* 82% width so ~18% of the next card peeks out */
    flex: 0 0 82%;
    min-width: 0;
    scroll-snap-align: start;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1em;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    transition: border-color 0.2s ease;
}

.rg-variant-card-selected {
    border-color: #4285f4;
    background: #f0f5ff;
}

.rg-variant-voice-label {
    font-size: 0.82em;
    font-weight: 700;
    color: #4285f4;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.rg-take-selected-badge {
    font-size: 0.78em;
    background: #4285f4;
    color: #fff;
    border-radius: 10px;
    padding: 0.1em 0.55em;
    font-weight: 600;
}

/* ---- Card action row (select + regen buttons) ---- */

.rg-card-actions {
    display: flex;
    align-items: center;
    gap: 0.6em;
    flex-wrap: wrap;
}

.rg-card-actions--single {
    margin-top: 0.4em;
}

/* Non-selected cards are clickable */
.rg-variant-card-selectable {
    cursor: pointer;
}

.rg-variant-card-selectable:hover {
    border-color: #a0c4ff;
    background: #f8fbff;
}

.rg-take-hint {
    font-size: 0.75em;
    color: #aaa;
    font-weight: 400;
}

/* ---- Inline regen button (smaller, secondary) ---- */

.rg-regen-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.3em 0.8em;
    border: 1.5px solid #bbb;
    border-radius: 14px;
    background: #fff;
    color: #888;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.rg-regen-inline-btn:hover {
    border-color: #4285f4;
    color: #4285f4;
}

.rg-regen-inline-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.rg-regen-left {
    font-size: 0.85em;
    color: #bbb;
    margin-left: 0.2em;
}

.rg-regen-exhausted {
    font-size: 0.8em;
    color: #bbb;
}

.rg-variant-text {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    border-radius: 8px;
    padding: 0.8em;
    border: 1px solid #e0e0e0;
    font-size: 16px !important; /* 16px+ prevents iOS auto-zoom */
    line-height: 1.8;
    resize: none;       /* auto-height via JS; no manual resize handle */
    overflow: hidden;   /* no scroll — JS expands height to fit content */
    min-height: 6em;
}

.rg-variant-text:focus {
    outline: none;
    border-color: #4285f4;
}

.rg-variants-actions {
    margin-top: 1.2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6em;
}

.rg-btn-ghost {
    background: transparent;
    color: #999;
    border: none;
    font-size: 0.88em;
    padding: 0.4em 1em;
    cursor: pointer;
    text-decoration: underline;
}

.rg-btn-ghost:hover {
    color: #555;
}

/* ---- Completion screen ---- */
.rg-completion-screen {
    text-align: center;
}

/* Eye-catching GBP callout — Google color theme */
.rg-gbp-callout {
    margin: 1.5em 0 1em;
    padding: 1.2em 1.4em;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-top: 4px solid #4285f4;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(66,133,244,0.1);
    text-align: center;
}

.rg-gbp-callout-heading {
    font-size: 1.05em;
    font-weight: bold;
    margin: 0 0 0.3em;
    letter-spacing: 0.02em;
}

/* Google letter colors */
.rg-google-g  { color: #4285F4; }
.rg-google-o1 { color: #EA4335; }
.rg-google-o2 { color: #FBBC05; }
.rg-google-g2 { color: #4285F4; }
.rg-google-l  { color: #34A853; }
.rg-google-e  { color: #EA4335; }

.rg-gbp-callout-stars {
    font-size: 1.4em;
    color: #FBBC05;
    margin: 0 0 0.5em;
    letter-spacing: 0.1em;
    line-height: 1;
}

.rg-gbp-callout-text {
    font-size: 0.97em;
    color: #444;
    line-height: 1.7;
    margin: 0;
}

/* Buttons row (top & bottom) */
.rg-review-btn-row {
    display: flex;
    gap: 0.8em;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0.8em 0;
}

.rg-btn-gbp {
    font-size: 1.05em;
    padding: 0.9em 2em;
    border-radius: 8px;
}

/* Legacy hint (keep for fallback) */
.rg-gbp-hint {
    margin-top: 0.6em;
    font-size: 0.82em;
    color: #888;
}

/* Review preview (always visible on completion screen) */
.rg-review-preview {
    margin-top: 1.5em;
    text-align: left;
}

.rg-review-preview-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.4em;
}

.rg-review-preview .rg-generated-text {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.8em;
    font-size: 16px !important; /* 16px+ prevents iOS auto-zoom */
    line-height: 1.8;
    resize: vertical;
    margin-bottom: 0.6em;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .rg-step-content {
        padding: 1em;
    }

    .rg-btn {
        padding: 0.6em 1.2em;
        font-size: 0.95em;
    }

    .rg-step-label {
        font-size: 1em;
    }

    /* Voice Piece mobile */
    .rg-pieces-container {
        gap: 0.5em;
    }

    .rg-piece-card {
        padding: 0.6em 0.8em;
        font-size: 0.9em;
    }

    .rg-tone-options {
        gap: 0.5em;
    }

    .rg-tone-option {
        padding: 0.6em 1em;
    }

    .rg-variant-card {
        flex: 0 0 90%;
    }
}
