.watage-wrap {
    max-width: 760px;
    margin: 2rem auto;
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid #d8d2e5;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

.watage-wrap *,
.watage-wrap *::before,
.watage-wrap *::after {
    box-sizing: border-box;
}

.watage-wrap [hidden] {
    display: none !important;
}

.watage-field {
    margin: 1.25rem 0;
}

.watage-field > label {
    display: block;
    margin-bottom: .4rem;
    font-weight: 700;
}

.watage-field input[type="text"],
.watage-field input[type="email"],
.watage-field select,
.watage-field textarea {
    width: 100%;
    max-width: 100%;
    padding: .7rem;
    border: 1px solid #83769e;
    border-radius: 5px;
    background: #fff;
    color: #24202b;
    font: inherit;
}

.watage-year-options {
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr);
    align-items: end;
    gap: 1rem 1.5rem;
}

.watage-year-row,
.watage-birth-row {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.watage-field-year .watage-year-row input[type="text"],
.watage-field-year .watage-birth-row input[type="text"] {
    width: 8em;
    flex: 0 0 8em;
}

.watage-birth-label {
    display: block;
    margin-bottom: .4rem;
    font-weight: 700;
}

.watage-birth-row label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.watage-birth-row select {
    width: auto;
    min-width: 7.5em;
    padding: .7rem .5rem;
}

.watage-description {
    margin: .45rem 0 0;
    color: #5c5666;
    font-size: .9em;
}

.watage-field textarea {
    min-height: 10rem;
    resize: vertical;
    line-height: 1.7;
}

.watage-field input:focus,
.watage-field textarea:focus,
.watage-button:focus {
    outline: 3px solid rgba(43, 18, 101, .25);
    outline-offset: 2px;
}

.watage-counter {
    margin: .25rem 0 0;
    text-align: right;
    color: #5c5666;
    font-size: .9em;
}

.watage-human {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #f7f7f7;
}

.watage-human input {
    width: 1.2em;
    height: 1.2em;
    margin-right: .45rem;
    vertical-align: -.15em;
}

.watage-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.watage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.5rem 0 0;
}

.watage-button {
    appearance: none;
    min-height: 44px;
    padding: .65rem 1.15rem;
    border: 1px solid #2b1265;
    border-radius: 5px;
    background: #fff;
    color: #2b1265;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.watage-button-primary {
    background: #2b1265;
    color: #fff;
}

.watage-button:disabled {
    opacity: .55;
    cursor: wait;
}

.watage-status {
    margin: 1rem 0;
    padding: 0;
}

.watage-status:not(:empty) {
    padding: .8rem 1rem;
    border-left: 4px solid #5c5666;
    background: #f4f4f4;
}

.watage-status.is-error { border-color: #b32d2e; background: #fcf0f1; }
.watage-status.is-success { border-color: #16833b; background: #edfaef; }
.watage-status.is-warning { border-color: #dba617; background: #fff8df; }
.watage-status.is-working { border-color: #2271b1; background: #edf6fc; }

.watage-preview {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #2b1265;
}

.watage-preview iframe {
    display: block;
    width: 100%;
    height: min(78vh, 850px);
    border: 1px solid #aaa;
    background: #eee;
}

.watage-complete {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 2px solid #16833b;
    border-radius: 6px;
    background: #edfaef;
}

@media (max-width: 600px) {
    .watage-wrap { margin: 1rem 0; }
    .watage-year-options { grid-template-columns: 1fr; }
    .watage-birth-row { flex-wrap: wrap; }
    .watage-actions { display: grid; }
    .watage-button { width: 100%; }
    .watage-preview iframe { height: 65vh; }
}
