/* ═══════════════════════════════════════════════════════════
   うちわ文字＆応援ボード生成ツール — styles
   prefix: uw-
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@700;900&family=Zen+Maru+Gothic:wght@700;900&family=Hachi+Maru+Pop&family=Cherry+Bomb+One&family=Reggae+One&display=swap');

.uw-container {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    max-width: 740px;
    margin: 0 auto;
    padding: 0 16px 40px;
    color: #1f2937;
}

/* ── Feature Banner ── */
.uw-feature-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 1.5px solid #f9a8d4;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
}

.uw-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.uw-feature-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.uw-feature-item strong {
    font-size: 13px;
    font-weight: 700;
    color: #9d174d;
    display: block;
    margin-bottom: 2px;
}

.uw-feature-item p {
    font-size: 12px;
    color: #be185d;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .uw-feature-banner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Step Cards ── */
.uw-step-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.uw-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #db2777;
    background: #fce7f3;
    border: 1px solid #f9a8d4;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: 0.4px;
}

.uw-step-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px;
}

/* ── Canvas Preview ── */
.uw-preview-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 12px;
    position: relative;
}

.uw-canvas {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

/* ── Tab Navigation ── */
.uw-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.uw-tab-nav::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.uw-tab-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    text-align: center;
    white-space: nowrap;
}

.uw-tab-btn:hover {
    color: #ec4899;
    background: #fdf2f8;
}

.uw-tab-btn.active {
    color: #db2777;
    border-bottom-color: #ec4899;
    background: transparent;
}

.uw-tab-panel {
    display: none;
}

.uw-tab-panel.active {
    display: block;
}

/* ── Text Input ── */
.uw-text-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.uw-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 16px;
    font-family: inherit;
    color: #1f2937;
    background: #fafafa;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.uw-input:focus {
    outline: none;
    border-color: #ec4899;
    background: #fff;
}

.uw-input-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 4px;
    display: block;
}

/* ── Preset Phrases ── */
.uw-phrase-section {
    margin-bottom: 20px;
}

.uw-phrase-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.uw-phrase-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.uw-phrase-btn {
    padding: 6px 14px;
    border: 1.5px solid #f9a8d4;
    border-radius: 20px;
    background: #fdf2f8;
    color: #9d174d;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    white-space: nowrap;
}

.uw-phrase-btn:hover {
    background: #fce7f3;
    border-color: #ec4899;
    color: #be185d;
}

/* ── Color Palette ── */
.uw-color-section {
    margin-bottom: 16px;
}

.uw-color-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.uw-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.uw-color-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.12s;
    padding: 0;
    outline: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.uw-color-swatch:hover {
    transform: scale(1.12);
}

.uw-color-swatch.active {
    border-color: #ec4899;
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.25);
}

.uw-color-picker-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.uw-color-picker {
    width: 34px;
    height: 34px;
    border: 2px dashed #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.uw-color-picker::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.uw-color-picker::-webkit-color-swatch {
    border-radius: 50%;
    border: none;
}

/* ── Slider ── */
.uw-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.uw-slider-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
    min-width: 80px;
}

.uw-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

.uw-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #d946ef);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.4);
}

.uw-slider-value {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    min-width: 30px;
    text-align: right;
}

/* ── Select ── */
.uw-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background: #fafafa;
    transition: border-color 0.15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.uw-select:focus {
    outline: none;
    border-color: #ec4899;
    background-color: #fff;
}

/* ── Decoration Mode Buttons ── */
.uw-deco-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.uw-deco-btn {
    flex: 1;
    min-width: 85px;
    padding: 10px 8px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: all 0.15s;
}

.uw-deco-btn:hover {
    border-color: #ec4899;
    background: #fdf2f8;
    color: #be185d;
}

.uw-deco-btn.active {
    border-color: #ec4899;
    background: linear-gradient(135deg, #ec4899, #d946ef);
    color: #fff;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

/* ── Sticker Buttons ── */
.uw-sticker-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.uw-sticker-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}

.uw-sticker-btn:hover {
    border-color: #ec4899;
    background: #fdf2f8;
    transform: scale(1.1);
}

.uw-sticker-btn.active {
    border-color: #ec4899;
    background: #fce7f3;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.uw-sticker-category {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.5px;
    margin: 8px 0 6px;
    display: block;
}

.uw-sticker-category:first-child {
    margin-top: 0;
}

.uw-sticker-hint {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
    margin-bottom: 16px;
}

/* ── Sticker Sub-Tabs ── */
.uw-sticker-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.uw-sticker-tab {
    padding: 5px 10px;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.12s;
    white-space: nowrap;
}

.uw-sticker-tab:hover {
    border-color: #f9a8d4;
    background: #fdf2f8;
    color: #be185d;
}

.uw-sticker-tab.active {
    border-color: #ec4899;
    background: #ec4899;
    color: #fff;
}

.uw-sticker-panel {
    display: none;
}

.uw-sticker-panel.active {
    display: block;
}

.uw-sticker-undo {
    padding: 6px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.12s;
}

.uw-sticker-undo:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* ── CTA Buttons ── */
.uw-btn-share {
    display: block !important;
    width: 100% !important;
    padding: 18px 24px !important;
    background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4) !important;
    transition: opacity 0.2s, transform 0.1s;
    margin-bottom: 12px !important;
    letter-spacing: 0.3px;
    text-align: center !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.uw-btn-share:hover {
    opacity: 0.9 !important;
    box-shadow: 0 8px 28px rgba(236, 72, 153, 0.5) !important;
    transform: translateY(-1px);
}

.uw-btn-share:active {
    transform: scale(0.98) !important;
}

.uw-btn-share:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

.uw-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.uw-btn-action {
    flex: 1;
    min-width: 130px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #374151;
    transition: all 0.15s;
    text-align: center;
    white-space: nowrap;
}

.uw-btn-action:hover {
    border-color: #ec4899;
    background: #fdf2f8;
    color: #be185d;
}

.uw-btn-action.copied {
    border-color: #ec4899;
    background: #fce7f3;
    color: #be185d;
}

/* ── Share Preview ── */
.uw-share-preview {
    background: #fdf2f8;
    border: 1.5px solid #f9a8d4;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.uw-share-hint {
    font-size: 13px;
    font-weight: 600;
    color: #9d174d;
    margin: 0 0 12px;
    line-height: 1.5;
}

.uw-share-img {
    display: block;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    -webkit-touch-callout: default;
}

.uw-btn-copy-img {
    display: block !important;
    width: 100% !important;
    margin-top: 12px !important;
    padding: 12px 16px !important;
    background: #fff !important;
    color: #db2777 !important;
    border: 2px solid #ec4899 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-align: center !important;
    transition: all 0.15s;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.uw-btn-copy-img:hover {
    background: #fdf2f8 !important;
    border-color: #db2777 !important;
}

.uw-btn-copy-img.copied {
    background: #db2777 !important;
    color: #fff !important;
}

/* ── Size Select Card ── */
.uw-form-group {
    margin-bottom: 16px;
}

/* ── Section Titles ── */
.uw-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .uw-deco-wrap {
        gap: 6px;
    }

    .uw-deco-btn {
        min-width: 72px;
        font-size: 12px;
        padding: 8px 6px;
    }

    .uw-sticker-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .uw-tab-btn {
        font-size: 12px;
        padding: 10px 6px;
    }
}