[hidden] { display: none !important; }

.pg-card { padding: 28px; }
.pg-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.pg-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; }

.pg-tabs { display: flex; justify-content: center; margin-bottom: 22px; }
.pg-tabs-inner { display: inline-flex; background: #f7f8fa; border: 1px solid #e5e7eb; border-radius: 30px; padding: 6px; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pg-tab { background: none; border: none; border-radius: 24px; padding: 9px 18px; font-weight: 600; font-size: .88em; color: #6b7280; cursor: pointer; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.pg-tab:hover { color: var(--site-dark); }
.pg-tab.active { background: var(--site-dark); color: #fff; }
.pg-tab:focus-visible, .pg-btn:focus-visible, .pg-row-copy:focus-visible { outline: 3px solid var(--site-light); outline-offset: 2px; }

.pg-panel { display: flex; flex-direction: column; gap: 18px; margin-bottom: 18px; }
.pg-fields { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: center; }
.pg-field { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.pg-field-wide { width: 100%; max-width: 560px; margin: 0 auto; }
.pg-field label, .pg-field-label { font-weight: 600; font-size: .9em; color: #374151; }
.pg-field input[type="number"], .pg-field select { border: 1px solid #ddd; border-radius: 8px; padding: 9px 12px; font-size: .95em; background: #fff; outline: none; transition: border-color .15s ease; }
.pg-field input[type="number"] { width: 110px; }
.pg-field input[type="number"]:focus, .pg-field select:focus { border-color: var(--site-light); }
.pg-field input[type="range"] { width: 100%; accent-color: var(--site-dark); }
.pg-field output { color: var(--site-dark); font-weight: 700; }

.pg-fieldset { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 18px; margin: 0 auto; max-width: 560px; width: 100%; }
.pg-fieldset legend { font-weight: 600; font-size: .9em; color: #374151; padding: 0 6px; }
.pg-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.pg-check { display: flex; align-items: center; gap: 10px; font-size: .92em; color: #23272f; cursor: pointer; }
.pg-check input { width: 18px; height: 18px; accent-color: var(--site-dark); flex-shrink: 0; }
.pg-check-wide { grid-column: 1 / -1; color: #6b7280; }

.pg-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin-bottom: 18px; }
.pg-btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 30px; padding: 9px 20px; font-weight: 600; font-size: .92em; cursor: pointer; transition: background .2s ease; }
.pg-btn-primary { background: var(--site-dark); color: #fff; }
.pg-btn-primary:hover { background: var(--site-dark-2); }
.pg-btn-ghost { background: #f3f4f6; color: #374151; border: 1px solid #ddd; }
.pg-btn-ghost:hover { background: #eceef1; }
.pg-copied-msg { font-size: .85em; font-weight: 600; color: var(--site-success); display: inline-flex; align-items: center; gap: 5px; }

.pg-error { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 14px; font-size: .9em; margin: 0 0 16px; }

.pg-estimate { background: #f7f8fa; border: 1px solid #eee; border-radius: 10px; padding: 16px 18px; margin-bottom: 20px; }
.pg-estimate-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: .9em; color: #374151; margin-bottom: 10px; }
.pg-estimate-row span { font-weight: 600; }
.pg-bar { height: 10px; background: #e5e7eb; border-radius: 10px; overflow: hidden; }
.pg-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--site-light), var(--site-dark)); border-radius: 10px; transition: width .25s ease; }

.pg-list { display: flex; flex-direction: column; gap: 8px; }
.pg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f7f8fa; border: 1px solid #eee; border-radius: 8px; padding: 10px 14px; }
.pg-value { font-family: "Courier New", monospace; font-size: .95em; color: #23272f; word-break: break-all; }
.pg-row-copy { background: #fff; border: 1px solid var(--site-light); border-radius: 8px; padding: 6px 12px; flex-shrink: 0; color: var(--site-dark); font-weight: 600; font-size: .85em; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: background .2s ease, color .2s ease; }
.pg-row-copy:hover { background: #f0fdfa; }
.pg-row-copy.copied { color: var(--site-success); border-color: var(--site-success); }
.pg-empty { text-align: center; color: #9aa0aa; font-size: .9em; padding: 18px 0; margin: 0; }

.pg-words-hint { font-size: .85em; color: #6b7280; margin: 0; text-align: center; }

@media (max-width: 600px) {
    .pg-card { padding: 22px 18px; }
    .pg-title-bar { margin: -22px -18px 20px; }
    .pg-fields { flex-direction: column; align-items: stretch; }
    .pg-field { min-width: 0; }
    .pg-field input[type="number"] { width: 100%; }
    .pg-checks { grid-template-columns: 1fr; }
    .pg-actions { flex-direction: column; }
    .pg-btn { justify-content: center; width: 100%; }
    .pg-row { flex-direction: column; align-items: stretch; }
    .pg-row-copy { justify-content: center; }
    .pg-value { font-size: .85em; }
}
