/* Pastel Kawaii Retro Style */
:root {
    --pink-bg: #fff0f5;       /* Lavender blush */
    --pink-border: #ffb6c1;   /* Light pink */
    --green-accent: #f0fff0;  /* Honeydew */
    --green-border: #98fb98;  /* Pale green */
    --text-color: #555;
    --link-color: #ff69b4;    /* Hot pink */
}

body {
    margin: 0;
    padding: 0;
    font-family: "Microsoft YaHei", "SimHei", sans-serif;
    color: var(--text-color);
    /* Gingham/Plaid pattern with pastel pink and green */
    background-color: #fff;
    background-image: 
      linear-gradient(90deg, rgba(255, 182, 193, 0.15) 50%, transparent 50%),
      linear-gradient(rgba(152, 251, 152, 0.15) 50%, transparent 50%);
    background-size: 30px 30px;
}

.wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

/* Top Nav */
.top-nav {
    text-align: center;
    margin-top: 20px;
}
.top-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 15px;
}
.top-nav li a {
    display: block;
    padding: 8px 30px;
    background-color: var(--pink-bg);
    border: 3px solid var(--pink-border);
    border-radius: 20px 20px 0 0;
    text-decoration: none;
    color: var(--link-color);
    font-weight: bold;
    border-bottom: none;
    transition: background 0.3s;
}
.top-nav li a:hover {
    background-color: var(--pink-border);
    color: #fff;
}

/* Main Container */
.main-container {
    background: rgba(255, 255, 255, 0.9);
    border: 4px dashed var(--pink-border);
    border-radius: 15px;
    display: flex;
    padding: 15px;
    gap: 20px;
    box-shadow: 0 0 15px rgba(255, 182, 193, 0.6);
}

/* Widgets General */
.widget {
    background: #fff;
    border: 3px solid var(--green-border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 4px 4px 0px var(--pink-bg);
}
.widget h2, .widget h3 {
    margin-top: 0;
    color: var(--link-color);
    border-bottom: 2px dotted var(--pink-border);
    padding-bottom: 5px;
    font-size: 1.2em;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}
.profile-widget {
    text-align: center;
}
.profile-pic img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--pink-border);
    background-color: var(--pink-bg);
}
.profile-desc {
    font-weight: bold;
    color: var(--text-color);
}
.small-text {
    font-size: 0.9em;
    color: #777;
}

/* Social Grid */
.social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    cursor: pointer;
    border: 2px solid var(--pink-border);
    object-fit: cover;
    display: block;
}

/* Content */
.content {
    flex-grow: 1;
}

/* Banner */
.banner {
    height: 160px;
    border: 4px solid var(--green-border);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}
.banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dashboard Grid */
.dashboard-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.music-player {
    width: 220px;
    background: var(--pink-bg);
    border-color: var(--pink-border);
    text-align: center;
}
.cd-spin img {
    width: 100px;
    border-radius: 50%;
    animation: spin 4s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.player-controls span {
    cursor: pointer;
    font-size: 1.2em;
    margin: 0 5px;
    color: var(--link-color);
}

.gallery {
    flex-grow: 1;
    background: var(--green-accent);
    border-color: var(--green-border);
    display: flex;
    align-items: center;
    gap: 15px;
}
.gallery-img img {
    width: 100px;
    height: 100px;
}

/* Updates List */
.updates ul {
    list-style: none;
    padding: 0;
}
.updates li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--pink-border);
}
.tag {
    color: #fff;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 5px;
}
.date {
    color: #ff69b4;
    font-size: 0.85em;
    font-weight: bold;
    margin-right: 5px;
}

/* Blog Posts */
.post {
    border: 2px dashed var(--pink-border);
    background-color: var(--pink-bg);
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
}
.post-title {
    margin: 0 0 10px 0;
    color: var(--link-color);
    font-size: 1.3em;
}
.post-meta {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--pink-border);
    padding-bottom: 5px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--link-color);
    font-weight: bold;
}
.guestbook-form input, .guestbook-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 2px solid var(--green-border);
    border-radius: 6px;
    outline: none;
}
.guestbook-form button {
    background: var(--pink-border);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}
.guestbook-form button:hover {
    background: var(--link-color);
}
.comment {
    background: var(--green-accent);
    border-left: 4px solid var(--green-border);
    padding: 10px;
    margin-bottom: 10px;
}

/* Misc */
body { padding-bottom: 100px; } /* Space for system monitor + mini music widget */

.hit-counter {
    text-align: center;
    background: var(--pink-bg);
    border-color: var(--pink-border);
}
.counter-digits {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--link-color);
    letter-spacing: 2px;
}
footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    color: #999;
    font-size: 0.9em;
}

/* System Monitor */
.system-monitor {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.9);
    border-top: 2px solid var(--pink-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #555;
    z-index: 1000;
}
.system-monitor .sep { margin: 0 10px; color: #ccc; }
.monitor-right { display: flex; align-items: center; gap: 5px; }
.cpu-bar {
    width: 100px;
    height: 12px;
    background: #eee;
    border: 1px solid #ccc;
}
.cpu-fill {
    height: 100%;
    background: linear-gradient(90deg, #98fb98, #ffb6c1);
    width: 30%;
    transition: width 0.5s;
}

/* Sitemap Immersive View */
.sitemap-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 25px);
    gap: 20px;
}
.retro-window {
    background: #fff;
    border: 2px solid #000;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    width: 320px;
    display: flex;
    flex-direction: column;
}
.retro-window.right-window {
    width: 380px;
}
.retro-titlebar {
    background: var(--pink-border);
    color: #fff;
    padding: 5px 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #000;
}
.retro-controls span {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #fff;
    color: #000;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    border: 1px solid #000;
    margin-left: 2px;
    cursor: pointer;
}
.retro-content {
    padding: 15px;
    font-size: 14px;
    color: #333;
}
.tree-list { list-style: none; padding-left: 10px; margin: 0; }
.tree-list li { margin-bottom: 10px; display: flex; align-items: center; gap: 8px;}
.tree-list li.active { background: rgba(255,182,193,0.4); padding: 2px 5px; border-radius: 3px; font-weight: bold; color: var(--link-color); }
.tree-list a { text-decoration: none; color: #555; }
.tree-list a:hover { color: var(--link-color); }

.connection-line {
    width: 60px;
    height: 4px;
    background: var(--pink-border);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.floppy-icon {
    font-size: 40px;
    background: #fff;
    padding: 10px;
    border: 2px solid var(--pink-border);
    border-radius: 8px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}
.props-table { width: 100%; margin-bottom: 15px; }
.props-table td { padding: 4px 0; }
.props-table td:first-child { font-weight: bold; width: 100px; }
.props-status { color: #28a745; font-weight: bold; }
.props-box { border: 1px solid #ccc; padding: 10px; background: #f9f9f9; min-height: 50px; margin-bottom: 15px; }
.props-buttons { display: flex; justify-content: flex-end; gap: 10px; }
.props-buttons a { text-decoration: none; }
.props-buttons button { border: 2px solid #000; background: #fff; padding: 5px 15px; cursor: pointer; font-weight: bold; color: #000; }
.props-buttons button:hover { background: #eee; }

/* Archives Blog Layout */
.archive-header {
    background: #fff;
    border: 3px solid var(--green-border);
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}
.archive-header h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
}
.archive-header p {
    color: #666;
    margin: 0;
    font-size: 0.9em;
}

.blog-layout {
    display: flex;
    gap: 20px;
}
.blog-main {
    flex: 3;
}
.blog-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.archive-post {
    background: #fff;
    border: 3px solid var(--green-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}
.post-thumb {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-meta-top {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.post-date {
    color: #999;
    font-size: 0.85em;
    font-family: 'Courier New', Courier, monospace;
}
.post-tag {
    background: var(--pink-bg);
    color: var(--link-color);
    border: 1px solid var(--pink-border);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.15s;
}
a.post-tag:hover {
    background: var(--link-color);
    color: #fff;
    transform: translateY(-1px);
}
.post-info h3 {
    margin: 5px 0 10px 0;
    line-height: 1.3;
}
.post-info h3 a {
    color: #333;
    text-decoration: none;
}
.post-info h3 a:hover {
    color: var(--link-color);
}
.post-summary {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    flex: 1;
}
.read-more a {
    color: var(--pink-border);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85em;
}
.read-more a:hover {
    color: var(--link-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}
.pagination button {
    background: #fff;
    border: 2px solid var(--green-border);
    padding: 5px 15px;
    border-radius: 15px;
    color: #555;
}

.sidebar-box {
    background: #fff;
    border: 3px solid var(--pink-border);
    border-radius: 8px;
    padding: 15px;
}
.sidebar-box h4 {
    margin: 0 0 15px 0;
    color: #fff;
    background: var(--pink-border);
    padding: 5px;
    text-align: center;
    letter-spacing: 2px;
}
.search-bar {
    display: flex;
    gap: 5px;
}
.search-bar input {
    flex: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.search-bar button {
    background: var(--pink-bg);
    border: 1px solid var(--pink-border);
    padding: 0 10px;
    cursor: pointer;
}
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.cloud-tag {
    display: inline-block;
    border: 1px solid #ddd;
    padding: 3px 10px;
    font-size: 0.8em;
    color: #666;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.15s;
}
a.cloud-tag:hover {
    background: var(--pink-bg);
    border-color: var(--pink-border);
    color: var(--link-color);
}
.cloud-tag-active {
    background: var(--link-color) !important;
    color: #fff !important;
    border-color: var(--link-color) !important;
}
.filter-hint {
    color: #7a5a6a;
    font-size: 0.9em;
    margin-top: 8px;
}
.filter-hint a {
    color: var(--link-color);
    text-decoration: underline;
}
.pagination a button:not(:disabled) {
    cursor: pointer;
}
.archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.archive-list li {
    margin-bottom: 5px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 5px;
}
.archive-list a {
    color: #555;
    text-decoration: none;
    font-size: 0.9em;
}
.archive-list a:hover {
    color: var(--link-color);
}

/* Button Retro */
.btn-retro {
    display: inline-block;
    background: var(--pink-bg);
    border: 2px solid var(--pink-border);
    padding: 5px 15px;
    text-decoration: none;
    color: var(--link-color);
    font-weight: bold;
    border-radius: 5px;
}
.btn-retro:hover {
    background: var(--pink-border);
    color: #fff;
}

/* Post Detail Styles */
.post-banner {
    height: 150px;
    border: 3px solid var(--pink-border);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    background: var(--pink-bg);
}
.post-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.post-detail-layout {
    display: flex;
    gap: 20px;
}
.post-main-content {
    flex: 3;
    background: #fff;
    border: 3px solid var(--pink-border);
    border-radius: 8px;
    padding: 30px;
}
.post-sidebar {
    flex: 1;
}

.post-header {
    border-bottom: 2px dashed var(--pink-border);
    margin-bottom: 20px;
    padding-bottom: 20px;
}
.post-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.2em;
    color: #333;
}
.post-meta {
    font-size: 0.9em;
    color: #888;
}

.post-body {
    line-height: 1.8;
    color: #444;
}
.post-body h2 {
    color: var(--link-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
}
.post-body p {
    margin-bottom: 15px;
}
.post-body blockquote {
    border-left: 4px solid var(--pink-border);
    background: var(--pink-bg);
    margin: 20px 0;
    padding: 15px 20px;
    color: #666;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 0.95em;
}
.post-body th, .post-body td {
    border: 1px solid var(--pink-border);
    padding: 12px;
    text-align: left;
}
.post-body th {
    background: var(--pink-bg);
    color: var(--link-color);
}
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--pink-border);
    margin: 18px auto;
    display: block;
    box-shadow: 4px 4px 0 rgba(255, 182, 193, 0.35);
}
.post-body h3 {
    color: var(--link-color);
    border-bottom: 2px dotted var(--pink-border);
    display: inline-block;
    padding-bottom: 4px;
    margin-top: 28px;
    margin-bottom: 14px;
    font-size: 1.2em;
}
.post-body h4 {
    color: #7a5a7a;
    margin-top: 22px;
    margin-bottom: 10px;
    font-size: 1.05em;
}
.post-body ul, .post-body ol {
    padding-left: 24px;
    margin: 14px 0;
    color: #555;
}
.post-body ul li, .post-body ol li {
    margin-bottom: 10px;
    line-height: 1.75;
}
.post-body hr {
    border: none;
    border-top: 2px dashed var(--green-border);
    margin: 26px 0;
}
.post-body strong { color: #ff5c8a; }
.post-body em { color: #7a8a6a; font-style: italic; }
.post-body code {
    background: var(--pink-bg);
    color: #d4568e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
}
.post-body a {
    color: var(--link-color);
    border-bottom: 1px dotted var(--link-color);
    text-decoration: none;
}
.post-body a:hover { background: var(--pink-bg); }

/* TOC Widget */
.toc-widget {
    background: #fff;
    border: 3px solid var(--text-color);
    border-radius: 8px;
    padding: 15px;
    position: sticky;
    top: 20px;
}
.toc-widget h4 {
    background: var(--pink-bg);
    border: 1px solid var(--pink-border);
    margin: -15px -15px 15px -15px;
    padding: 10px;
    text-align: center;
    border-radius: 5px 5px 0 0;
    color: var(--text-color);
    letter-spacing: 2px;
}
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc-list li {
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
}
.toc-list li::before {
    content: "♥";
    position: absolute;
    left: 0;
    color: var(--pink-border);
    font-size: 0.8em;
}
.toc-list a {
    color: #555;
    text-decoration: none;
    font-size: 0.95em;
}
.toc-list a:hover {
    color: var(--link-color);
}

/* About Page Styles */
.about-card {
    background: #fff;
    border: 3px solid var(--green-border);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}
.about-title {
    color: var(--link-color);
    border-bottom: 2px dotted var(--pink-border);
    padding-bottom: 10px;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.about-title span {
    color: var(--green-border);
    font-size: 1.2em;
}
.about-content {
    line-height: 1.8;
    color: #444;
}
.about-content h1, .about-content h2, .about-content h3 {
    color: var(--link-color);
    border-bottom: 2px dotted var(--pink-border);
    display: inline-block;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
}
.about-content h1 { font-size: 1.6em; }
.about-content h2 { font-size: 1.3em; }
.about-content h3 { font-size: 1.15em; }
.about-content ul, .about-content ol {
    padding-left: 22px;
    color: #555;
}
.about-content ul li, .about-content ol li {
    margin-bottom: 8px;
    line-height: 1.7;
}
.about-content blockquote {
    border-left: 4px solid var(--pink-border);
    background: linear-gradient(90deg, #fff0f6 0%, #fff 80%);
    margin: 16px 0;
    padding: 10px 16px;
    color: #7a5a6a;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}
.about-content blockquote p { margin: 4px 0; }
.about-content hr {
    border: none;
    border-top: 2px dashed var(--green-border);
    margin: 24px 0;
}
.about-content code {
    background: #fff0f6;
    color: #d4568e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
}
.about-content a {
    color: var(--link-color);
    border-bottom: 1px dotted var(--link-color);
    text-decoration: none;
}
.about-content a:hover { background: var(--pink-bg); }
.about-content strong { color: #ff5c8a; }
.about-content em { color: #7a8a6a; }
.about-subtitle {
    color: var(--link-color);
    border-bottom: 2px dotted var(--pink-border);
    display: inline-block;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
}
.skills-list {
    list-style-type: disc;
    padding-left: 20px;
    color: #555;
}
.skills-list li {
    margin-bottom: 8px;
}

/* ============================================================
   Homepage Decorations — xnmoe-style polish (v5.1)
   ============================================================ */

/* --- Tape strips --- */
.tape {
    position: absolute;
    width: 90px;
    height: 22px;
    opacity: 0.75;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.08);
    background-image: linear-gradient(135deg, transparent 45%, rgba(255,255,255,0.4) 50%, transparent 55%);
    pointer-events: none;
    z-index: 2;
}
.tape-pink { background-color: #ffb6c1; }
.tape-green { background-color: #98fb98; }
.tape-left   { top: -10px; left: 20px;  transform: rotate(-6deg); }
.tape-right  { top: -10px; right: 20px; transform: rotate(6deg); }
.tape-center { top: -12px; left: 50%; transform: translateX(-50%) rotate(-2deg); }

/* --- Hero banner --- */
.hero {
    position: relative;
    background: repeating-linear-gradient(
        45deg,
        var(--pink-bg), var(--pink-bg) 12px,
        var(--green-accent) 12px, var(--green-accent) 24px
    );
    border: 3px solid var(--pink-border);
    text-align: center;
    padding: 18px 10px 12px;
    overflow: visible;
}
.hero-ascii {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8em;
    font-weight: bold;
    color: var(--link-color);
    text-shadow: 2px 2px 0 #fff, 3px 3px 0 var(--green-border);
    letter-spacing: 2px;
}
.hero-ascii .blink {
    display: inline-block;
    color: var(--link-color);
    animation: blink 0.8s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
.hero-marquee {
    margin-top: 10px;
    background: #fff;
    border: 2px dashed var(--green-border);
    border-radius: 20px;
    padding: 4px 10px;
    color: #666;
    font-size: 0.9em;
}

/* --- iPod player --- */
.ipod {
    width: 200px;
    background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%);
    border: 3px solid #333;
    border-radius: 20px;
    padding: 14px 14px 18px;
    box-shadow: inset 0 2px 0 #fff, 4px 4px 0 var(--pink-bg);
    text-align: center;
}
.ipod-screen {
    background: linear-gradient(180deg, #d4e7d0 0%, #b8d4b0 100%);
    border: 2px solid #333;
    border-radius: 4px;
    padding: 8px 6px;
    margin-bottom: 14px;
    font-family: 'Courier New', Courier, monospace;
    color: #234;
    text-align: left;
    line-height: 1.3;
}
.ipod-now     { font-size: 0.7em; color: #456; letter-spacing: 1px; }
.ipod-song    { font-size: 0.95em; font-weight: bold; margin-top: 2px; }
.ipod-artist  { font-size: 0.75em; color: #567; }
.ipod-bar {
    margin-top: 6px;
    height: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
    overflow: hidden;
}
.ipod-bar-fill {
    width: 40%;
    height: 100%;
    background: var(--link-color);
    animation: ipod-progress 12s linear infinite;
}
@keyframes ipod-progress {
    0% { width: 0%; } 100% { width: 100%; }
}
.ipod-wheel {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, #dcdcdc 70%, #bbb 100%);
    border: 2px solid #999;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.1);
    font-size: 0.7em;
    color: #555;
    font-weight: bold;
}
.ipod-wheel > span {
    position: absolute;
    user-select: none;
}
.ipod-w-menu  { top: 10px;  left: 50%; transform: translateX(-50%); }
.ipod-w-prev  { left: 8px;  top: 50%; transform: translateY(-50%); }
.ipod-w-next  { right: 8px; top: 50%; transform: translateY(-50%); }
.ipod-w-pause { bottom: 10px; left: 50%; transform: translateX(-50%); }
.ipod-wheel-center {
    position: absolute;
    width: 44px;
    height: 44px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 35% 35%, #fff, #eaeaea 80%);
    border: 2px solid #aaa;
    border-radius: 50%;
    cursor: pointer;
}
.ipod-wheel-center:hover { background: radial-gradient(circle at 35% 35%, #fff, var(--pink-bg) 80%); }

/* --- Stamp wall --- */
.stamp-wall {
    flex: 1;
    background: var(--green-accent);
    border-color: var(--green-border);
    text-align: center;
}
.stamp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px;
}
.stamp-grid-wide {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 10px;
    padding: 4px;
}
.stamp {
    aspect-ratio: 1 / 1;
    background: var(--h, #fff);
    /* Notched/perforated edge via radial gradient ring */
    -webkit-mask: radial-gradient(circle 3px at 3px 3px, transparent 98%, #000) -3px -3px / 8px 8px;
            mask: radial-gradient(circle 3px at 3px 3px, transparent 98%, #000) -3px -3px / 8px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    cursor: default;
    transition: transform 0.2s;
}
.stamp:hover {
    transform: rotate(-4deg) scale(1.08);
}

/* --- Note-pad (updates) --- */
.note-pad {
    position: relative;
    background: #fffbe8;
    border: 2px solid #ead9a8;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0, transparent 27px,
        rgba(152, 251, 152, 0.35) 27px, rgba(152, 251, 152, 0.35) 28px
    );
    padding-left: 45px;
    box-shadow: 4px 4px 0 rgba(234, 217, 168, 0.5);
}
.note-pad::before {
    content: "";
    position: absolute;
    left: 30px; top: 0; bottom: 0;
    width: 1px;
    border-left: 1px solid #ffb6c1;
}
.note-pad h3 {
    border-bottom: 1px dashed #ead9a8;
    color: #c0658b;
    padding-top: 4px;
}
.note-pad li {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    border-bottom: none;
    padding: 4px 0;
    line-height: 1.6;
}
.note-pad .note-bullet {
    color: var(--link-color);
    margin-right: 4px;
}
.note-pad a {
    text-decoration: none;
    color: #555;
}
.note-pad a:hover {
    color: var(--link-color);
}

/* --- Sidebar Mood widget --- */
.mood-widget {
    text-align: center;
    background: #fffaf0;
    border-color: #ffd27f;
}
.mood-label {
    font-size: 0.75em;
    letter-spacing: 3px;
    color: #c08848;
}
.mood-face {
    font-size: 1.4em;
    margin: 6px 0 2px;
}
.mood-text {
    font-size: 0.85em;
    color: #888;
    margin: 0;
}

/* Profile widget corner stamp (decorative) */
.profile-widget {
    position: relative;
}
.profile-widget::before {
    content: "♥";
    position: absolute;
    top: -12px; right: -8px;
    width: 34px; height: 34px;
    line-height: 34px;
    background: var(--pink-border);
    color: #fff;
    border-radius: 50%;
    font-size: 1.1em;
    transform: rotate(15deg);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: rotate(15deg) translateY(0); }
    50%      { transform: rotate(15deg) translateY(-4px); }
}

/* ============================================================
   v6.0 — Logs / Works / Archive pages + Loader + Music Widget
   ============================================================ */

/* --- Logs page --- */
.logs-header, .works-header, .archive-header {
    background: linear-gradient(180deg, #fff 0%, var(--pink-bg) 100%);
    border-color: var(--pink-border);
}
.logs-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.log-item {
    background: #fffbe8;
    border: 2px solid #ead9a8;
    padding: 10px 14px;
    margin-bottom: 0;
    position: relative;
    box-shadow: 3px 3px 0 rgba(234,217,168,0.5);
}
.log-date {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    color: #c0658b;
    margin-bottom: 6px;
}
.log-body {
    line-height: 1.6;
    color: #444;
    white-space: pre-wrap;
}
.log-delete {
    position: absolute;
    top: 6px;
    right: 6px;
}
.log-delete button {
    background: transparent;
    border: 1px solid var(--pink-border);
    color: #c44;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.75em;
    cursor: pointer;
}
.logs-admin textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 2px solid var(--green-border);
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    resize: vertical;
}
.logs-admin button {
    margin-top: 8px;
}

/* --- Works page --- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.work-card {
    position: relative;
    background: #fff;
    border: 3px solid var(--green-border);
    border-radius: 6px;
    padding: 10px 10px 14px;
    box-shadow: 4px 4px 0 var(--pink-bg);
    transition: transform 0.25s;
}
.work-card:hover {
    transform: rotate(-1deg) translateY(-2px);
}
.work-tape {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 60px;
    height: 16px;
    background: rgba(255, 182, 193, 0.7);
    box-shadow: 1px 1px 2px rgba(0,0,0,0.08);
}
.work-frame {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--pink-bg);
    border: 1px solid #eee;
    margin-bottom: 8px;
}
.work-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.work-meta { text-align: center; }
.work-title {
    font-weight: bold;
    color: var(--link-color);
    font-size: 0.95em;
}
.work-desc {
    color: #888;
    font-size: 0.8em;
    margin-top: 2px;
}
.work-delete {
    position: absolute;
    top: 6px;
    right: 6px;
}
.work-delete button {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #c44;
    background: #fff;
    color: #c44;
    cursor: pointer;
    line-height: 0;
    padding: 0;
}
.works-admin .form-group { margin-bottom: 10px; }
.works-admin input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 2px solid var(--green-border);
    border-radius: 6px;
}

/* --- Archive page --- */
.archive-year {
    background: #fff;
    border-color: var(--pink-border);
}
.archive-year h3 {
    color: #fff;
    background: var(--link-color);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    margin: 0 0 14px 0;
    border: none;
    letter-spacing: 2px;
}
.archive-month {
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px dashed var(--green-border);
}
.archive-month-label {
    color: #888;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    margin-bottom: 4px;
}
.archive-item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.archive-item-list li {
    padding: 4px 0;
    border-bottom: 1px dotted #eee;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.archive-item-date {
    color: #aaa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    min-width: 48px;
}
.archive-item-kind {
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}
.kind-post { background: var(--pink-bg); color: var(--link-color); border: 1px solid var(--pink-border); }
.kind-log  { background: var(--green-accent); color: #4a8; border: 1px solid var(--green-border); }
.archive-item-list a {
    text-decoration: none;
    color: #555;
    font-size: 0.95em;
}
.archive-item-list a:hover { color: var(--link-color); }

/* --- Page transition loader --- */
.page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.95), rgba(240, 255, 240, 0.95));
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}
.page-loader.active {
    opacity: 1;
    visibility: visible;
}
.loader-inner {
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    color: var(--link-color);
}
.loader-ascii {
    font-size: 3em;
    font-weight: bold;
    text-shadow: 2px 2px 0 #fff, 3px 3px 0 var(--green-border);
    animation: loader-bounce 0.6s ease-in-out infinite;
}
.loader-text {
    font-size: 1em;
    margin-top: 12px;
    letter-spacing: 4px;
    color: #c0658b;
    animation: loader-pulse 0.9s ease-in-out infinite;
}
.loader-bar {
    width: 200px;
    height: 10px;
    margin: 14px auto 10px;
    background: #fff;
    border: 2px solid var(--pink-border);
    border-radius: 10px;
    overflow: hidden;
}
.loader-bar-fill {
    height: 100%;
    width: 0;
    background: repeating-linear-gradient(45deg, var(--link-color) 0 8px, var(--pink-border) 8px 16px);
    animation: loader-fill 0.55s linear forwards;
}
.loader-hint {
    font-size: 0.8em;
    color: #888;
    margin-top: 6px;
}
@keyframes loader-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
@keyframes loader-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}
@keyframes loader-fill {
    0%   { width: 0; }
    100% { width: 100%; }
}

/* --- Site-wide floating decorations --- */
.deco {
    position: fixed;
    pointer-events: none;
    z-index: 50;
}
.deco-tape-tl {
    top: 60px; left: 10px;
    width: 80px; height: 20px;
    background: rgba(152, 251, 152, 0.7);
    transform: rotate(-12deg);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.08);
}
.deco-tape-br {
    bottom: 120px; right: 10px;
    width: 80px; height: 20px;
    background: rgba(255, 182, 193, 0.7);
    transform: rotate(8deg);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.08);
}
.deco-star {
    font-size: 1.4em;
    animation: twinkle 2.5s ease-in-out infinite;
}
.deco-star-1 { top: 90px;  left: 20px;  color: #ffb6c1; animation-delay: 0s; }
.deco-star-2 { top: 180px; right: 20px; color: #98fb98; animation-delay: 0.6s; }
.deco-star-3 { top: 40%;   left: 8px;   color: #ff69b4; animation-delay: 1.2s; }
.deco-star-4 { top: 55%;   right: 8px;  color: #ffd27f; animation-delay: 1.8s; }
@keyframes twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50%      { opacity: 1;    transform: scale(1.1); }
}

/* --- Mini music widget (fixed bottom, above system monitor) --- */
.mini-music {
    position: fixed;
    left: 15px;
    bottom: 30px;
    width: 280px;
    height: 54px;
    background: linear-gradient(180deg, #fff, #ffe7f1);
    border: 2px solid var(--pink-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    box-shadow: 2px 2px 0 var(--pink-bg);
    z-index: 999;
    font-size: 12px;
}
.mm-disc {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, var(--link-color) 60%, #777 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    flex-shrink: 0;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.3);
}
.mm-disc.playing {
    animation: spin 3s linear infinite;
}
.mm-info {
    flex: 1;
    min-width: 0;
}
.mm-title {
    font-weight: bold;
    color: var(--link-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mm-sub {
    font-size: 0.75em;
    color: #888;
    letter-spacing: 2px;
}
.mm-ctrls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.mm-ctrls button {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1px solid var(--pink-border);
    background: #fff;
    color: var(--link-color);
    cursor: pointer;
    font-size: 0.9em;
    padding: 0;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mm-ctrls button:hover {
    background: var(--pink-bg);
}

/* ─── Recent Signings (homepage guestbook preview) ─── */
.recent-msgs {
    background: #0d1a0d;
    color: #9fffa0;
    border: 3px solid var(--green-border);
    font-family: 'Courier New', 'Consolas', monospace;
    padding: 14px 16px;
    box-shadow: 4px 4px 0 var(--pink-border);
}
.recent-msgs .rm-head {
    color: #ffb3d1;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px dashed #4a7a4a;
}
.recent-msgs .rm-blink {
    color: #ff5577;
}
.recent-msgs .rm-count {
    float: right;
    color: #88cc88;
}
.recent-msgs .rm-item {
    padding: 6px 0;
    font-size: 12px;
    line-height: 1.5;
    border-bottom: 1px dotted #2d4a2d;
}
.recent-msgs .rm-item:last-of-type {
    border-bottom: none;
}
.recent-msgs .rm-name {
    color: #ffe08a;
}
.recent-msgs .rm-date {
    color: #5a8a5a;
    font-size: 10px;
    margin-left: 6px;
}
.recent-msgs .rm-msg {
    color: #c0ffc0;
    padding-left: 14px;
    word-break: break-all;
}
.recent-msgs .rm-empty {
    color: #88cc88;
    text-align: center;
    padding: 18px 0;
    font-size: 12px;
}
.recent-msgs .rm-more {
    display: block;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #4a7a4a;
    color: #ffb3d1;
    text-align: center;
    font-size: 12px;
    text-decoration: none;
}
.recent-msgs .rm-more:hover {
    color: #fff;
    background: #1a2a1a;
}

/* ========== Image Upload UI (logs & write) ========== */
.log-upload-row, .upload-hint-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.log-upload-label {
    display: inline-block;
    padding: 6px 14px;
    background: var(--pink-bg);
    border: 2px dashed var(--pink-border);
    border-radius: 8px;
    color: var(--link-color);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.log-upload-label:hover {
    background: #ffe0ec;
}
.log-upload-label input[type="file"] {
    display: none;
}
.log-upload-filename {
    font-size: 12px;
    color: #888;
}
.log-image {
    margin-top: 10px;
    text-align: center;
}
.log-image img {
    max-width: 100%;
    max-height: 400px;
    border: 2px solid var(--pink-border);
    border-radius: 8px;
    background: #fff;
    padding: 4px;
}
.upload-status {
    min-height: 20px;
    margin: 6px 0;
    padding: 0 6px;
    font-size: 12px;
    color: #888;
}
.upload-status.uploading {
    color: var(--link-color);
    background: var(--pink-bg);
    border: 1px dashed var(--pink-border);
    border-radius: 6px;
    padding: 6px 10px;
}
.upload-status.success {
    color: #4a8a4a;
    background: var(--green-accent);
    border: 1px dashed var(--green-border);
    border-radius: 6px;
    padding: 6px 10px;
}
.upload-status.error {
    color: #c4446a;
    background: #ffe6ee;
    border: 1px dashed #ff88aa;
    border-radius: 6px;
    padding: 6px 10px;
}
#post-content.drag-over {
    background: var(--pink-bg);
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2);
}
