:root {
      --bg: #f6f8fb;
      --card: #ffffff;
      --text: #1f2937;
      --muted: #6b7280;
      --line: #d1d5db;
      --accent: #2563eb;
      --accent-2: #1d4ed8;
      --danger: #dc2626;
      --ok: #059669;
    }

    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      color: var(--text);
      background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    }

    .container {
      max-width: 980px;
      margin: 32px auto;
      padding: 0 16px 32px;
    }

    .card {
      background: var(--card);
      border: 1px solid #e5e7eb;
      border-radius: 18px;
      box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
      overflow: hidden;
    }

    .header {
      padding: 20px 24px;
      border-bottom: 1px solid #e5e7eb;
      background: #f8fafc;
    }

    h1 {
      margin: 0;
      font-size: 1.35rem;
      line-height: 1.3;
    }

    .subtitle {
      margin-top: 8px;
      color: var(--muted);
      font-size: 0.95rem;
    }

    .content {
      padding: 24px;
      display: grid;
      gap: 20px;
    }

    .notice {
      padding: 12px 14px;
      border-radius: 12px;
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #1e3a8a;
      font-size: 0.92rem;
    }

    .section {
      border: 1px solid #e5e7eb;
      border-radius: 14px;
      padding: 16px;
      background: #fff;
    }

    .section h2 {
      margin: 0 0 10px;
      font-size: 1rem;
    }

    p { line-height: 1.55; }
    ol {
      margin: 10px 0 0 18px;
      padding: 0;
      line-height: 1.55;
    }
    li + li { margin-top: 8px; }
    ul { margin: 8px 0 0 18px; }

    .inner-list{
      list-style: circle;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .field {
      display: grid;
      gap: 6px;
    }

    label {
      font-size: 0.9rem;
      color: #374151;
      font-weight: 600;
    }

    input[type="text"], input[type="date"] {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 0.95rem;
      outline: none;
      background: #fff;
    }

    input:focus {
      border-color: #93c5fd;
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

    .checkbox-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      background: #fafafa;
    }

    .checkbox-row input { margin-top: 2px; }

    .sig-wrap {
      border: 1px dashed #cbd5e1;
      border-radius: 14px;
      padding: 12px;
      background: #fff;
    }

    .sig-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px;
      flex-wrap: wrap;
    }

    .sig-label {
      font-weight: 600;
      font-size: 0.95rem;
    }

    canvas {
      width: 100%;
      height: 220px;
      border: 1px solid #cbd5e1;
      border-radius: 12px;
      background: #fff;
      touch-action: none;
      display: block;
    }

    .actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    button {
      border: 1px solid #d1d5db;
      background: #fff;
      color: #111827;
      padding: 10px 14px;
      border-radius: 10px;
      cursor: pointer;
      font-weight: 600;
    }

    button.primary {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    button.primary:hover { background: var(--accent-2); }
    button:hover { background: #f9fafb; }

    .error {
      color: var(--danger);
      font-weight: 600;
      font-size: 0.92rem;
      min-height: 20px;
    }

    .success {
      color: var(--ok);
      font-weight: 600;
      font-size: 0.92rem;
      min-height: 20px;
      white-space: pre-wrap;
      word-break: break-word;
    }

    .preview {
      display: none;
      margin-top: 10px;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      padding: 10px;
      background: #fafafa;
    }

    .preview img {
      max-width: 100%;
      border: 1px solid #d1d5db;
      border-radius: 8px;
      background: white;
    }

    .footer-note {
      color: var(--muted);
      font-size: 0.85rem;
      line-height: 1.45;
    }

    @media (max-width: 700px) {
      .grid { grid-template-columns: 1fr; }
      .header, .content { padding: 16px; }
      canvas { height: 180px; }
    }