* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: calc(var(--base-font-size) * var(--ui-scale));
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-main);
    color: var(--text-primary);
}

.mobile-control-strip,
.taskbar {
    background: var(--surface-window);
    border-top: var(--window-border-width) solid var(--border-outer);
    box-shadow: var(--window-shadow);
}

.taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
}

input,
select,
textarea,
button {
    font: inherit;
}

.hidden {
    display: none !important;
}

.window {
    background: var(--surface-window);
    border: var(--window-border-width) solid var(--border-outer);
    box-shadow: var(--window-shadow);
}

.title-bar {
    background: var(--title-bg);
    color: var(--title-text);
    padding: 0.25rem 0.45rem;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-bar-controls {
    display: inline-flex;
    gap: 0.12rem;
}

.title-bar-controls button {
    width: 1rem;
    height: 1rem;
    font-size: 0.72rem;
    line-height: 0.6rem;
    border: var(--control-border-width) solid var(--border-outer);
    background: var(--surface-control);
    color: var(--text-primary);
}

.window-content {
    padding: 0.75rem;
}

.btn {
    border: var(--control-border-width) solid var(--border-outer);
    background: var(--surface-control);
    color: var(--text-primary);
    box-shadow: var(--button-shadow);
    padding: 0.3rem 0.65rem;
    cursor: pointer;
}

.btn:active {
    box-shadow: var(--button-shadow-active);
}

.btn-primary {
    font-weight: 700;
}

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    background: var(--surface-input);
    color: var(--text-primary);
    border: var(--input-border-width) solid var(--border-input);
    padding: 0.35rem 0.45rem;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.status-line {
    background: var(--surface-status);
    border: var(--input-border-width) solid var(--border-input);
    padding: 0.32rem 0.5rem;
    min-height: 1.8rem;
}

.participant-list {
    list-style: none;
    background: var(--surface-input);
    border: var(--input-border-width) solid var(--border-input);
}

.participant-item {
    border-bottom: 1px dashed var(--border-muted);
}

.participant-item:last-child {
    border-bottom: none;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-input);
}

.summary-table th,
.summary-table td {
    border: 1px solid var(--border-muted);
    padding: 0.35rem 0.45rem;
    text-align: left;
}

.vote-card,
.preview-card {
    border: var(--card-border-width) solid var(--card-border);
    background: var(--card-bg);
    color: var(--card-text);
}

.vote-card.is-selected {
    outline: var(--selected-outline);
    outline-offset: -0.35rem;
}

.vote-card.impact {
    animation: vote-impact 170ms ease;
}

@keyframes vote-impact {
    0% { transform: scale(1); }
    40% { transform: scale(0.91); }
    100% { transform: scale(1); }
}
