body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f0f2f5;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .container {
            background-color: white;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .w-10 { width: 10%; }
        .w-20 { width: 20%; }
        .w-30 { width: 30%; }
        .w-40 { width: 40%; }
        .w-50 { width: 50%; }
        .w-60 { width: 60%; }
        .w-70 { width: 70%; }
        .w-80 { width: 80%; }
        .w-90 { width: 90%; }
        .w-100 { width: 100%; }
        h2 {
            text-align: center;
            color: #333;
            margin-bottom: 20px;
        }
        .result-container {
            position: relative;
            margin-bottom: 20px;
        }
        #result {
            width: 100%;
            padding: 12px;
            font-size: 18px;
            border: 2px solid #ddd;
            border-radius: 6px;
            box-sizing: border-box;
            background-color: #fafafa;
            color: #333;
            font-family: monospace; /* 讓字元等寬，易於閱讀 */
        }
        .btn-copy {
            display: block;
            width: 100%;
            margin-top: 5px;
            padding: 8px;
            background-color: #6c757d;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
        }
        .btn-copy:hover {
            background-color: #5a6268;
        }
        .settings {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .setting {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        input[type="number"] {
            width: 50px;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        .btn-generate {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 12px;
            font-size: 16px;
            border-radius: 6px;
            cursor: pointer;
            width: 100%;
            margin-top: 20px;
            transition: background 0.3s;
        }
        .btn-generate:hover {
            background-color: #0056b3;
        }
        label {
            cursor: pointer;
            user-select: none;
        }

/* ── index ── */
        .nav-links {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 10px;
        }
        .nav-links a {
            display: block;
            padding: 14px 20px;
            background-color: #007bff;
            color: white;
            text-decoration: none;
            border-radius: 8px;
            font-size: 16px;
            text-align: center;
            transition: background 0.3s;
        }
        .nav-links a:hover {
            background-color: #0056b3;
        }
        body.page-doc {
            display: block;
            min-height: 100vh;
            height: auto;
            padding: 24px 0;
            box-sizing: border-box;
        }
        body.page-doc .container {
            margin: 0 auto;
        }
        .doc-layout {
            display: flex;
            flex-direction: column;
            gap: 18px;
            align-items: stretch;
        }
        .doc-intro {
            margin: 0;
            color: #4a5568;
            text-align: center;
            line-height: 1.7;
        }
        .info-list {
            margin: 0;
            padding-left: 1.25rem;
            color: #333;
            line-height: 1.8;
        }
        .panel {
            background-color: #f8fafc;
            border: 1px solid #d9e2ec;
            border-radius: 10px;
            padding: 18px;
        }
        .panel h3 {
            margin: 0 0 12px;
            color: #1f2937;
            font-size: 20px;
        }
        .panel p {
            margin: 0 0 10px;
            color: #475569;
            line-height: 1.7;
        }
        .endpoint {
            display: block;
            background-color: #111827;
            color: #f8fafc;
            padding: 12px 14px;
            border-radius: 8px;
            font-family: monospace;
            word-break: break-all;
        }
        .code-block {
            width: 100%;
            padding: 14px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            box-sizing: border-box;
            font-family: monospace;
            font-size: 14px;
            line-height: 1.6;
            background-color: #0f172a;
            color: #e2e8f0;
        }
        textarea.code-block {
            height: 80px;
            resize: vertical;
        }
        pre.code-block {
            height: auto;
            margin: 0;
            overflow: auto;
            white-space: pre;
        }
        .button-row {
            display: flex;
            justify-content: flex-end;
            margin-top: 10px;
        }
        .btn-primary {
            display: inline-block;
            padding: 10px 18px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 15px;
            text-decoration: none;
            transition: background 0.3s;
        }
        .btn-primary:hover {
            background-color: #0056b3;
        }
        .preview-frame {
            width: 100%;
            min-height: 90px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background-color: white;
        }
        .note {
            margin: 0;
            color: #64748b;
            font-size: 14px;
        }
        .form-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 16px;
        }
        .field-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .field-group label {
            color: #334155;
            font-weight: 600;
        }
        .select-input,
        .text-input {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            box-sizing: border-box;
            font-size: 15px;
            background-color: #fff;
        }
        .api-output {
            display: block;
            padding: 12px 14px;
            border-radius: 8px;
            background-color: #111827;
            color: #f8fafc;
            font-family: monospace;
            word-break: break-all;
            text-decoration: none;
        }
        .api-output:hover {
            color: #f8fafc;
        }
        .lunch-preview {
            min-height: 120px;
        }

        @media (max-width: 767px) {
            .form-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 767px) {
            body.page-doc {
                padding: 12px 0;
            }
            .container {
                width: min(100%, calc(100vw - 24px));
                padding: 1.25rem;
            }
        }

/* ── sri_tool ── */
        h1 { color: #2c3e50; text-align: center; }
        .input-group { display: flex; gap: 10px; margin-bottom: 20px; }
        .input-group input[type="text"] {
            flex: 1 1 auto;
            min-width: 0;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 16px;
        }
        .input-group #genBtn {
            flex: 0 0 88px;
            padding: 10px 12px;
            white-space: nowrap;
        }
        button { padding: 10px 20px; background: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
        button:hover { background: #2980b9; }
        button:disabled { background: #ccc; }
        #result-area { display: none; margin-top: 20px; padding: 20px; background: #e8f4fd; border-radius: 4px; border-left: 5px solid #3498db; }
        code { display: block; background: #f1f1f1; padding: 15px; border-radius: 4px; word-break: break-all; margin: 10px 0; border: 1px solid #ccc; }
        .error { color: #e74c3c; background: #fdeaea; padding: 15px; border-radius: 4px; display: none; margin-top: 20px; }
        .loader { display: none; text-align: center; margin: 10px 0; color: #666; }

/* ── s2t ── */
        .s2t-layout {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-top: 20px;
        }
        .s2t-layout label {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin-bottom: 5px;
            color: #555;
            font-weight: bold;
        }
        .box {
            display: flex;
            flex-direction: column;
        }
        .s2t-layout .btn-copy,
        .s2t-layout .btn-clear {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: auto;
            margin-top: 0;
            white-space: nowrap;
            flex: 0 0 auto;
        }
        textarea {
            height: 300px;
            padding: 12px;
            font-size: 16px;
            line-height: 1.5;
            border: 1px solid #ccc;
            border-radius: 8px;
            resize: vertical;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
        }
        textarea:focus {
            outline: none;
            border-color: #4A90E2;
        }
        .btn-clear {
            padding: 6px 12px;
            font-size: 14px;
            color: white;
            background-color: #dc3545;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }
        .btn-clear:hover {
            background-color: #c82333;
        }
        @media (min-width: 768px) {
            .s2t-layout {
                flex-direction: row;
            }
            .s2t-layout .box {
                flex: 1;
            }
        }
