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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    background: #f4f4f5;
    color: #000;
    line-height: 1.6;
}

header {
    background: #001743;
    color: #fff;
    border-bottom: 3px solid #000;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

header h1 {
    font-size: 18px;
    font-weight: 900;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

header a {
    color: #facc15;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border: 2px solid #facc15;
    padding: 6px 12px;
    border-radius: 8px;
    background: transparent;
}

header a:hover {
    background: #facc15;
    color: #001743;
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

.card {
    background: #fff;
    border: 3px solid #000;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 4px 4px 0 #000;
}

h2 {
    font-size: 18px;
    margin: 0 0 12px;
    font-weight: 900;
}

label {
    display: block;
    font-size: 12px;
    color: #000;
    margin: 10px 0 4px;
    font-weight: 800;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: 14px;
}

input[type=text], input[type=number], input[type=file], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #000;
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
}

textarea {
    resize: vertical;
    min-height: 74px;
}

button, .btn {
    padding: 9px 16px;
    border-radius: 8px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    transition: all .12s;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

button:hover, .btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #000;
}

button:active, .btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

button:disabled, .btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

button.primary, .btn.primary {
    background: #facc15;
    color: #000;
}

button.primary:hover, .btn.primary:hover {
    background: #f59f00;
}

button.danger, .btn.danger {
    background: #fff;
    color: #be123c;
}

button.danger:hover, .btn.danger:hover {
    background: #be123c;
    color: #fff;
}

button.mini {
    padding: 5px 10px;
    font-size: 12px;
}

.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.row > div {
    flex: 1;
    min-width: 160px;
}

.tag, .pill, .badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 9px;
    border: 2px solid #000;
    border-radius: 8px;
    background: #fff;
    color: #000;
    white-space: nowrap;
}

.pill.warn, .tag.warn {
    background: #facc15;
}

.pill.ok, .tag.ok {
    background: #10b981;
    color: #fff;
}

.pill.bad, .tag.bad, .badge {
    background: #be123c;
    color: #fff;
}

.tag.used {
    background: #e5e7eb;
}

.tag.expired {
    background: #fee2e2;
    color: #be123c;
}

.tag.valid {
    background: #dcfce7;
}

.muted {
    color: #52525b;
    font-weight: 700;
}

.empty {
    text-align: center;
    color: #52525b;
    padding: 28px 0;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    border: 3px solid #000;
    border-radius: 10px;
    box-shadow: 3px 3px 0 #000;
}

.thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #000;
}

.toast {
    position: fixed;
    left: 50%;
    top: 18px;
    transform: translateX(-50%);
    background: #001743;
    color: #fff;
    padding: 9px 18px;
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 99;
    box-shadow: 3px 3px 0 #000;
}

.toast.show {
    opacity: 1;
}

.toast a {
    color: #facc15;
    margin-left: 8px;
}

.section-title {
    font-size: 17px;
    font-weight: 900;
    margin: 22px 0 12px;
}

.section-title:first-child {
    margin-top: 0;
}

.points {
    color: #facc15;
    font-size: 13px;
    font-weight: 900;
}

#loginTip {
    display: none;
}

.summary {
    font-size: 13px;
    color: #000;
    margin-bottom: 14px;
    font-weight: 800;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.grid .card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.card .thumb {
    width: 100%;
    height: 160px;
    background: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 3px solid #000;
}

.card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid .card > img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: #f4f4f5;
    border-bottom: 3px solid #000;
}

.card .thumb .noimg {
    color: #52525b;
    font-size: 12px;
    font-weight: 800;
}

.card .body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card .name {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.5;
}

.card .price {
    font-size: 16px;
    color: #001743;
    font-weight: 900;
}

.card .meta {
    font-size: 12px;
    color: #52525b;
    font-weight: 700;
}

.card .stock {
    font-size: 12px;
    color: #52525b;
    font-weight: 700;
}

.card .stock.out {
    color: #be123c;
    font-weight: 900;
}

.card .ops {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.card .ops button, .card .ops .btn {
    flex: 1;
}

#availableList .card, #mineList .card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.value {
    min-width: 96px;
    text-align: center;
    color: #be123c;
    font-weight: 900;
}

.value .amount {
    font-size: 26px;
}

.value .unit {
    font-size: 12px;
    margin-left: 2px;
}

.info {
    flex: 1;
    min-width: 0;
}

.info .name {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 4px;
}

.info .meta {
    font-size: 12px;
    color: #52525b;
    line-height: 1.8;
    font-weight: 700;
}

.card.disabled {
    opacity: .55;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 3px solid #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 3px 3px 0 #000;
}

th, td {
    padding: 10px 12px;
    font-size: 13px;
    text-align: left;
    border-bottom: 2px solid #000;
    font-weight: 700;
}

th {
    background: #001743;
    color: #fff;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

.toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.toolbar select {
    width: auto;
}

.item {
    background: #fff;
    border: 3px solid #000;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 3px 3px 0 #000;
    cursor: pointer;
}

.item.unread {
    border-left: 6px solid #be123c;
}

.item .top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}

.item .title {
    font-size: 14px;
    font-weight: 900;
}

.item .title .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #be123c;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: 2px;
}

.item .meta {
    font-size: 12px;
    color: #52525b;
    white-space: nowrap;
    font-weight: 700;
}

.item .content {
    font-size: 13px;
    color: #000;
    line-height: 1.7;
    margin-top: 6px;
    white-space: pre-wrap;
    font-weight: 600;
}

.item .link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12.5px;
    color: #001743;
    text-decoration: none;
    font-weight: 900;
    border-bottom: 2px solid #facc15;
}

.pager {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 12px;
    font-size: 13px;
    color: #000;
    font-weight: 800;
}

.ticket {
    border: 3px solid #000;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    background: #fff;
    box-shadow: 3px 3px 0 #000;
}

.ticket:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #000;
}

.ticket .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.ticket .no {
    font-weight: 900;
    font-size: 13.5px;
}

.ticket .sub {
    color: #52525b;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.6;
    font-weight: 700;
}

.mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 16px;
}

.mask.show {
    display: flex;
}

.dialog {
    background: #fff;
    border: 3px solid #000;
    border-radius: 10px;
    width: 640px;
    max-width: 100%;
    max-height: 86vh;
    overflow: auto;
    padding: 18px;
    box-shadow: 6px 6px 0 #000;
}

.dialog .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dialog h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
}

#dBody .msg {
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.6;
    max-width: 86%;
    border: 2px solid #000;
}

#dBody .msg.user {
    background: #001743;
    color: #fff;
    margin-left: auto;
}

#dBody .msg.admin {
    background: #facc15;
    color: #000;
}

#dBody .msg .meta {
    font-size: 11px;
    color: inherit;
    opacity: .85;
    margin-bottom: 3px;
    font-weight: 700;
}

.tip {
    padding: 10px 16px;
    font-size: 12px;
    color: #000;
    background: #facc15;
    border-bottom: 3px solid #000;
    font-weight: 800;
}

body.chat-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-page .wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-left: 3px solid #000;
    border-right: 3px solid #000;
}

.chat-page #loginTip {
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.msgs {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f4f4f5;
}

#msgs .msg {
    display: flex;
    margin-bottom: 12px;
}

#msgs .msg .bubble {
    max-width: 76%;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    border: 2px solid #000;
    font-weight: 600;
}

#msgs .msg.user {
    justify-content: flex-end;
}

#msgs .msg.user .bubble {
    background: #001743;
    color: #fff;
    border-bottom-right-radius: 3px;
}

#msgs .msg.admin .bubble {
    background: #facc15;
    color: #000;
    border-bottom-left-radius: 3px;
}

#msgs .msg .time {
    font-size: 11px;
    color: #52525b;
    margin-top: 3px;
    font-weight: 700;
}

#msgs .msg.user .time {
    text-align: right;
}

.inputbar {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 3px solid #000;
    background: #fff;
}

.inputbar textarea {
    flex: 1;
    height: 44px;
    resize: none;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    font-weight: 600;
}

.inputbar textarea:focus {
    box-shadow: 3px 3px 0 #000;
}

.inputbar button {
    width: 74px;
    border: 2px solid #000;
    border-radius: 8px;
    background: #facc15;
    color: #000;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
}

.inputbar button:disabled {
    background: #e5e7eb;
    color: #000;
}

#loginTip.login-center {
    flex: 1;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #000;
    font-weight: 800;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tabs button {
    font-family: inherit;
    font-size: 13px;
    padding: 7px 12px;
    border: 2px solid #000;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: #000;
    font-weight: 800;
    box-shadow: 2px 2px 0 #000;
}

.tabs button.active {
    background: #001743;
    color: #fff;
}

.text {
    font-size: 13.5px;
    line-height: 1.9;
    color: #000;
    white-space: pre-wrap;
    min-height: 70px;
    font-weight: 600;
}

.meta {
    font-size: 12px;
    color: #52525b;
    margin-top: 10px;
    font-weight: 700;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    margin-bottom: 12px;
    font-weight: 800;
}

label.check {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #000;
    cursor: pointer;
    font-weight: 800;
}

.stars {
    font-size: 24px;
    color: #e5e7eb;
    cursor: pointer;
    user-select: none;
    letter-spacing: 2px;
    margin: 6px 0 10px;
    font-weight: 900;
}

.stars .on {
    color: #facc15;
}

.stars.static {
    font-size: 16px;
    cursor: default;
    letter-spacing: 1px;
    margin: 0;
}

.form {
    display: none;
    margin-top: 12px;
    border-top: 2px dashed #000;
    padding-top: 12px;
}

.form.show {
    display: block;
}

.form label {
    display: block;
    font-size: 12px;
    color: #000;
    margin: 10px 0 4px;
    font-weight: 800;
}

.reply {
    background: #facc15;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 10px;
    font-size: 12.5px;
    color: #000;
    font-weight: 700;
}

.reply .tag {
    color: #001743;
    font-weight: 900;
    margin-right: 6px;
}

html.embed header {
    display: none;
}
