.guest-message-miniapp {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.guest-message-miniapp .gm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.guest-message-miniapp .gm-open-btn {
    background: #ffffff;
    color: #667eea;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.guest-message-miniapp .gm-open-btn:hover {
    background: #f3f4ff;
    transform: translateY(-1px);
}

.guest-message-miniapp .gm-edit-btn {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.guest-message-miniapp .gm-edit-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.guest-message-miniapp .gm-sent-panel {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
}

.guest-message-miniapp .gm-sent-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.guest-message-miniapp .gm-sent-body {
    font-size: 17px;
    line-height: 1.55;
    color: #fff;
    white-space: pre-wrap;
    word-break: break-word;
}

.guest-message-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    padding: 24px;
}

.guest-message-dialog {
    background: #1a1a1a;
    color: #f5f5f5;
    border-radius: 14px;
    width: 100%;
    max-width: min(720px, 96vw);
    min-height: min(62vh, 640px);
    max-height: min(92vh, 960px);
    padding: 28px 28px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.guest-message-dialog h3 {
    font-size: 20px;
    margin-bottom: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.guest-message-dialog textarea {
    width: 100%;
    min-height: 420px;
    flex: 1 1 auto;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid #333;
    background: #0d0d0d;
    color: #f5f5f5;
    font-size: 17px;
    line-height: 1.55;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.guest-message-dialog textarea:focus {
    outline: none;
    border-color: #667eea;
}

.guest-message-dialog .gm-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.guest-message-dialog .gm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 8px;
}

.guest-message-dialog .gm-actions button {
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.guest-message-dialog .gm-cancel {
    background: #333;
    color: #e0e0e0;
}

.guest-message-dialog .gm-cancel:hover {
    background: #444;
}

.guest-message-dialog .gm-send {
    background: #667eea;
    color: #fff;
}

.guest-message-dialog .gm-send:hover:not(:disabled) {
    background: #5568d3;
}

.guest-message-dialog .gm-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.guest-message-dialog .gm-error {
    color: #f87171;
    font-size: 14px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .guest-message-dialog {
        padding: 20px 18px 18px;
        max-height: 92vh;
        min-height: min(70vh, 520px);
    }

    .guest-message-dialog textarea {
        min-height: 320px;
    }
}

/* Toast after send / save */
.gm-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(120%);
    z-index: 10060;
    padding: 14px 22px;
    border-radius: 10px;
    background: #1a3a1a;
    color: #4ade80;
    border: 1px solid #22c55e;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
    max-width: min(420px, 92vw);
    text-align: center;
}

.gm-toast.gm-toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
